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/bcastelino/agent-skills-kit/clean-codenpx skills add bcastelino/agent-skills-kit --skill clean-codegit clone --depth 1 https://github.com/bcastelino/agent-skills-kitWrote 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/bcastelino/agent-skills-kit/clean-code)<a href="https://agentmods.dev/skills/bcastelino/agent-skills-kit/clean-code"><img src="https://agentmods.dev/badge/skills/bcastelino/agent-skills-kit/clean-code.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.00045 | $0.01081 |
| Opus 5 | $0.00023 | $0.00541 |
| Sonnet 5 | $0.00009 | $0.00216 |
| Haiku 4.5 | $0.00005 | $0.00108 |
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 4d 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
97% identical to clean-code — 9 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 — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Clean Code Skill
This skill embodies the principles of "Clean Code" by Robert C. Martin (Uncle Bob). Use it to transform "code that works" into "code that is clean."
🧠 Core Philosophy
"Code is clean if it can be read, and enhanced by a developer other than its original author." - Grady Booch
When to Use
Use this skill when:
- Writing new code: To ensure high quality from the start.
- Reviewing Pull Requests: To provide constructive, principle-based feedback.
- Refactoring legacy code: To identify and remove code smells.
- Improving team standards: To align on industry-standard best practices.
1. Meaningful Names
- Use Intention-Revealing Names:
elapsedTimeInDaysinstead ofd. - Avoid Disinformation: Don't use
accountListif it's actually aMap. - Make Meaningful Distinctions: Avoid
ProductDatavsProductInfo. - Use Pronounceable/Searchable Names: Avoid
genymdhms. - Class Names: Use nouns (
Customer,WikiPage). AvoidManager,Data. - Method Names: Use verbs (
postPayment,deletePage).
2. Functions
- Small!: Functions should be shorter than you think.
- Do One Thing: A function should do only one thing, and do it well.
- One Level of Abstraction: Don't mix high-level business logic with low-level details (like regex).
- Descriptive Names:
isPasswordValidis better thancheck. - Arguments: 0 is ideal, 1-2 is okay, 3+ requires a very strong justification.
- No Side Effects: Functions shouldn't secretly change global state.
3. Comments
- Don't Comment Bad Code: Rewrite It: Most comments are a sign of failure to express ourselves in code.
- Explain Yourself in Code:
vs# Check if employee is eligible for full benefits if employee.flags & HOURLY and employee.age > 65:if employee.isEligibleForFullBenefits(): - Good Comments: Legal, Informative (regex intent), Clarification (external libraries), TODOs.
- Bad Comments: Mumbling, Redundant, Misleading, Mandated, Noise, Position Markers.
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.
- 4d ago First seen · 92 lines · 45 tokens per session scan A 20b8d75e7cf1
clean-code is a skill published in the GitHub repository bcastelino/agent-skills-kit (2 stars, last pushed 29d ago), licensed MIT. It adds 45 tokens to every session and 1,081 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 97% identical to clean-code, differing in 9 lines, and is treated as a copy.
Other skills, from other repositories
jobs
Manage agy staffer background jobs - collect results, check status, cancel, follow-up conversation, and setup. Use when an agy job needs collecting, when the user asks "is the agy job done", "show agy's result", "cancel the agy job", "continue the agy conversation", or "set up agy". This is the orchestrator's skill…
researcher
Delegate a deep research or survey task to Google's Antigravity CLI (agy staffer, fast Gemini). Use when the user says /agy:researcher, "ask agy to research", "have the agy staffer survey X", or wants a second, independent deep-dive on a topic or codebase without spending the host model's quota.
staffer
Delegate a general-purpose task to Google's Antigravity CLI (agy staffer, fast Gemini) with a minimal, unopinionated prompt. Use when the user says /agy:staffer, "have agy do/handle X", "have agy generate an image", or the task fits none of the specialist personas (researcher / reviewer / implementer / ask) — the…
ask
Ask Google's Antigravity CLI (agy staffer, fast Gemini) a cheap one-shot question - the fast zero-tool mode and the post-install smoke test. Use when the user says /agy:ask, "ask agy", "quick second opinion from agy", or right after installing to verify the plugin works.
reviewer
Get a second-opinion review from Google's Antigravity CLI (agy staffer, fast Gemini) - of code (a diff, PR, working tree) or of a decision, plan, or design. Use when the user says /agy:reviewer, "have agy review this", "second opinion on my diff/PR/plan", or after finishing work and wanting an independent verifier…
gemini-swarm
Use BEFORE writing or editing code, tests, docs, or other content yourself — whenever the writing spans more than one file or more than 20 lines. Delegating the writing to Gemini sessions via the agy (Antigravity) CLI is the default; you orchestrate. Also use when the user asks to swarm/fan out/parallelize work across…