mmalyska/claude-plugins/simplify
Claude Code and agent skill by mmalyska/claude-plugins
- community
Checking that the SKILL.md file is still in the repository.
Reduce complexity in recently changed code — guard clauses, extract helpers, deduplicate, name constants and conditions. Apply after code review or before shipping. Never changes behavior; reverts any change that breaks tests.
Install
npx vskill@latest install mmalyska/claude-plugins/simplifySKILL.md
The same SKILL.md was published earlier as mmalyska/claude-plugins/simplify.
Simplify
Read the workflow contract first. Select profile and topology independently; default STANDARD + SOLO. Apply mandatory project policy in every profile. This procedure does not authorize another actor or work beyond the requested stage.
Reduce unnecessary complexity in recently changed code without changing behavior.
Golden Rule: Preserve behavior and scope. Undo only your own failed simplification, preserving earlier user work; never reset or restore a whole file/worktree to roll back one edit.
When to Activate
- After
/revieworcode-revieweragent identifies complexity issues (deep nesting, long functions, magic values, duplicated logic) - Before
/shipwhen code passes tests but has structural noise - After implementing a feature — as a final cleanup pass before the quality gate
- When you spot nesting depth ≥ 4, functions > 50 lines, or repeated 3-line blocks while writing code
Do not activate:
- On code outside the current change scope
- When all complexity findings are intentional (performance-critical tight loops, generated code, migrations)
- When tests are failing — fix tests first
Phase 1 — SCOPE
If a specific file or directory was requested, use that as the scope.
Otherwise, use review scope selection: current unstaged, staged and task-relevant untracked files first, then the actual base comparison when clean. A recent commit is a target only when intended. Include docs/config when relevant; do not silently select an unrelated last commit.
QUICK removes obvious noise only; STANDARD evaluates clearer structure; DEEP records alternatives and maintenance tradeoffs. If nothing needs simplification, record a no-op assessment. Never expand scope to satisfy this skill.
Detect test command from project config:
| Marker | Command | |
|---|---|---|
package.json | npm test (or pnpm/yarn/bun test) | |
pytest.ini or pyproject.toml | pytest | |
go.mod | go test ./... | |
Cargo.toml | cargo test | |
Makefile with test target | make test | |
| Repository unittest suite | Documented python3 -B -m unittest discover -s tests |
For documentation/configuration changes, a relevant installed linter or manual check may be the meaningful verification; do not invent code tests or fetch tools.
Phase 2 — SIMPLIFICATION PASSES
Run applicable passes sequentially. After each owned edit, rerun affected checks and mandatory project gates. If it regresses behavior, undo only that edit and verify recovery; stop if recovery fails. Report unavailable required checks as NOT RUN, never fabricate a green suite.
Pass 1 — Guard Clauses
Target: Functions with nesting depth ≥ 4.
Invert conditions and return early to flatten nesting:
Per function: identify deepest block → invert condition → add early return → unindent → run tests → revert on failure.
Pass 2 — Extract Helpers
Target: Functions longer than ~50 lines.
Extract cohesive sub-tasks to named helpers (name describes WHAT, not HOW):
Per function: find logical groupings → extract to named helper → replace with call → run tests → revert on failure.
Pass 3 — Deduplicate
Target: Repeated code blocks (3+ similar lines, 2+ occurrences) within the change scope.
Extract to a shared utility function. Do not reach outside the scope to deduplicate with unrelated code.
Per duplication: identify pattern → extract utility → replace both occurrences → run tests → revert on failure.
Pass 4 — Name Magic Values
Target: Hardcoded literals used in logic conditions (if (status === "PENDING"), if (count > 100)).
Per literal: identify usage context → choose descriptive name → define constant at file/module top → replace → run tests → revert on failure.
Pass 5 — Name Complex Conditions
Target: Boolean expressions with 3+ operators.
Name describes intent, not logic. Per condition: identify intent → extract to named variable or helper → replace → run tests → revert on failure.
Phase 3 — SUMMARY
If nothing was simplified: Code is already clean — no simplifications applied.
Lifecycle Position
Follow the workflow contract. Simplify follows Review and precedes Ship readiness; rerun affected checks after edits. No-op is valid and neither simplification nor readiness authorizes delivery.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/development-lifecycle/skills/simplify/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mmalyska/claude-plugins/simplify)