Skip to content

/code-simplify

Simplify code for clarity and maintainability — reduce complexity without changing behavior

From plugin
agent-skills
112k9 skills4 agents9 commands7 hooks
> /plugin marketplace add addyosmani/agent-skills
> /plugin install agent-skills@addy-agent-skills

Command definition

code-simplify.md
description: Simplify code for clarity and maintainability — reduce complexity without changing behavior
disable-model-invocation: true

Invoke the agent-skills:code-simplification skill.

Simplify recently changed code (or the specified scope) while preserving exact behavior:

1. Read CLAUDE.md and study project conventions 2. Identify the target code — recent changes unless a broader scope is specified 3. Understand the code's purpose, callers, edge cases, and test coverage before touching it 4. Scan for simplification opportunities:

  • Deep nesting → guard clauses or extracted helpers
  • Long functions → split by responsibility
  • Nested ternaries → if/else or switch
  • Generic names → descriptive names
  • Duplicated logic → shared functions
  • Dead code → remove after confirming

5. Apply each simplification incrementally — run tests after each change 6. Verify all tests pass, the build succeeds, and the diff is clean

If tests fail after a simplification, revert that change and reconsider. Use `code-review-and-quality` to review the result.

@addyosmani
Ships withagent-skills

Production-grade engineering skills for AI coding agents. Skills encode the workflows, quality gates, and best practices that senior engineers use when building software.

Stars on GitHub

Momentum

stars in total
112.0k
Star history of addyosmani/agent-skills on GitHub, a chart by star-history.com

Other commands on agent-skills.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

plan
Auto-invoked

plan

Command

Break work into small verifiable tasks with acceptance criteria and dependency ordering

review
Auto-invoked

review

Command

Conduct a five-axis code review — correctness, readability, architecture, security, performance

ship
Auto-invoked

ship

Command

Run the pre-launch checklist via parallel fan-out to specialist personas, then synthesize a go/no-go decision

spec
Auto-invoked

spec

Command

Start spec-driven development — write a structured specification before writing code

More commands from other plugins.

audit-codebase

audit-codebase

Command

RTK Codebase Health Audit — 7 catégories scorées 0-10

rtk1d86k
@rtk-ai@rtk-aiInstall Command