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 sutchan/Agent-Skills-Hub --skill clean-codegit clone --depth 1 https://github.com/sutchan/Agent-Skills-HubWrote 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/sutchan/agent-skills-hub/clean-code)<a href="https://agentmods.dev/skills/sutchan/agent-skills-hub/clean-code"><img src="https://agentmods.dev/badge/skills/sutchan/agent-skills-hub/clean-code/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.
<a href="https://agentmods.dev/skills/sutchan/agent-skills-hub/clean-code"><img src="https://agentmods.dev/badge/skills/sutchan/agent-skills-hub/clean-code.svg" alt="Reviewed on agentmods" width="80" 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.00055 | $0.03284 |
| Opus 5.5 | $0.00022 | $0.01314 |
| Sonnet 5.5 | $0.00011 | $0.00657 |
| Haiku 4.5 | $0.00006 | $0.00328 |
Grade A, and why
clean-code 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.
This is a copy
100% identical to clean-code — 12 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 225 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Clean Code Framework
A disciplined approach to writing code that communicates intent, minimizes surprises, and welcomes change. Apply these principles when writing new code, reviewing pull requests, refactoring legacy systems, or advising on code quality.
Core Principle
Code is read far more often than it is written — optimize for the reader. The read-to-write ratio is well over 10:1, so every naming choice, function boundary, and formatting decision either adds clarity or adds cost. Clean code reads like well-written prose: names reveal intent, functions tell a story one step at a time, and the Boy Scout Rule applies — always leave the code cleaner than you found it.
Scoring
Goal: 10/10. Rate any code 0-10 against the principles below. Report the current score and the specific improvements needed to reach 10/10.
- 9-10: Names reveal intent, functions are small and focused, error handling is consistent, tests are clean and comprehensive
- 7-8: Mostly clean with minor naming ambiguities or a few long functions; tests may lack edge cases
- 5-6: Mixed — good patterns alongside unclear names, duplicated logic, or inconsistent error handling
- 3-4: Long multi-purpose functions, misleading names, poor or missing tests
- 1-2: Nearly unreadable — magic numbers, cryptic abbreviations, no structure, no tests
The Clean Code Framework
Six disciplines for writing code that communicates clearly and adapts to change:
1. Meaningful Names
Core concept: Names should reveal intent, avoid disinformation, and make the code read like prose. If a name requires a comment to explain it, the name is wrong.
Why it works: Names are the most pervasive form of documentation — a well-chosen name eliminates the need to read the implementation; a poor one forces every reader to reverse-engineer intent.
Key insights:
- A name should answer why it exists, what it does, and how it is used
- No encodings, prefixes, or type information (no Hungarian notation); single letters only for tiny-scope loop counters
- Classes are nouns; methods are verbs
- One word per concept: don't mix
fetch,retrieve, andget - Longer scope demands a longer, more descriptive name
- Rename freely — IDEs make it trivial
What ships with it
6 files 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.
- 1mo ago Changed · -1 lines 5e23ccee9d02
- 1mo ago Changed · +3 lines · -71 tokens per session 58ff050733cf
- 3mo ago First seen · 223 lines · 126 tokens per session scan A 072b309df4ea
clean-code is a skill published in the GitHub repository sutchan/Agent-Skills-Hub (3 stars, last pushed 6d ago), licensed MIT. It adds 55 tokens to every session and 3,284 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to clean-code, differing in 12 lines, and is treated as a copy.
clean-code compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| clean-codesutchan/Agent-Skills-Hub | Skill | 3 | 6d ago | MIT | A | 55 | Claude Code, Codex |
| receiving-code-reviewobra/superpowers | Skill | 331k | 2d ago | MIT | A | 38 | Claude Code |
| requesting-code-reviewobra/superpowers | Skill | 331k | 2d ago | MIT | A | 22 | Claude Code |
| drupal-security-reviewsiva01c/claude-plugins | Skill | 16 | 25d ago | MIT | A | 35 | Claude Code |
| solidsiva01c/claude-plugins | Skill | 16 | 25d ago | MIT | A | 113 | Claude Code |
| drysiva01c/claude-plugins | Skill | 16 | 25d ago | MIT | A | 116 | Claude Code |
| code-review-and-qualityshennawardana23/skillme | Skill | 4 | 1mo ago | Apache-2.0 | A | 86 | Claude Code |