code-smell-detector

Detect code smells and provide refactoring recommendations for software projects.

1|1|Updated Nov 22, 2025
One-click install
npx skills add https://github.com/ntaksh42/agents --skill code-smell-detector-ntaksh42
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-smell-detector
Source: https://github.com/ntaksh42/agents/tree/main/.claude/skills/code-smell-detector
Command: npx skills add https://github.com/ntaksh42/agents --skill code-smell-detector-ntaksh42

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers improve code quality by automatically detecting common "code smells" – patterns that indicate deeper problems in the code and can lead to maintenance difficulties.

Core Features & Use Cases

  • Detects various code smells: Including long methods, duplicate code, large classes, magic numbers, deep nesting, dead code, comment smells, feature envy, primitive obsession, and switch statement smells.
  • Provides examples and recommendations: Illustrates each code smell with code snippets and suggests refactoring approaches.
  • Use Case: Before a major refactoring effort, run this Skill to get a comprehensive report of potential areas for improvement, prioritizing issues based on severity.

Quick Start

Use the code-smell-detector skill to analyze the file '/path/to/your/code.py' for code smells.

Frequently Asked Questions about code-smell-detector

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect code smells in my software project before refactoring?

Code smell detection involves analyzing your software project to identify patterns like long methods, duplicate code, large classes, and dead code. The tool provides illustrative examples and refactoring recommendations for each issue to reduce technical debt.

What are common code smells like feature envy and primitive obsession?

Common code smells include feature envy, primitive obsession, magic numbers, switch statement smells, and comment smells. These patterns indicate deeper maintainability problems in the source code and can be identified through static analysis to facilitate targeted refactoring.

Can I use static analysis to find magic numbers and dead code in my codebase?

Static analysis can automatically find magic numbers and dead code in your codebase. It reports on these and other code smells like deep nesting and duplicate code, providing illustrative examples and refactoring recommendations for each identified issue.

How do I get refactoring recommendations for large classes and long methods?

To get refactoring recommendations for large classes and long methods, run a code smell detector on your source files. It analyzes the code quality, identifies these structural issues, and suggests specific refactoring approaches to improve maintainability.

Does code smell detection require any specific dependencies or environment setup?

Code smell detection requires no specific dependencies or environment setup. You can directly analyze your source code files, such as a Python script, to identify various code smells and receive refactoring recommendations without additional configuration.

What is the best way to analyze code quality and reduce technical debt?

The best way to analyze code quality and reduce technical debt is to run a comprehensive code smell detector on your project files. It identifies maintainability issues like duplicate code and feature envy, providing prioritized refactoring recommendations based on severity.