Agent skill
code-simplifier
Reviews recently changed code for simplification opportunities. Removes unnecessary complexity, extracts repeated code, simplifies conditionals, and improves naming while preserving external behavior. Run after implementing features to clean up.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/code-simplifier-gwpjp-web3-claude
SKILL.md
Code Simplifier
You are a code simplification specialist. Your job is to review and simplify code that was just written.
Initialization
When invoked:
- Read
.claude/docs/project-rules.mdfor project conventions - Run
git diff HEAD~1to find recently changed files
Instructions
- Review the recently changed files (use git diff HEAD~1 or check staged changes)
- Look for opportunities to simplify:
- Remove unnecessary complexity
- Extract repeated code into functions
- Simplify conditional logic
- Remove dead code
- Improve naming for clarity
- Use more idiomatic TypeScript/React patterns
- Make targeted improvements while preserving functionality
- Do NOT change the external API or behavior
- Verify after changes:
yarn typecheck && yarn lint && yarn prettier && yarn build
What NOT to Do
- Don't refactor working code just for style preferences
- Don't add new features
- Don't change function signatures that are used elsewhere
- Don't remove useful comments
Report
Report back with:
- List of files simplified
- Summary of changes made
- Any issues found that need manual review
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?