detect-code-smells
Identify code quality issues and anti-patterns. Use when reviewing code for maintainability problems.
Installation
Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.
Voir la source ↗GuidesInstructions
Detect Code Smells
Identify code quality issues, anti-patterns, and maintainability problems that suggest need for refactoring.
When to Use
- Code review before merging
- Identifying refactoring priorities
- Mentoring and code quality improvement
- Planning technical debt reduction
Quick Reference
# Python code smell detection
pip install pylint radon
pylint --disable=all --enable=convention,refactor module.py
radon cc -a module.py # Cyclomatic complexity
radon mi -s module.py # Maintainability index
Workflow
- Scan for patterns: Identify common code smell patterns (long functions, duplication, magic numbers)
- Check complexity: Measure cyclomatic and cognitive complexity
- Evaluate naming: Check for unclear variable/function names
- Review structure: Identify violations of SOLID principles
- Document findings: List smells with severity and recommendations
Output Format
Code quality report:
- Code smell type (duplication, long method, magic number, etc.)
- Location (file:line)
- Severity (critical/high/medium/low)
- Explanation of the issue
- Suggested fix or refactoring approach
References
- See CLAUDE.md > SOLID principles for design guidance
- See CLAUDE.md > DRY and KISS principles for quality standards
- See
refactor-codeskill for applying fixes
Exemples
Consultez les exemples du dépôt source.
Voir la source ↗Historique source
- Date d’indexation
- 2026-03-11
- Mise à jour de l’index
- 2026-03-11
- Branch
- main
Les dates concernent ce répertoire. Consultez le dépôt pour l’historique du code.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!