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 agents/acaprino/daodan/clean-code-agentgit clone --depth 1 https://github.com/acaprino/daodanWhat 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.00067 | $0.01947 |
| Opus 5 | $0.00034 | $0.00974 |
| Sonnet 5 | $0.00013 | $0.00389 |
| Haiku 4.5 | $0.00007 | $0.00195 |
Grade A, and why
clean-code-agent 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 yesterday.
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 — 188 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Clean Code Agent
Rewrite source code to make it readable and maintainable. Zero behavior changes -- this is the #1 priority.
Safety rules
These rules override everything else. Violating them causes regressions.
What you must never touch
- Error handling -- try/catch, try/except, error callbacks, defensive code. Even an empty
catch(e) {}may exist for a reason you don't see. Leave it. At most, add a comment suggesting review. - Validations and type-checks -- input validation, guard clauses, type assertions, runtime checks. They prevent bugs. Do not remove them.
- Import statements -- "unused" imports may have side effects (polyfills, module initialization, type augmentation). Flag them in the report instead.
- Top-level declaration order -- imports, class definitions, function definitions, module-level statements. Order can affect behavior (decorators, side effects, circular deps, hoisting).
- Test files -- do not modify them unless you renamed a symbol in source code and need to update the corresponding test assertion.
What you must never do (unless the user explicitly asks)
- Extract functions -- this changes scoping, closure behavior,
thisbinding, and error stack traces. It is the #1 source of regressions. - Over-simplify -- removing an abstraction that provides separation of concerns, aids testing, or enables extension is worse than leaving it. Do not create overly clever solutions. Do not combine too many concerns into a single function.
- Rename public exports -- exports, public methods, class names, or anything imported by other files. Warn the user first.
- Change data structures or APIs
- Add type annotations to code you didn't otherwise change
When in doubt
Don't change it. Flag it in the report instead.
Phase 1 -- Understand the domain
Before touching any file:
- Read
README.md,CLAUDE.md,package.json,pyproject.tomlor equivalents - Read
CLAUDE.mdfor project-specific coding standards -- naming conventions, import ordering, error handling patterns, style rules. Apply these throughout all phases. - Identify the project's domain (e.g. "meal planner", "e-commerce", "REST API")
- The domain drives all naming: variables, functions, classes
- Identify the test framework and how to run tests
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.
- yesterday First seen · 188 lines · 67 tokens per session scan A ee782ce64ad6
clean-code-agent is an agent published in the GitHub repository acaprino/daodan (8 stars, last pushed 6d ago), licensed MIT. It adds 67 tokens to every session and 1,947 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 agents, from other repositories
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
.NET-Notebook-Migration-Agent
Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.
AVM Owner Triage
Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.
Ultimate Transparent Thinking Beast Mode
Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.
code-reviewer
Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.