skills/refactor-clean/SKILL.md
Structured refactoring with smell detection, severity classification, and before/after metrics. Use when code needs deep structural analysis — decomposing large classes, resolving SOLID violations, eliminating duplication across modules, or reducing cyclomatic complexity. Presents a prioritized plan for approval before making changes. Not for lightweight post-edit polish.
npx skillsauth add philoserf/claude-code-setup skills/refactor-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.
Systematic methodology for analyzing and refactoring code to improve quality, maintainability, and performance. Focus on practical, incremental improvements — not over-engineering.
Read the target code and identify issues using the analysis rubric.
Rank issues using the impact-effort matrix:
| Priority | Description | Action | | -------- | ------------------------ | ---------- | | P1 | High impact, low effort | Do first | | P2 | High impact, high effort | Plan next | | P3 | Low impact, low effort | Quick wins | | P4 | Low impact, high effort | Skip |
Present the prioritized list to the user before making changes.
Apply changes incrementally — one concern at a time:
Principles to follow: DRY, YAGNI, composition over inheritance, consistent abstraction levels, no side effects.
Run existing tests after each incremental change. Check against the quality checklist.
Provide a before/after metrics comparison:
## Refactoring Summary
### Changes Made
- [list of changes with severity tags]
### Metrics
| Metric | Before | After |
|---------------------|--------|-------|
| Max function length | | |
| Max complexity | | |
| Duplicate blocks | | |
| Responsibilities | | |
### Remaining Issues
- [anything deferred with rationale]
Detailed analysis criteria and quality standards:
*-quality-gatediff-reviewtech-debtcode-audittesting
Audits ~/.claude/skills/ for unused entries, duplicate names, missing descriptions, and the longest descriptions. Use when trimming the user-level skill set, asking which skills are unused, finding duplicates, or auditing skill hygiene.
tools
Publishes and manages Flowershow sites with the `fl` CLI (the Go-based successor to the deprecated `@flowershow/publish` npm package). Use when publishing a note or folder to Flowershow, syncing updates to an existing site, managing auth, listing or deleting sites, or installing/upgrading the CLI.
tools
Copy edits prose while preserving voice and register. Use when asked to edit, copy edit, line edit, proofread, revise, polish, tighten, rewrite, or clean up essays, articles, drafts, or fiction. Flags wordiness, passive voice, clichés, hedging, and nominalizations with bracket markup or clean rewrites.
tools
Improves CLAUDE.md by analyzing conversation patterns. Use when Claude keeps repeating a mistake, when teaching a new preference, or when consolidating guidance from repeated instructions. Captures recurring corrections and style preferences into project instructions.