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/totoro-jam/battle-tested-patterns/audit-patternnpx skills add Totoro-jam/battle-tested-patterns --skill audit-patterngit clone --depth 1 https://github.com/Totoro-jam/battle-tested-patternsWrote 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/totoro-jam/battle-tested-patterns/audit-pattern)<a href="https://agentmods.dev/skills/totoro-jam/battle-tested-patterns/audit-pattern"><img src="https://agentmods.dev/badge/skills/totoro-jam/battle-tested-patterns/audit-pattern.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.1 | $0.00149 | $0.01391 |
| Opus 5 | $0.00075 | $0.00696 |
| Sonnet 5 | $0.00030 | $0.00278 |
| Haiku 4.5 | $0.00015 | $0.00139 |
Grade A, and why
audit-pattern 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 6d 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 — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Audit Patterns
Overview
Grade a codebase against the Battle-Tested Patterns catalog: for each pattern it implements, fetch the canonical doc page and check the implementation against that doc's invariants — not against the name the codebase gave it. The most valuable output of an audit is not a score; it is the mislabel — code called a "semaphore" that is actually a mutex, an "MVCC" that keeps a single version. Those are the claims that mislead developers into expecting guarantees the code does not provide.
Companion skill: Inventory using the adopt-pattern skill's catalog, or the
pattern docs at https://github.com/Totoro-jam/battle-tested-patterns/tree/main/docs/patterns.
This skill is the inverse of adopt-pattern: that one runs the catalog forward
(add a pattern); this one runs it backward (grade patterns already there).
When to use
- A reviewer asks whether a codebase's patterns are implemented correctly.
- Someone asks "is this really a
<pattern>?" or "do we honor X's invariants?". - A periodic conformance check after a release, to catch new mislabels/drift.
When NOT to use: adding a new pattern (use adopt-pattern), or general code
review with no pattern claim in play.
Workflow
1. Inventory
List the catalog patterns the codebase implements. Match by shape, not name —
a class named RateLimiter may be a different pattern, and a circuit breaker may
exist unnamed. Hunt by shape: retry/backoff loops, lock or lease primitives,
caches with eviction, state enums with transition switches, ring/circular
buffers, breaker/trip counters, subscriber lists. Record the file(s) for each
candidate. Only inventory patterns the codebase actually engages; do not pad the
audit with absent ones.
2. Conformance — fetch the doc, never grade from memory
For each candidate, fetch the canonical doc page and read Core Idea (the
invariant), When NOT to Use, and Production Proof (the reference shape). Then
read the actual implementation. Grade against the doc's headline invariant.
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.
- 6d ago First seen · 122 lines · 149 tokens per session scan A b80cc7b8ce9b
audit-pattern is a skill published in the GitHub repository Totoro-jam/battle-tested-patterns (340 stars, last pushed yesterday), licensed MIT. It adds 149 tokens to every session and 1,391 once invoked, about $0.0007 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
golang
Idiomatic Golang design patterns — functional options, constructors, error flow and cascading, resource management and lifecycle, graceful shutdown, resilience, architecture, dependency injection, data handling, streaming, and more. Apply when explicitly choosing between architectural patterns, implementing functional…
oh-my-posh
Install, configure, or troubleshoot Oh My Posh/ohmyposh: shell init, themes, segments, Nerd Font icons, and prompt setup on PowerShell, zsh, bash, or fish.
ax-go-gen
Use when writing Go code with github.com/ax-llm/ax/packages/go for AxGen programs, forward calls, indexed multi-sampling, result pickers, streaming, tools, assertions, traces, usage, and output parsing.
ax-go-llm
Use when writing Go code with github.com/ax-llm/ax/packages/go for using the generated Ax package, factory functions, package docs, examples, and API reference.
ax-go-audio
Use when writing Go code with github.com/ax-llm/ax/packages/go for audio input/output, OpenAI Responses audio mapping, realtime event folding, and generated package audio examples.
golang-gomlx
Machine learning models training and inference using GoMLX for Go. It provides an abstraction to create vectorized computation graphs, that can then be JIT-compiled (Just-In-Time) and executed very fast, with backends using XLA (for CPU/CUDA/TPU), Go and others. Includes a reach set of vector (tensors) operations on…