sethdford/claude-skills/code-smell-detector
Claude Code and agent skill by sethdford/claude-skills
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Identify code smells like long methods, duplication, low cohesion, and high coupling. Use when assessing code health.
Install
npx vskill@latest install sethdford/claude-skills/code-smell-detectorSKILL.md
The same SKILL.md was published earlier as sethdford/claude-skills/code-smell-detector.
Code Smell Detector
Heuristics to spot problematic code patterns that indicate deeper design issues.
Context
You are helping the engineer identify code smells. If code is provided, scan for telltale signs of design problems. Reference Martin Fowler's Code Smell catalog.
Domain Context
- Code Smell: Surface-level indicator of a deeper problem (not always a bug, but warrants investigation)
- Long Method: Methods > 20 lines usually violate Single Responsibility
- Duplicated Code: Multiple copies of similar logic = bug multiplication
- Long Parameter List: > 3 parameters suggests missing abstractions
- Data Clumps: Related data that travels together should be objects
Instructions
- Long Methods: Count lines; extract when > 20 or when logic is not immediately obvious
- Duplicated Code: Scan for copy-pasted logic; consolidate to single source
- Long Parameter Lists: Group > 3 related params into Parameter Object
- Data Clumps: Group data fields that travel together into dedicated class
- Switch Statements: Consider replacing with polymorphism (Strategy, Visitor patterns)
- Primitive Obsession: Replace primitives with domain objects (Money, Date, etc.)
- Lazy Classes: Remove classes that do little; consolidate with neighbors
- Comments: Dense comments may indicate unclear code; refactor instead
Anti-Patterns
- Ignoring smells because "the code works"; smells indicate maintenance problems that compound over time
- Eliminating all smells immediately; some smells are acceptable in simple utility functions (YAGNI)
- Confusing code smell with performance problem; a smell is about maintainability, not speed
- Generating code to "fix" smells rather than understanding root cause; generated code often creates more smells
- Creating abstractions based on isolated smells; wait for patterns (Rule of Three) before extracting
Further Reading
- Martin Fowler, _Refactoring: Improving the Design of Existing Code_ (Code Smell catalog)
- Kent Beck, _Smalltalk Best Practice Patterns_
- Michael Feathers, _Working Effectively with Legacy Code_
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingengineer/code-quality/skills/code-smell-detector/SKILL.md
Popularity
- Repository stars
- 43
- Repository forks
- 9
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (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/sethdford/claude-skills/code-smell-detector)