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 commands/mktoronto/python-clean-architecture/check-qualitygit clone --depth 1 https://github.com/MKToronto/python-clean-architectureWhat 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.00013 | $0.00780 |
| Opus 5 | $0.00006 | $0.00390 |
| Sonnet 5 | $0.00003 | $0.00156 |
| Haiku 4.5 | $0.00001 | $0.00078 |
Grade A, and why
check-quality 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.
What it actually says
Run a focused code quality check on $ARGUMENTS (or the current working directory if no path given) against the 22 design rules. This is a lighter, faster check than /review-architecture.
Process
-
Read the code — Find and read ALL Python files in the target path recursively.
-
Check the 22 rules — For each file, check:
Naming & Structure:
- No type abuse (don't embed type in name:
user_list→users) - No vague identifiers (
data,info,temp,result,handle) - No single-letter variables outside comprehensions and lambdas
- No abbreviations (
cfg→config,mgr→manager)
Functions: 5. No flag parameters (boolean args that switch behavior → split into two functions) 6. No deep nesting (3+ levels → early returns or extract function) 7. Tell don't ask (don't query state then act on it — tell the object to act) 8. Functions do one thing (extract if doing two things)
Classes: 9. No god classes (too many responsibilities → extract classes) 10. No parallel data structures (two lists tracking same entities → single dataclass) 11. Information Expert (methods should live on the class that owns the data)
Types & Safety: 12. Type hints on all function signatures 13. Enums for fixed option sets (not bare strings) 14. No mutable default arguments (
def f(items=[])→def f(items=None)) 15. No wildcard imports (from x import *)Error Handling: 16. No broad exception catching (
except Exception→ catch specific exceptions) 17. Context managers for resources (with open()not manual try/finally)Advanced Design: 18. No isinstance checks for dispatch (move behavior into the class hierarchy or use a strategy dict) 19. No overloaded classes (too many instance variables → extract cohesive groups) 20. No asymmetric naming (consistent method names across similar classes, use dunder methods) 21. No misleading method names (
create_Xshould create and return,add_Xshould add to collection) 22. No hardwired initialization sequences (factory method or__init__guarantees complete setup) - No type abuse (don't embed type in name:
-
Report findings — For each violation:
- Rule number and name
- File and line
- Fix — short code snippet showing the correction
Group by file for easy navigation. Show a summary count at the top:
Quality Check: 14 files scanned, 8 issues found ───────────────────────────────────────────────── Rule 6 (deep nesting): 3 instances Rule 12 (missing types): 2 instances Rule 16 (broad except): 2 instances Rule 5 (flag parameter): 1 instance
For detailed rule explanations and examples, consult:
${CLAUDE_PLUGIN_ROOT}/skills/clean-architecture/references/code-quality.md${CLAUDE_PLUGIN_ROOT}/skills/clean-architecture/references/types-and-type-hints.md(for rules 12–13)${CLAUDE_PLUGIN_ROOT}/skills/clean-architecture/references/error-handling.md(for rules 16–17)
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 · 68 lines · 13 tokens per session scan A 6afda85a0de2
check-quality is a command published in the GitHub repository MKToronto/python-clean-architecture (8 stars, last pushed 2mo ago), licensed MIT. It adds 13 tokens to every session and 780 once invoked, about $0.0001 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 commands, from other repositories
go-stack.project-update
Compare the current project against the latest go-stack scaffold template and propose or apply updates (tasks, linters, dependencies, skills, provider patterns, security tooling) while preserving project-specific business logic and module identity.
go-stack.bundb.setup
Instructions to setup the go-stack BunDB integration for database access, migration management, and the bundled DB CLI command.
go-stack.inertia.setup
Instructions to setup the go-stack Inertia.js integration for fullstack Go applications, including boot provider wiring and frontend workflow.
deploy
Build, test, deploy with staged rollout.
brand-setup
Configure a new brand profile with colors, fonts, logo, visual style, platforms, and compliance rules.
save
Save this conversation as a new or existing reusable context.