skills/mp-code-clean/SKILL.md
Review and fix code quality issues immediately: deduplicate, remove repetition, remove dead code. Use when: "clean code", "deduplicate this module", "remove dead code"
npx skillsauth add MartinoPolo/mpx-claude-code mp-code-cleanInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run focused code-quality cleanup and apply easy wins immediately. Target duplication, repetition, and dead/unused code. $ARGUMENTS
Parse $ARGUMENTS as file/s or folder/s scope, then build meaningful module groups.
Rules:
For each file group, spawn a review sub-agent.
Use this exact review prompt shape:
You are reviewing one module group for immediate code cleanup.
Goal:
- Find DRY violations, duplication/repetition, and dead/unused code.
- Propose low-risk cleanups that preserve behavior.
- Code line number reduction is the best win here.
Input:
- Module group: <folder/files list>
- Boundaries: review only this group and direct dependencies.
Required actions:
1) Identify duplicated logic and repeated patterns.
2) Identify dead/unused exports, imports, helpers, and unreachable code.
3) Prioritize easy wins first.
4) Produce an edit plan with exact files and concrete changes.
Required output:
- Findings grouped by file
- Ranked cleanup plan (easy wins first)
- Risk notes per proposed change
For each reviewed group, spawn a fix sub-agent with approved findings.
Use this exact fix prompt shape:
You are applying approved cleanup changes for one module group.
Goal:
- Execute the approved deduplication and dead-code-removal plan.
- Keep behavior and signatures stable.
Input:
- Module group: <folder/files list>
- Approved findings/plan: <review output>
Required actions:
1) Apply deduplication and repetition removal.
2) Remove dead/unused code safely.
3) Keep public contracts stable unless plan explicitly allows change.
4) Avoid broad rewrites and feature changes.
5) Run targeted checks/tests for touched files when available.
Required output:
- Applied edits by file
- What was removed/consolidated
- Validation results
- Follow-ups not completed and why
Fix subagent must reject unapproved scope expansion.
Run targeted validation on touched groups. Report outcomes per group.
Display:
development
Audit all active skills for consistency, convention drift, and common issues. Auto-fixes where possible, reports remaining issues. Use when: "audit skills", "skill audit", "check skills", "lint skills"
testing
Ship finished work: sync base, commit, push, PR, wait for CI green, merge. Use when: "ship it", "ship and merge", "ship this"
development
Scan recent Claude Code sessions for grilling/design discussions, extract decisions, and update CONTEXT.md + DECISIONS.md. Use when: "harvest decisions", "extract decisions from sessions", "update docs from sessions", "sync decisions"
tools
Consolidate CONTEXT.md: remove duplicates, outdated items, tighten language. Use when: "consolidate context", "clean up context", "simplify context", "consolidate requirements"