code-smell-detector

Detect code smells and anti-patterns across 7 programming languages and SQL.

3|2|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/robotijn/ctoc --skill code-smell-detector-robotijn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-smell-detector
Source: https://github.com/robotijn/ctoc/tree/main/skills/quality/code-smell-detector
Command: npx skills add https://github.com/robotijn/ctoc --skill code-smell-detector-robotijn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of hidden design issues in code that are not functional bugs but make codebases harder to maintain, extend, and debug, including new 2026-specific smells for ML pipelines and LLM-integrated applications that standard static analysis tools often miss.

Core Features & Use Cases

  • Comprehensive Smell Detection: Covers the classic Fowler code smell catalog plus 2026 additions for ML pipelines (data leakage, magic hyperparameters, randomness without seed) and LLM apps (god prompts, generic roles, hallucination feedback loops).
  • Multi-Language Support: Provides BAD/SAFE code examples and detection rules for 7 programming languages (C#, Java, Python, C, C++, JS/TS, SQL).
  • Prioritized Refactoring Guidance: Outputs severity-rated findings with concrete refactor suggestions, cross-links to related quality skills, and integration guidance for tools like SonarQube, MLScent, and jscpd.
  • Use Case: A development team can run this skill during code review to identify long methods, data clumps, and ML data leakage issues before they become expensive to fix in production.

Quick Start

Use the code-smell-detector skill to analyze the attached Python ML training script for data leakage, magic hyperparameters, and other ML-specific 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 and anti-patterns in an ML pipeline?

Detect code smells in ML pipelines by analyzing training scripts for data leakage, magic hyperparameters, and randomness without seed. This identifies hidden design issues specific to machine learning workflows that standard static analysis often misses.

What are common code smells in LLM-integrated applications?

Common code smells in LLM-integrated applications include god prompts, generic roles, and hallucination feedback loops. Detecting these anti-patterns early helps cut technical debt and prevents underlying design problems in large language model workflows.

Can I find refactoring suggestions for technical debt across multiple programming languages?

Find prioritized refactoring suggestions for technical debt across C#, Java, Python, C, C++, JS/TS, and SQL. The analysis provides severity-rated findings with concrete refactor guidance and BAD/SAFE code examples for each supported language.

Does this code smell detection approach work with standard static analysis tools like SonarQube?

Code smell detection works with standard static analysis tools by providing integration guidance for SonarQube, MLScent, and jscpd. It cross-references findings to related quality skills, extending traditional static analysis to cover ML pipelines and LLM workflows.

What is the best way to identify data leakage and magic hyperparameters before production deployment?

The best way to identify data leakage and magic hyperparameters is to run code smell detection during code review. This catches ML-specific design issues early with severity-rated findings and concrete refactoring suggestions before they become expensive to fix in production.

What classic and modern anti-patterns should I look for during code review?

During code review, look for classic Fowler catalog anti-patterns like long methods and data clumps, alongside modern 2026-era additions for ML and LLM workflows. Detecting these anti-patterns generates prioritized refactoring suggestions to reduce technical debt.