code-smells
Use this skill to identify maintainability risks and propose pragmatic refactoring paths.
Works with
Agent Skills format with YAML frontmatter. Claude Code reads it as-is.
--- name: "code-smells" description: "Use this skill to identify maintainability risks and propose pragmatic refactoring paths." license: "MIT" --- # Code Smells Use this skill to identify maintainability risks and propose pragmatic refactoring paths. ## Intent Router | Need | Load | | --- | --- | | smell categories, root-cause triage, and review checklist | `references/smell-catalog.md` | | language-specific smell examples for python, typescript, javascript, c, c++, c#, and rust | `references/language-examples.md` | ## Quick Start 1. Start by identifying the smells that most directly block safe change. 2. Tie each smell to a concrete maintenance cost such as hidden coupling, duplication, or fragile edits. 3. Prioritize refactors that simplify understanding, ownership, and testing before broad stylistic cleanup. 4. Recommend a sequence of small improvements rather than a heroic rewrite. ## Workflow - summarize the main maintenance pain in one sentence - identify the strongest smells and the code locations that exhibit them - distinguish root-cause smells from downstream symptoms - explain why each smell matters for change risk, defect risk, debugging cost, or review friction - recommend a staged refactor plan with the safest first move - note the tests or characterization checks needed before deeper cleanup ## Outputs to Prefer - rank findings by maintenance impact or refactor leverage - connect smells to specific code symptoms, not just labels - recommend small, behavior-preserving moves where possible - distinguish superficial style issues from structural maintainability problems - call out which smells are acceptable tradeoffs versus urgent structural risks ## Common Requests ```text Review this code for maintainability smells and prioritize the cleanup sequence. ``` ```text Explain which smells matter most here and suggest pragmatic refactors that preserve behavior. ``` ## Verification and Next Steps - verify the cleanup order with characterization tests around the smelliest path first - show which smell is the root cause and which symptoms should disappear after the first refactor - keep refactors behavior-preserving until the maintenance risk is back under control ## Safety Notes - do not label every disagreement in style as a code smell - avoid rewrite-heavy recommendations when small refactors can remove the real risk - preserve behavior unless the request explicitly allows design-level change - do not recommend abstraction merely to “fix” a smell if the result would be less direct than the original code
More Refactoring skills
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
analyze-project
lllllllama/rigorpilot-skills
Rigor Analyze / Rigor Audit read-only skill for deep learning research repositories. Use when the user wants to read and understand a repository, inspect model structure and training or inference entrypoints, review configs and insertion points, or flag suspicious implementation patterns without modifying code or running heavy jobs. Do not use for active command execution, broad refactoring, speculative code adaptation, or automatic bug fixing.
request-refactor-plan
mattpocock/skills
Create a detailed refactor plan with tiny commits via user interview, then file it as a GitHub issue. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps.

