Detect common code smells and anti-patterns providing feedback on quality issues a senior developer would catch during review. Use when user opens/views code files, asks for code review or quality assessment, mentions code quality/refactoring/improvements, when files contain code smell patterns, or during code review discussions.
View on GitHubkjgarza/marketplace-claude
senior-software-developer
plugins/senior-software-developer/skills/detect-code-smells/SKILL.md
January 20, 2026
Select agents to install to:
npx add-skill https://github.com/kjgarza/marketplace-claude/blob/main/plugins/senior-software-developer/skills/detect-code-smells/SKILL.md -a claude-code --skill detect-code-smellsInstallation paths:
.claude/skills/detect-code-smells/# Detect Code Smells Detect common code smells and anti-patterns in code, providing immediate feedback on quality issues. ## Code Smell Categories ### 1. Complexity Smells - **Long Method**: Functions/methods > 50 lines - **Long Parameter List**: > 4 parameters - **Complex Conditionals**: Deeply nested if/else, complex boolean expressions - **High Cyclomatic Complexity**: > 10 branches - **Deep Nesting**: > 4 levels of indentation ### 2. Duplication Smells - **Duplicate Code**: Repeated code blocks - **Similar Functions**: Functions with nearly identical logic - **Magic Numbers**: Hardcoded numbers without explanation - **String Duplication**: Repeated string literals ### 3. Naming Smells - **Unclear Names**: Single letter variables (except loop counters) - **Hungarian Notation**: Unnecessary type prefixes - **Inconsistent Naming**: Mixed camelCase/snake_case - **Abbreviated Names**: Unclear abbreviations (mgr, ctx, tmp) - **Misleading Names**: Name doesn't match behavior ### 4. Object-Oriented Smells - **God Class**: Class > 500 lines or too many responsibilities - **Data Class**: Class with only getters/setters - **Feature Envy**: Method uses more of another class than its own - **Inappropriate Intimacy**: Classes too dependent on internal details - **Lazy Class**: Class doing too little to justify existence ### 5. Functional Smells - **Side Effects**: Function modifies external state unexpectedly - **Non-Pure Functions**: Functions with hidden dependencies - **Mutability Issues**: Unexpected mutation of objects - **Callback Hell**: Deeply nested callbacks ### 6. Architecture Smells - **Circular Dependencies**: Module A depends on B, B depends on A - **Missing Abstraction**: Concrete implementations without interfaces - **Tight Coupling**: Hard dependencies on specific implementations - **Leaky Abstraction**: Implementation details exposed through interface ## Detection Process 1. Parse file - Analyze syntax tree and structure 2. Identify patterns - Look