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 skills add mickeyyaya/refactoring-skills --skill detect-code-smellsgit clone --depth 1 https://github.com/mickeyyaya/refactoring-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/mickeyyaya/refactoring-skills/detect-code-smells)<a href="https://agentmods.dev/skills/mickeyyaya/refactoring-skills/detect-code-smells"><img src="https://agentmods.dev/badge/skills/mickeyyaya/refactoring-skills/detect-code-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.1 | $0.00037 | $0.02324 |
| Opus 5 | $0.00018 | $0.01162 |
| Sonnet 5 | $0.00007 | $0.00465 |
| Haiku 4.5 | $0.00004 | $0.00232 |
Grade A, and why
detect-code-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 6d 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 — 192 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Detect Code Smells
Overview
Code smells are surface indicators of deeper structural problems. They don't cause bugs directly but signal design weaknesses that slow development and increase bug risk. Detecting smells is the first step before applying targeted refactoring.
When to Use
- Code review reveals hard-to-read or hard-to-change sections
- A class or method has grown significantly over time
- Adding a feature requires touching many unrelated files
- Copy-pasted logic across the codebase
- Tests are brittle or hard to write for a module
Quick Reference
| Category | Smell | Key Symptom | Primary Fix (Skill) |
|---|---|---|---|
| Bloaters | Long Method | Method > 20 lines doing multiple things | refactor-composing-methods |
| Bloaters | Large Class | Too many fields/methods/lines | refactor-moving-features |
| Bloaters | Primitive Obsession | Primitives instead of small objects | refactor-organizing-data |
| Bloaters | Long Parameter List | 4+ parameters | refactor-simplifying-method-calls |
| Bloaters | Data Clumps | Same variables appear together repeatedly | refactor-organizing-data |
| OO Abusers | Switch Statements | Complex switch/if-else on type codes | refactor-simplifying-conditionals |
| OO Abusers | Temporary Field | Fields only set in certain circumstances | refactor-organizing-data |
| OO Abusers | Refused Bequest | Subclass uses little of parent's interface | refactor-generalization |
| OO Abusers | Alternative Classes w/ Different Interfaces | Same thing, different method names | refactor-generalization |
| Change Preventers | Divergent Change | One class changed for many different reasons | refactor-moving-features |
| Change Preventers | Shotgun Surgery | One change requires edits across many classes | refactor-moving-features |
| Change Preventers | Parallel Inheritance Hierarchies | Adding subclass in one hierarchy requires another | refactor-generalization |
| Dispensables | Comments (excessive) | Code needs extensive comments to be understood | refactor-composing-methods |
| Dispensables | Duplicate Code | Identical or similar code in multiple places | refactor-composing-methods |
| Dispensables | Lazy Class | Class does too little to justify existence | refactor-moving-features |
| Dispensables | Data Class | Only fields and getters/setters, no behavior | refactor-organizing-data |
| Dispensables | Dead Code | Unreachable or unused code | refactor-composing-methods |
| Dispensables | Speculative Generality | Unused abstractions "just in case" | refactor-generalization |
| Couplers | Feature Envy | Method uses another class's data more than its own | refactor-moving-features |
| Couplers | Inappropriate Intimacy | Classes access each other's internals excessively | refactor-moving-features |
| Couplers | Message Chains | a.getB().getC().getD() chains |
refactor-moving-features |
| Couplers | Middle Man | Class delegates most work to another class | refactor-moving-features |
| Couplers | Incomplete Library Class | Library doesn't provide needed functionality | refactor-moving-features |
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.
- 6d ago First seen · 192 lines · 37 tokens per session scan A 1863b581f729
detect-code-smells is a skill published in the GitHub repository mickeyyaya/refactoring-skills (6 stars, last pushed 5mo ago), licensed MIT. It adds 37 tokens to every session and 2,324 once invoked, about $0.0002 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
autoreview
Pre-commit/ship code review: Codex default; optional Claude or Pi.
rework-rate
Measure and interpret PR rework rate — the emerging 5th DORA metric.
omh-code-review
This is a Hermes-native code-review workflow skill.
revdiff-plan
Review the last Codex assistant message (plan, analysis, or proposal) with inline annotations in a TUI overlay. Extracts the most recent response from Codex rollout files and opens it in revdiff for review and annotation. Activates on "revdiff-plan", "review plan with revdiff", "annotate plan", "review last response"…
code-reviewer
Code review specialist focused on patterns, bugs, security, and performance.
full-repo-review
Comprehensive four-wave review of all repo source files, producing a prioritized issue backlog.