Code Quality
Simplify
Review recently changed code for reuse opportunities, quality issues, and efficiency improvements, then fix what you find.
Last reviewed Mar 2, 2026
Install
Create this file in your project:
.claude/skills/simplify/SKILL.md---
name: simplify
description: Use this skill after completing a feature or change, when asked to simplify code, or when reviewing recent work for cleanup opportunities.
---
# Simplify
## When to Use
- After completing a feature, before the final commit
- When asked to clean up, simplify, or refactor recent changes
- During code review when you spot improvement opportunities
## Process
1. **Identify recent changes** -- Look at the files modified in the current working session or recent commits.
2. **Scan for issues** in the changed code:
- Duplicated logic that could be extracted into a shared function
- Overly complex conditionals that could be simplified
- Unnecessary abstractions or indirection
- Dead code or unused imports
- Variables or functions with unclear names
- Magic numbers or strings that should be constants
3. **Prioritize** -- Fix high-impact issues first. A duplicated 20-line function matters more than a slightly unclear variable name.
4. **Apply fixes** -- Make each simplification as a discrete change. Run tests after each change.
5. **Verify** -- Run the full test suite to confirm all simplifications preserve existing behavior.
## Rules
- Only simplify code that was recently changed. Do not refactor unrelated parts of the codebase.
- Every simplification must preserve existing behavior. Run tests to confirm.
- Do not over-engineer. Extracting a function used once is not simplification.
- Do not add abstractions "for the future." Simplify what exists now.
- If simplification would require changing the public API, flag it for discussion rather than doing it.
- Prefer removing code over adding code. The best simplification is deletion.What this skill does
Simplify is a post-implementation cleanup skill that reviews recently written or modified code for opportunities to improve quality, reduce duplication, and increase clarity. It focuses specifically on code that was just changed, avoiding the trap of turning a small feature into a codebase-wide refactor.
The scoping constraint -- only simplify what was recently changed -- is intentional and important. Without it, simplification tasks expand endlessly. By limiting the scope to recent changes, the skill stays focused and produces quick, safe improvements that are easy to review.
The skill follows the principle that the best code is code that doesn't exist. When reviewing for simplification, removing unnecessary abstractions, dead code paths, and redundant logic is always preferred over adding new layers of indirection.
Example workflow
After adding a notification system, you ask the agent to simplify. It will:
- Review the files changed in the current session.
- Find that
sendEmailNotificationandsendSMSNotificationshare 15 lines of identical setup code -- extract it to aprepareNotificationhelper. - Notice an unused import left over from an earlier approach -- remove it.
- Find a nested ternary that's hard to read -- rewrite as an early return.
- Run the test suite after each change to confirm behavior is preserved.
Tips
- Run this skill as the last step before committing, like a final polish pass
- If the agent finds nothing to simplify, that's a good sign -- the code was already clean
- Keep an eye on test coverage during simplification; if a refactor reveals untested paths, add tests
- "Simplify" does not mean "make shorter" -- clarity is the goal, not minimum line count
Best with tools
Related MCP servers
- No linked MCP servers yet.