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/t1/tdder/clean-codenpx skills add t1/tdder --skill clean-codegit clone --depth 1 https://github.com/t1/tdderWhat 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.00075 | $0.01554 |
| Opus 5 | $0.00037 | $0.00777 |
| Sonnet 5 | $0.00015 | $0.00311 |
| Haiku 4.5 | $0.00007 | $0.00155 |
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 2d 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 — 180 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Clean Code Principles
Disciplined development approach for writing high-quality, maintainable code. This skill is language-agnostic; language-specific conventions come from separate skills.
Philosophy
- Investment in Low Cost of Change: Clean code enables continuous modification without exponential complexity growth
- Boy Scout Rule: Always leave code cleaner than you found it
- Simplicity (KISS): Always prefer the simpler solution
- Root Cause Analysis: Fix problems at their source, not symptoms
Core Principles (Always Apply)
1. Loose Coupling
Components know little about each other. Dependencies flow through well-defined APIs. Changes in one component minimally affect others. Prefer composition over inheritance. Depend on abstractions, not concretions.
2. High Cohesion
Elements that belong together stay together. Each module has a single, well-defined purpose. Related functionality is grouped. Unrelated functionality is separated.
3. Change is Local
Modifications are contained within boundaries. A feature change affects minimal files/modules. Stable interfaces protect implementations.
4. It is Easy to Remove
Delete dead code immediately. Remove unused abstractions. Eliminate unnecessary features. Code should be easy to delete, not just easy to add.
5. Mind-sized Components
Functions: one screen or less. Classes: under 100 lines as a guideline. If it cannot be held in working memory, it is too big.
Refactoring Scope
When multiple code smells or improvements are found, present them as a prioritized markdown list,
then use AskUserQuestion to let the user decide how to proceed:
- Question: "How do you want to handle these findings?"
- Options:
- "Fix all" — apply all suggestions in priority order
- "Discuss one by one" — walk through each finding for individual approval
This avoids surprise refactorings and lets the user control scope. This process applies regardless
of whether findings come from direct review or from the clean-code-reviewer agent.
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.
- 2d ago First seen · 180 lines · 75 tokens per session scan A da60fc206f01
clean-code is a skill published in the GitHub repository t1/tdder (14 stars, last pushed 2d ago), licensed Apache-2.0. It adds 75 tokens to every session and 1,554 once invoked, about $0.0004 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-30.
Other skills, from other repositories
software-test-execution
Run scoped tests for a TDD slice, determine the appropriate test framework and command, and report structured pass/fail results. Use when tests need to be executed after writing, implementing, or refactoring code. Reads test metadata, discovers the test framework if needed, executes the scoped test command, parses…
nw-at-completeness-check
Canonical AT completeness gate — research-anchored 7-category taxonomy (C1-C7) + 15-item mechanical checklist. Paradigm-neutral. Drives acceptance-designer reviewer verdict deterministically.
nw-ab-critique-dimensions
Review dimensions for validating agent quality - template compliance, safety, testing, and priority validation.
re0-git
Rewrite a finished commit's message into a clean, handoff-ready form in your own log style, so git log alone tells the story. User-invoked: run it after a commit.
debloat
Compress an artifact that has accreted into bloat — padding, over-qualification, fused sentences, walls of enumeration, adjacent restatement — down to its load-bearing density, meaning preserved. Use when prose is correct and current but has grown verbose or patched-over and you want it tight without a full rewrite.
prism
Split one artifact — a claim, plan, or file — across 2 to 5 independent lenses, one per genuinely distinct failure mode (correctness, security, readability, cost, adversarial-user), and return their convergence: where they agree, where they disagree, and the single next question that resolves the disagreement. Use…