detect-code-smells

Detects code smells in Python and other languages, producing a structured quality report with fixes.

18|5|Updated Nov 3, 2025
One-click install
npx skills add https://github.com/mvillmow/ProjectOdyssey --skill detect-code-smells
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: detect-code-smells
Source: https://github.com/mvillmow/ProjectOdyssey/tree/main/.claude/skills/tier-2/detect-code-smells
Command: npx skills add https://github.com/mvillmow/ProjectOdyssey --skill detect-code-smells

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pylint, radon.

What problem does it solve?

Codebases can accumulate quality issues, anti-patterns, and maintainability problems (code smells) that reduce readability and increase technical debt.

Core Features & Use Cases

  • Code Smell Detection: Identifies common code smell patterns like long functions, duplication, magic numbers, and violations of SOLID principles.
  • Complexity Measurement: Measures cyclomatic and cognitive complexity to pinpoint areas needing refactoring.
  • Use Case: Before a major refactoring effort, use this skill to scan your Python codebase, generating a report of code smells and complexity metrics to prioritize areas for improvement.

Quick Start

Use the detect-code-smells skill to analyze 'module.py' for cyclomatic complexity and maintainability index.

Frequently Asked Questions about detect-code-smells

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

FAQPage Schema
How do I detect code smells in my Python codebase?

Code smell detection identifies maintainability issues like long functions, duplication, and magic numbers in your code. Use pylint and radon to scan your project and generate a structured report showing smell type, location, severity, and recommended fixes for prioritizing refactoring efforts.

What are code smells and why should I care about them?

Code smells are anti-patterns and quality issues that reduce readability and increase technical debt without causing immediate failures. Detecting them early helps you maintain cleaner code, improve team velocity, and plan strategic refactoring before problems compound.

Can I measure cyclomatic complexity to find refactoring priorities?

Yes, complexity measurement identifies areas with high cyclomatic and cognitive complexity that need refactoring. The skill produces complexity metrics alongside code smell detection to help you systematically prioritize which functions to simplify first.

How do I use code smell detection before a major refactoring?

Scan your Python codebase with this skill to generate a comprehensive quality report mapping code smells, complexity metrics, and SOLID violations. Use the structured output to identify patterns and create a prioritized refactoring roadmap for your team.

Does code smell detection work with pylint and radon?

Yes, the skill leverages pylint for static analysis and radon for complexity measurement to detect smells across your Python projects. Both tools integrate into the detection pipeline to produce unified reports with actionable insights.

What patterns of code smells can this skill identify?

The skill detects long methods, code duplication, magic numbers, and SOLID principle violations. It flags maintainability problems and complexity hotspots, producing location-specific explanations and recommended fixes for each smell category.