simplifying-code

simplifying-code is a skill for Claude Code, Codex from iliaal/whetstone. It costs 73 tokens per session (729 once invoked), scanned A, original, MIT.

A set of instructions for making code simpler and easier to read while keeping its behavior unchanged.

In plain words
What is it for?
Use it to simplify, clean up, refactor, polish, or declutter code, including removing unused code and reducing overly complex control flow.
Why use it?
It helps reduce unnecessary complexity, duplication, dead code, and unclear structure without silently changing outputs, errors, side effects, or public interfaces.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to simplify, clean up, refactor, polish, or declutter code, including removing unused code and reducing overly complex control flow.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/iliaal/whetstone/simplifying-code
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add iliaal/whetstone --skill simplifying-code
Clone the repo
git clone --depth 1 https://github.com/iliaal/whetstone

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for simplifying-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/iliaal/whetstone/simplifying-code/github.svg)](https://agentmods.dev/skills/iliaal/whetstone/simplifying-code)
Your own site
<a href="https://agentmods.dev/skills/iliaal/whetstone/simplifying-code"><img src="https://agentmods.dev/badge/skills/iliaal/whetstone/simplifying-code/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for simplifying-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/iliaal/whetstone/simplifying-code"><img src="https://agentmods.dev/badge/skills/iliaal/whetstone/simplifying-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 729 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Rogue Agent · line 48
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
  • low Excessive Agency · line 55
    Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
    Fix: Limit the skill's scope to its documented purpose. Remove instructions that enable the agent to perform actions outside its stated functionality.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00073 $0.00729
Opus 5.5 $0.00029 $0.00292
Sonnet 5.5 $0.00015 $0.00146
Haiku 4.5 $0.00007 $0.00073

Measured 1mo ago against content hash 2ba57dce477d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

simplifying-code scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

distillery/generated-skills/simplifying-code/SKILL.md · 59 lines

How it starts

The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Simplifying Code

Principles

Principle Rule
Preserve behavior Output must do exactly what the input did — no silent feature additions or removals. Specifically preserve: async/sync boundaries, error propagation paths, and logging side effects
Explicit over clever Prefer explicit variables over nested expressions. Readable beats compact
Simplicity over cleanliness Prefer straightforward code over pattern-heavy "clean" code. Three similar lines beat a premature abstraction
Surgical changes Touch only what needs simplifying. Match existing style, naming conventions, and formatting of the surrounding code
Surface assumptions Before changing a block, identify what imports it, what it imports, and what tests cover it. Edit dependents in the same pass

Process

  1. Read first — understand the full file and its dependents before changing anything
  2. Identify invariants — what must stay the same? Public API, return types, side effects, error behavior
  3. Identify targets — find the highest-impact simplification opportunities (see Smell → Fix table)
  4. Apply in order — control flow → naming → duplication → data shaping → types. Structural changes first, cosmetic last
  5. Verify — confirm no behavior change: tests pass, types check, imports resolve

Smell → Fix

Smell Fix
Deep nesting (>2 levels) Guard clauses with early returns
Long function (>30 lines) Extract into named functions by responsibility
Too many parameters (>3) Group into an options/config object
Duplicated block (3+ occurrences) Extract shared function. Two copies = leave inline; wait for the third
Magic numbers/strings Named constants
Complex conditional Extract to descriptively-named boolean or function
Dead code / unreachable branches Delete entirely — no commented-out code
Unnecessary else after return Remove else, dedent

AI Slop Removal

Read the full file on GitHub · 59 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 59 lines · 73 tokens per session scan A 2ba57dce477d

Subscribe to this mod's changes

simplifying-code is a skill published in the GitHub repository iliaal/whetstone (35 stars, last pushed 2d ago), licensed MIT. It adds 73 tokens to every session and 729 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

triage

Triages a PR comment — from a bot (Copilot, CI) or a human reviewer. Routes to the triagehelper.py helper for identity checks, thread snapshotting, isolated-worktree fixes, and publish/reply/resolve mechanics; you classify the finding and apply a justified fix. --dry-run is fully read-only (investigation and a printed…

nitinjain999/platform-skills · 109 tokens

pr-review

Comprehensive PR review across six dimensions — cost impact, environment drift, ownership gaps, SOC 2 compliance, deprecated API / version hygiene, and rollback feasibility. Each mode inspects the diff and current file state, reports findings with severity, and recommends concrete fixes. Use when preparing a PR for…

nitinjain999/platform-skills · 81 tokens

code-review

Review pull requests to this repo (a Claude Code / Copilot / Cursor platform-engineering skill plugin) for technical accuracy, security posture, structural consistency with existing domains, and completeness. Use this for any PR touching commands/, references/, examples/, skills/platform-skills/SKILL.md, or the plugin…

nitinjain999/platform-skills · 88 tokens

rubber-ducky

Use when you've planned a non-trivial change and are about to implement it, finished a complex or multi-file piece of work, just wrote tests, or are stuck on repeated failures — and any time the user says "rubber duck this", "rubber ducky", "get a second opinion", "sanity-check my plan", "poke holes in this", "what am…

harnessprotocol/harness-kit · 186 tokens

superreview

Review a change set or explicit project scope for intent, correctness, safety, reuse, and maintainability; independently validate findings and produce one report without applying fixes.

kochetkov-ma/claude-brewcode · 35 tokens

pr-sweep

Use when you want to sweep all open pull requests across all repos, triage their status, run code reviews on unreviewed PRs, merge what's ready, fix quick blockers, and produce a full status report. Trigger when the user says "check my PRs", "close out open PRs", "what's the status of my PRs", "sweep my PRs", "PR…

harnessprotocol/harness-kit · 0 tokens