Code Smell Detector

Identify code smells like long methods, duplication, low cohesion, and high coupling. Use when assessing code health.

48 stars 10 forksSoftware Development Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add sethdford/claude-skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add sethdford/claude-skills --skill code-smell-detector
Manual install
git clone --depth 1 https://github.com/sethdford/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/engineer/code-quality/skills/code-smell-detector ~/.claude/skills/code-smell-detector

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# 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

1. **Long Methods**: Count lines; extract when > 20 or when logic is not immediately obvious
2. **Duplicated Code**: Scan for copy-pasted logic; consolidate to single source
3. **Long Parameter Lists**: Group > 3 related params into Parameter Object
4. **Data Clumps**: Group data fields that travel together into dedicated class
5. **Switch Statements**: Consider replacing with polymorphism (Strategy, Visitor patterns)
6. **Primitive Obsession**: Replace primitives with domain objects (Money, Date, etc.)
7. **Lazy Classes**: Remove classes that do little; consolidate with neighbors
8. **Comments**: Dense comments may indicate unclear code; refactor instead

## Anti-Patterns
Read the full skill on GitHub

Details

Skill name
code-smell-detector
Path
engineer/code-quality/skills/code-smell-detector/SKILL.md
License
MIT
Repo updated
11 March 2026

FAQ

What does the Code Smell Detector skill do?

Identify code smells like long methods, duplication, low cohesion, and high coupling. Use when assessing code health.

How do I install the Code Smell Detector skill?

Claude Code plugin: /plugin marketplace add sethdford/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Code Smell Detector popular?

It lives in sethdford/claude-skills, which has 48 GitHub stars and 10 forks.

Related skills

Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.