Brooks Audit
hyhmrright/brooks-lint
Architecture audit that maps module dependencies, checks layering integrity, and flags structural decay across a codebase, drawing on twelve classic engineering books.
Audits a codebase's existing patterns, such as rate limiters, circuit breakers and caches, against canonical invariants and flags mislabeled or divergent ones.
$ npx skills add Totoro-jam/battle-tested-patterns --skill audit-pattern -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Totoro-jam/battle-tested-patterns audit-pattern --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/Totoro-jam/battle-tested-patterns.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/pattern-skills/skills/audit-pattern .claude/skills/audit-pattern && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "audit-pattern" agent skill from https://github.com/Totoro-jam/battle-tested-patterns/tree/main/plugins/pattern-skills/skills/audit-pattern into .claude/skills/audit-pattern/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "audit-pattern", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/Totoro-jam/battle-tested-patterns/tree/main/plugins/pattern-skills/skills/audit-patternType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add Totoro-jam/battle-tested-patterns --skill audit-pattern -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Totoro-jam/battle-tested-patterns audit-pattern --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Totoro-jam/battle-tested-patterns.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/pattern-skills/skills/audit-pattern .agents/skills/audit-pattern && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "audit-pattern" agent skill from https://github.com/Totoro-jam/battle-tested-patterns/tree/main/plugins/pattern-skills/skills/audit-pattern into .agents/skills/audit-pattern/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "audit-pattern", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Totoro-jam/battle-tested-patterns --skill audit-pattern -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Totoro-jam/battle-tested-patterns audit-pattern --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Totoro-jam/battle-tested-patterns.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/pattern-skills/skills/audit-pattern .cursor/skills/audit-pattern && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "audit-pattern" agent skill from https://github.com/Totoro-jam/battle-tested-patterns/tree/main/plugins/pattern-skills/skills/audit-pattern into .cursor/skills/audit-pattern/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "audit-pattern", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/Totoro-jam/battle-tested-patterns.git --path plugins/pattern-skills/skills/audit-pattern--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add Totoro-jam/battle-tested-patterns --skill audit-pattern -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Totoro-jam/battle-tested-patterns audit-pattern --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Totoro-jam/battle-tested-patterns.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/pattern-skills/skills/audit-pattern .gemini/skills/audit-pattern && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "audit-pattern" agent skill from https://github.com/Totoro-jam/battle-tested-patterns/tree/main/plugins/pattern-skills/skills/audit-pattern into .gemini/skills/audit-pattern/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "audit-pattern", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install Totoro-jam/battle-tested-patterns audit-patternInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add Totoro-jam/battle-tested-patterns --skill audit-pattern -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Totoro-jam/battle-tested-patterns.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/pattern-skills/skills/audit-pattern .github/skills/audit-pattern && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "audit-pattern" agent skill from https://github.com/Totoro-jam/battle-tested-patterns/tree/main/plugins/pattern-skills/skills/audit-pattern into .github/skills/audit-pattern/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "audit-pattern", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Totoro-jam/battle-tested-patterns --skill audit-pattern -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Totoro-jam/battle-tested-patterns audit-pattern --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Totoro-jam/battle-tested-patterns.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/pattern-skills/skills/audit-pattern .opencode/skills/audit-pattern && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "audit-pattern" agent skill from https://github.com/Totoro-jam/battle-tested-patterns/tree/main/plugins/pattern-skills/skills/audit-pattern into .opencode/skills/audit-pattern/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "audit-pattern", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
audit-patternAudits a codebase's existing patterns, such as rate limiters, circuit breakers and caches, against canonical invariants and flags mislabeled or divergent ones.
The audit grades what the code actually does, not what it calls itself. The agent inventories the catalog patterns the codebase implements by shape, since a class named RateLimiter might be another pattern and a circuit breaker might have no label at all. For each candidate it fetches the canonical doc page, reads the core idea, when not to use it and the production reference, then reads the implementation and grades it against the headline invariant.
The most useful finding is the mislabel: a semaphore that is really a mutex, or an MVCC that keeps a single version, because those claims lead developers to expect guarantees the code does not give. Verdicts separate faithful implementations, ones that meet the intent another way, ones a framework enables without providing, and ones that are really a different pattern. The skill also reports catalog patterns that are absent. Its companion adopt-pattern adds new patterns, and general code review without a pattern claim is out of scope.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 660e0e9. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Pattern Conformance Audit loads about 1.6k tokens when it runs. Until then it costs about 183 tokens; SKILL.md has 651 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from Totoro-jam/battle-tested-patterns at commit 660e0e9, republished under its MIT licence (© Totoro-jam). 651 words, ~1,561 tokens.
.claude/skills/audit-pattern/SKILL.md (or your agent's skills folder).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).
<pattern>?" or "do we honor X's invariants?".When NOT to use: adding a new pattern (use adopt-pattern), or general code
review with no pattern claim in play.
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.
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.
Assign a verdict (scale below). The judgment is distinguishing faithful from divergent from mislabeled:
Every verdict cites a file:line in the codebase and the doc invariant it was
graded against. A verdict without a citation is an opinion, not an audit.
| Symbol | Meaning |
|---|---|
| ✅ | Faithful — honors the doc's headline invariant. |
| 🟡 | Intent met, model/algorithm diverges from the reference. |
| 🔵 | Enabled, not provided — the developer brings it. |
| 🔁 | Mislabeled — it is actually a different catalog pattern. |
| ⚪ | Absent / N-A — not present (only a gap if the pattern is needed). |
Produce one table, optionally grouped by catalog category:
| Pattern | Verdict | Evidence & note |
|---|---|---|
| name | sym | path:line — one-line check against the doc's invariant |
Then 2–4 headline findings, leading with the mislabels (🔁) and real gaps — those are what the audit is for. Faithful rows are reassurance, not the point.
file:line — an audit is evidence, not vibes.Auditing an HTTP/MCP framework:
| Pattern | Verdict | Evidence & note |
|---|---|---|
| Actor Model | ✅ | in-memory-runtime.ts:144,156 — per-identity serialized turns; handler gets a clone, rollback on throw. |
| Semaphore | 🔁 | redis-actor-runtime.ts:18 — the lease is SET NX (count=1) = mutex; the doc routes max=1 → mutex. |
| MVCC | 🟡 | in-memory-runtime.ts:113 — lease-free reads never block writers, but only one version is kept (snapshot read, not multi-version). |
| Circuit Breaker | ⚪ | Absent across all packages — a real gap for an outbound-heavy framework. |
Headline: two over-claims (Semaphore→mutex, MVCC→single-version) that would mislead a developer expecting counting-semaphore or multi-version guarantees; one genuine gap (no circuit breaker).
© Totoro-jam, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in plugins/pattern-skills/skills/audit-pattern of Totoro-jam/battle-tested-patterns.
Open the folder on GitHubat commit 660e0e9
Pattern Conformance Audit next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Pattern Conformance Audit this skillTotoro-jam/battle-tested-patterns | 344 | — | ~1.6k | Automated safety check: Pass | MIT | |
| Brooks Audithyhmrright/brooks-lint | 1.5k | 1 repos | ~537 | Automated safety check: Pass | MIT | |
| Component Design PrinciplesdavidYichengWei/agentic-engineering-framework | 158 | — | ~1k | Automated safety check: Pass | MIT | |
| Backend Code Reviewlanggenius/dify | 158k | — | ~676 | Automated safety check: Pass | Custom licence | |
| Code Review Skillawesome-skills/code-review-skill | 2.1k | — | ~2.8k | Automated safety check: Notes | MIT | |
| Architecture PatternsKartikLabhshetwar/better-shot | 2.4k | 2 repos | ~1.4k | Automated safety check: Pass | Custom licence |
hyhmrright/brooks-lint
Architecture audit that maps module dependencies, checks layering integrity, and flags structural decay across a codebase, drawing on twelve classic engineering books.
davidYichengWei/agentic-engineering-framework
Chinese-language checklists for component-level design: class and module structure, public interfaces, data models, concurrency and error handling.
langgenius/dify
Reviews backend code under api/ for concrete, reproducible defects, routes to rule packs for architecture, schema, repositories and SQLAlchemy, and ranks findings from P0 to P3.
awesome-skills/code-review-skill
Provides comprehensive code review guidance for React 19, Vue 3, Angular 17+, Svelte 5, Rust, TypeScript, Java, Java 8, PHP, Ruby, Rails, Python, Django, FastAPI, Go, C/.NET, Kotlin, Swift, Dart…
KartikLabhshetwar/better-shot
Deep dive into software architecture for macOS. An agent skill from KartikLabhshetwar/better-shot.
pascalorg/editor
Reviews a pull request against the Pascal editor's architectural rules: package boundaries, registry-driven node composition, hook hygiene and selector performance.
Totoro-jam/battle-tested-patterns
Matches a coding problem to one of 46 documented systems patterns, checks that it really fits, then adapts it into your codebase with a test for its invariant.
Totoro-jam/battle-tested-patterns
Step-by-step workflow for adding a new pattern to the battle-tested-patterns repo: validate the topic, verify sources, write the doc, code and exercises.
Totoro-jam/battle-tested-patterns
Verify all production proof source links in pattern documents.
Totoro-jam/battle-tested-patterns
Walks the agent through a fixed loop for failing tests and build errors: reproduce, isolate, hypothesize, instrument, fix, verify, then add a regression test.
Categories
Audits a codebase's existing patterns, such as rate limiters, circuit breakers and caches, against canonical invariants and flags mislabeled or divergent ones. The audit grades what the code actually does, not what it calls itself. The agent inventories the catalog patterns the codebase implements by shape, since a class named RateLimiter might be another pattern and a circuit breaker might have no label at all.
Pattern Conformance Audit fits situations like: checking whether the patterns a codebase claims to implement are implemented correctly; answering whether a class called a semaphore or MVCC store is really that pattern; running a periodic conformance check after a release to catch drift.
Run `npx skills add Totoro-jam/battle-tested-patterns --skill audit-pattern -a claude-code`. Or copy the skill folder (plugins/pattern-skills/skills/audit-pattern in Totoro-jam/battle-tested-patterns) into .claude/skills/audit-pattern in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Totoro-jam/battle-tested-patterns --skill audit-pattern -a codex`. Or copy the skill folder (plugins/pattern-skills/skills/audit-pattern in Totoro-jam/battle-tested-patterns) into .agents/skills/audit-pattern in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Totoro-jam/battle-tested-patterns --skill audit-pattern -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/audit-pattern, .gemini/skills/audit-pattern, .github/skills/audit-pattern and .opencode/skills/audit-pattern in your project.
SKILL.md names no scripts, command-line tools or credentials: Pattern Conformance Audit is instructions for the agent only. Our summary lists: Network access to fetch the pattern catalog's doc pages.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Pattern Conformance Audit is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.6k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Pattern Conformance Audit: Brooks Audit (hyhmrright/brooks-lint, 1.5k stars), Component Design Principles (davidYichengWei/agentic-engineering-framework, 158 stars), Backend Code Review (langgenius/dify, 158k stars) and Code Review Skill (awesome-skills/code-review-skill, 2.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Totoro-jam (a GitHub user) maintains it in Totoro-jam/battle-tested-patterns, which has 344 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on September 4, 2026.
Source: Totoro-jam/battle-tested-patterns on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.