clean-code-detect-smells

clean-code-detect-smells is a skill for Claude Code from helmedeiros/clean-code-skills. It costs 50 tokens per session (952 once invoked), scanned A, original, MIT.

A code-review guide for finding code smells: patterns that suggest deeper design problems even when the code still works.

In plain words
What is it for?
Use it to assess code quality, identify oversized or overly connected code, prepare refactoring plans, and structure code-review feedback.
Why use it?
It helps reveal technical debt and hard-to-change code before those problems make future changes riskier or more expensive.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the clean-code-skills plugin — 21 skills, 2 commands shipped together

Good fit Use it to assess code quality, identify oversized or overly connected code, prepare refactoring plans, and structure code-review feedback.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/helmedeiros/clean-code-skills/clean-code-detect-smells
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add helmedeiros/clean-code-skills --skill clean-code-detect-smells
Clone the repo
git clone --depth 1 https://github.com/helmedeiros/clean-code-skills

Made for: Claude Code.

Or install clean-code-skills, the plugin that ships this one along with the rest of its 21 skills, 2 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for clean-code-detect-smells

README.md
[![agentmods](https://agentmods.dev/badge/skills/helmedeiros/clean-code-skills/clean-code-detect-smells/github.svg)](https://agentmods.dev/skills/helmedeiros/clean-code-skills/clean-code-detect-smells)
Your own site
<a href="https://agentmods.dev/skills/helmedeiros/clean-code-skills/clean-code-detect-smells"><img src="https://agentmods.dev/badge/skills/helmedeiros/clean-code-skills/clean-code-detect-smells/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for clean-code-detect-smells

Your own site · 80×15
<a href="https://agentmods.dev/skills/helmedeiros/clean-code-skills/clean-code-detect-smells"><img src="https://agentmods.dev/badge/skills/helmedeiros/clean-code-skills/clean-code-detect-smells.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 952 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.00952
Opus 5.5 $0.00020 $0.00381
Sonnet 5.5 $0.00010 $0.00190
Haiku 4.5 $0.00005 $0.00095

Measured 1mo ago against content hash 7d3211c48ca0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

clean-code-detect-smells scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/clean-code-detect-smells/SKILL.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Clean Code: Detect Code Smells

Systematically identify code smells — surface indicators of deeper design problems — and prioritize them for refactoring.

When This Skill Applies

  • Reviewing code for quality issues
  • The codebase feels "hard to work with" but the problems are not obvious
  • The user mentions code smells, technical debt, or code quality
  • Preparing a refactoring plan
  • During code review to provide structured feedback

Core Principle

A code smell is a surface indication that usually corresponds to a deeper problem in the system. Smells are not bugs — the code works. But they signal that the design is becoming harder to understand, modify, or extend. Detecting smells early prevents them from compounding into costly structural problems.

Workflow

Step 1: Scan for Bloater Smells

Look for entities that have grown too large: long methods, large classes, long parameter lists, data clumps, primitive obsession.

Step 2: Scan for Coupler Smells

Look for excessive coupling: feature envy, inappropriate intimacy, message chains, middle man.

Step 3: Scan for Change-Prevention Smells

Look for patterns that make changes risky: divergent change (one class changed for many reasons), shotgun surgery (one change touches many classes), parallel inheritance hierarchies.

Step 4: Scan for Dispensable Smells

Look for things that should not exist: dead code, speculative generality, lazy class, duplicate code, unnecessary comments.

Step 5: Prioritize by Impact

Rate each smell by: frequency (how often it occurs), impact (how much it slows development), and effort (how hard it is to fix). Fix high-frequency, high-impact, low-effort smells first.

Detection / Indicators

Bloaters

Smell Detection Rule
Long Method More than 15 lines of logic
Large Class More than 200 lines or 7+ public methods
Long Parameter List More than 3 parameters
Data Clumps Same group of fields appears together in multiple places
Primitive Obsession Using strings, numbers, or booleans instead of value objects

Read the full file on GitHub · 98 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 98 lines · 50 tokens per session scan A 7d3211c48ca0

Subscribe to this mod's changes

clean-code-detect-smells is a skill published in the GitHub repository helmedeiros/clean-code-skills (2 stars, last pushed 8mo ago), licensed MIT. It adds 50 tokens to every session and 952 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

issue-analyze

GitHub Issue and PR review thread deep analysis with Codex blind verdict. Use when: analyzing issue root cause, classifying problems, investigation planning, triaging PR review comments for actionability. Not for: fixing bugs (use bug-fix), code exploration (use code-explore). Output: classified analysis + verdict…

sd0xdev/sd0x-harness · 73 tokens

compact-guard-clauses

Refactor deeply nested conditions into early-return guard clauses when doing so improves readability and preserves behavior.

alivirgo/Major-AI-Skills · 26 tokens

code-quality

Análise proativa e sob demanda de qualidade de código. Detecta código morto, duplicações, oportunidades de consolidação, complexidade excessiva e code smells. Sugere melhorias e executa correções com aprovação. Triggers on: código morto, dead code, duplicação, duplicated, cleanup, refactor, complexidade, smell…

parisgroup-ai/imersao-ia-setup · 82 tokens

refactor

Automated iterative code refactoring with swarm-orchestrated specialist agents including deep codebase discovery, confidence-scored code review, and security analysis. Use this skill when the user wants to improve existing code quality, clean up messy code, restructure, simplify, reduce tech debt, or perform…

zircote-plugins/refactor · 112 tokens

doubt-driven-development

Subjects every non-trivial decision to a fresh-context adversarial review before it stands. Use when you want every assumption cross-examined before proceeding, when stress-testing a plan for hidden failure modes, when correctness matters more than speed, when working in unfamiliar code, when stakes are high…

addyosmani/agent-skills · 96 tokens

audit

Project health audit and health check — architecture, performance, tests, dependencies, code quality. Use when assessing overall project health, before releases, or after refactors.

oliver-kriska/claude-elixir-phoenix · 35 tokens