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.
npx agentmods add skills/helmedeiros/clean-code-skills/clean-code-detect-smellsnpx skills add helmedeiros/clean-code-skills --skill clean-code-detect-smellsgit clone --depth 1 https://github.com/helmedeiros/clean-code-skillsWrote 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.
[](https://agentmods.dev/skills/helmedeiros/clean-code-skills/clean-code-detect-smells)<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="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00050 | $0.00952 |
| Opus 5 | $0.00025 | $0.00476 |
| Sonnet 5 | $0.00010 | $0.00190 |
| Haiku 4.5 | $0.00005 | $0.00095 |
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 5d 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.
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 |
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.
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.
- 5d ago First seen · 98 lines · 50 tokens per session scan A 7d3211c48ca0
clean-code-detect-smells is a skill published in the GitHub repository helmedeiros/clean-code-skills (2 stars, last pushed 6mo ago), licensed MIT. It adds 50 tokens to every session and 952 once invoked, about $0.0003 per session on Opus 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.
Other skills, from other repositories
codex-setup
Initialize sd0x-dev-flow infrastructure for Codex CLI and other non-Claude agents. Generates AGENTS.md, installs the commit-msg hook, copies runner scripts. The pre-push gate is opt-in via --with-push-gate. Use when setting up a new project or after updating skills.
codex-implement
Implement features via Codex exec. Use when: writing new code from specs, implementing features, Codex-driven development. Not for: code review (use codex-code-review), architecture advice (use codex-architect). Output: implemented code + review loop.
orchestrate
Agent-driven workflow orchestration (v1 report-only). Use when: declaring an intent (audit/research/feature shape) and wanting a planner agent to derive the skill workflow, preview it, and run read-only fanout with fail-closed no-change verification. Not for: executing mutating steps (v1 emits them as…
recap-doc
Post-development recap document generator. Use when: AI/Codex has implemented a feature and the user needs a guided walkthrough of what changed and why, with blind-spot detection and anticipated questions. Not for: Q&A follow-up (use /recap-ask), technical share-out for teammates (use /tech-brief), or generic code…
runbook
Generate and update feature release runbooks from existing docs and codebase. Use when: creating operational runbook, release handbook, deployment checklist, pre-release preparation. Not for: incident response (v2), code review (use codex-code-review), architecture design (use architecture).
test-review
Test coverage review via Codex exec. Use when: reviewing test sufficiency, identifying coverage gaps, test quality audit. Not for: generating tests (use codex-test-gen), code review (use codex-code-review). Output: coverage analysis + gap report.