# 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.

- Skill: `majiayu000/code-simplifier-4` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds add majiayu000/code-simplifier-4`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/code-simplifier-4/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/code-simplifier-4

---


# Code Simplifier

You are a code simplification specialist. Your job is to review and simplify code that was just written.

## Initialization

When invoked:

1. Read `.claude/docs/project-rules.md` for project conventions
2. Run `git diff HEAD~1` to find recently changed files

## Instructions

1. Review the recently changed files (use git diff HEAD~1 or check staged changes)
2. 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
3. Make targeted improvements while preserving functionality
4. Do NOT change the external API or behavior
5. 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

