Skip to content
SkillModel-led2,963 tokens in use

code-simplification

Simplify working code for clarity while keeping behavior exactly the same, one tested change at a time.

119,377 stars on the repository MIT Licenseaddyosmani/agent-skills · skills/code-simplification
npx skills add addyosmani/agent-skills --skill code-simplification
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing code-simplification costs

89tokens idle
2,963tokens in use

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

Nothing detected: no shell, network, file writes, git or credentials in its files.

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Excellent
  • Frontmatter12/15
  • Structure25/25
  • Examples12/15
  • Output15/15
  • Size15/15
  • Resources10/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent

No findings.

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Excellent
  • Development activity96
  • Maintenance100
  • Community76
  • Maturity32
  • Momentum40

Code Simplification guides an agent through making code easier to read, understand and modify without changing what it does. It applies five principles: preserve behavior, follow project conventions, prefer clarity over cleverness, keep balance and scope the work to what changed.

The process starts with Chesterton’s Fence, scans for concrete patterns in structure, naming and redundancy, applies one change at a time with tests, and ends with a before and after comparison.

What You Get

  • Five principles for safe simplification
  • A four-step process from understanding to verification
  • Tables of simplification signals for structure, naming and redundancy
  • Language-specific examples and a verification checklist

Common Use Cases

  • Cleaning up working code after a feature lands
  • Flattening deeply nested logic
  • Renaming generic or misleading identifiers
  • Removing duplicated logic and dead code

What Makes It Unique

The skill treats over-simplification as a failure mode and lists traps such as inlining a helper that named a concept or merging unrelated functions. It adapts the Claude Code Simplifier plugin idea into a process any agent can follow, and it limits scope to recently changed code by default.

Under The Hood

The skill is a single SKILL.md of instructions with code samples. It runs no scripts. The agent reads the project’s conventions such as CLAUDE.md, uses git blame for history and runs the project’s test suite and linter after each change.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers