Sign in
Explore
Prompts · PromptEveryday codingRefactoringReviewed

code-simplify

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

Kind
Prompt
Works with
Claude Code
Source
addyosmani/agent-skills @ 2686b620fc1f
Path
.claude/commands/code-simplify.md
Jobs
Review, Implementation
Topics
Refactoring

Credit

Made by
addyosmani
Original
github.com/addyosmani/agent-skills/blob/2686b620fc1fed2e8f60c…
License
MIT

Listed by Skill Manifest; not made by us.

InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
Install factsScanned 3 Nov 2026
Adds
  • .claude/commands/code-simplify.md (run as /code-simplify)
Runs scripts
None found
Uses the network
None found
Needs secrets
None found
Calls other skills
  • agent-skills:code-simplification
Source revision
2686b620fc1f
Licence
MIT
Last activity
24 Nov 2026
Source changed after the scan
Yes
  • Last push 24 Nov 2026, scanned 3 Nov 2026; read it again before you rely on this scan
Review
Reviewed

Found by a static scan of the stored text; nothing is run. “None found” is not a guarantee, so read what you install before you run it.

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.