Simplifies code after implementation. Reviews recent changes and suggests/applies simplifications while preserving behavior.
Simplifies code after implementation by reviewing recent changes and suggesting cleanups while preserving behavior.
/plugin marketplace add CloudAI-X/claude-workflow/plugin install project-starter@claude-workflowSimplify code after implementation. Find ways to make code cleaner and simpler without changing behavior.
git diff HEAD~1 --name-only
git log -1 --stat
git diff HEAD~1
Look for these patterns:
For each finding, present:
### Simplification: [Short description]
**Location**: `file:line`
**Type**: [Duplicate/Over-engineering/Dead code/etc.]
**Current** (X lines):
```[lang]
[code block]
Simplified (Y lines):
[code block]
Benefit: [Why this is better] Risk: Low - behavior unchanged
## Phase 4: Apply Simplifications
After user approval:
1. Make one change at a time
2. Run tests after each change
3. Commit with clear message: `refactor: simplify [description]`
4. Move to next simplification
## Output Format
[List each opportunity with current/simplified code]
## Safety Rules
1. **Never change behavior** - only structure
2. **Run tests after every change** - verify nothing broke
3. **Keep changes atomic** - one simplification per commit
4. **Document what was simplified** - clear commit messages
5. **Preserve public APIs** - internal refactoring only
## Usage
Copy to your project:
```bash
cp templates/subagents/code-simplifier.md .claude/commands/
Invoke with: /project:code-simplifier