spec-simplify-code

spec-simplify-code is a skill for Claude Code from ronronner02/codepilot-agent. It costs 37 tokens per session (1,941 once invoked), scanned A, original, MIT.

A skill for simplifying code that was changed recently while keeping its behavior the same. It focuses on clearer code, reuse, quality, and efficiency.

In plain words
What is it for?
Use it after making code changes when you want to improve readability or structure while preserving existing behavior.
Why use it?
It provides a focused cleanup pass after implementation, helping reduce unnecessary complexity without changing what the code does. It is intended for tidying and refactoring, not for finding bugs.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions subagents; names the AskUserQuestion tool; mentions Claude Code.

Good fit Use it after making code changes when you want to improve readability or structure while preserving existing behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ronronner02/codepilot-agent/spec-simplify-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 ronronner02/codepilot-agent --skill spec-simplify-code
Clone the repo
git clone --depth 1 https://github.com/ronronner02/codepilot-agent

Made for: Claude Code.

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 spec-simplify-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/ronronner02/codepilot-agent/spec-simplify-code/github.svg)](https://agentmods.dev/skills/ronronner02/codepilot-agent/spec-simplify-code)
Your own site
<a href="https://agentmods.dev/skills/ronronner02/codepilot-agent/spec-simplify-code"><img src="https://agentmods.dev/badge/skills/ronronner02/codepilot-agent/spec-simplify-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 spec-simplify-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/ronronner02/codepilot-agent/spec-simplify-code"><img src="https://agentmods.dev/badge/skills/ronronner02/codepilot-agent/spec-simplify-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,941 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.
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.00037 $0.01941
Opus 5.5 $0.00015 $0.00776
Sonnet 5.5 $0.00007 $0.00388
Haiku 4.5 $0.00004 $0.00194

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

Security

Grade A, and why

spec-simplify-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.

.claude/skills/spec-simplify-code/SKILL.md · 89 lines

How it starts

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

Simplify recently changed code for clarity, reuse, quality, and efficiency while preserving exact behavior. Prioritize readable, explicit code over compact code — fewer lines is not the goal.

Step 1: Identify scope

Resolve the simplification scope in this order:

  1. If the user explicitly named a scope (a file, a directory, "the function I just wrote", "the changes from this morning"), use that scope. Treat user-named scope as authoritative — do not widen it.
  2. Otherwise, in a git repository, default to the diff between the current branch and its base branch (e.g., git diff origin/main... or against the configured upstream). This covers the common case of "simplify everything I've added on this feature branch before opening a PR." If the branch has no upstream or base ref, fall back to staged + unstaged changes (git diff HEAD).
  3. Outside a git repository or when no diff is available, review the most recently modified files mentioned by the user or edited earlier in this conversation.

If none of the above produces a non-empty scope, stop and ask the user what to simplify rather than guessing. Use the platform's blocking question tool: AskUserQuestion in Claude Code (call ToolSearch with select:AskUserQuestion first if its schema isn't loaded), request_user_input in Codex. Fall back to numbered options in chat only when no blocking tool exists in the harness or the call errors (e.g., Codex edit modes) — not because a schema load is required. Never silently skip the question.

Preflight — skip a no-yield scope before loading review lenses. If the resolved scope contains no substantive human-authored code and consists only of documentation/Markdown, generated or vendored files, dependency/lockfiles, or purely mechanical formatting, lint, or mass-rename churn, stop with a one-line nothing to simplify result. On a mixed diff, narrow the scope to the substantive code files. This is a change-kind gate, not a size threshold, and it never widens beyond caller-authorized paths.

When the caller provides a plan as context, the plan is not additional simplification scope. Preserve any session-settled: structural decisions: deliberately separate implementations or duplicated package-local runtime assets remain separate even when consolidation would otherwise look cleaner.

Read the full file on GitHub · 89 lines

Files

What ships with it

3 files 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 · 89 lines · 37 tokens per session scan A f3930a209102

Subscribe to this mod's changes

spec-simplify-code is a skill published in the GitHub repository ronronner02/codepilot-agent (0 stars, last pushed 1mo ago), licensed MIT. It adds 37 tokens to every session and 1,941 once invoked, about $0.0001 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-31.