Borrowing it
Nothing to install: this file belongs to Totoro-jam/battle-tested-patterns. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Totoro-jam/battle-tested-patterns/main/.claude/skills/new-pattern/SKILL.mdgit 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/new-pattern)<a href="https://agentmods.dev/skills/totoro-jam/battle-tested-patterns/new-pattern"><img src="https://agentmods.dev/badge/skills/totoro-jam/battle-tested-patterns/new-pattern/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/totoro-jam/battle-tested-patterns/new-pattern"><img src="https://agentmods.dev/badge/skills/totoro-jam/battle-tested-patterns/new-pattern.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00039 | $0.01504 |
| Opus 5.5 | $0.00016 | $0.00602 |
| Sonnet 5.5 | $0.00008 | $0.00301 |
| Haiku 4.5 | $0.00004 | $0.00150 |
Grade A, and why
new-pattern scanned grade A with 1 finding 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 1mo 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
3. Verify with `curl -sI <url> | head -1` — must return HTTP 200 How it starts
The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Create a New Pattern
You are creating a new pattern for battle-tested-patterns. Follow each step in order. Do NOT skip source verification. Reference SOP 01 for the full checklist.
Step 1: Topic Validation
Ask these questions before proceeding:
- What is the pattern name?
- Can you name ≥ 2 production projects that use it (with source links)?
- Is it cross-language (not specific to one language/framework)?
- Is it a code-level technique (not purely architectural)?
- Does it NOT duplicate an existing pattern in
docs/patterns/?
If any answer is "no", stop and explain why this pattern doesn't fit.
Step 2: Source Code Location
For each production project:
- Search the project repo for the exact usage
- Get the GitHub URL with line numbers:
https://github.com/{org}/{repo}/blob/main/{path}#L{start}-L{end} - Verify with
curl -sI <url> | head -1— must return HTTP 200 - Read the code to confirm your understanding
- Write a Production Proof description specific enough to learn WITHOUT clicking the link
CRITICAL: Never fabricate a URL. If you cannot verify a link, write <!-- TODO: verify source link --> instead.
Step 3: Write the Document
Create docs/patterns/<pattern-name>/index.md with ALL required sections:
# Pattern: [Name]
## One Liner ← ≤ 30 English words, capture WHY not just WHAT
## Core Idea ← concept + diagram (choose best representation for this pattern)
## Production Proof ← table with ≥ 2 verified URLs, descriptions show HOW not just WHAT
## Implementation ← TypeScript (required) + ≥ 1 other language in ::: code-group
## Exercises ← table with basic + intermediate exercise links
## When to Use ← ≥ 3 concrete scenarios
## When NOT to Use ← ≥ 2 concrete alternatives
## More Production Uses ← bullet list with repo links
## Challenge Questions ← 3-4 scenario Q&A using ::: details syntax
Diagram Guidelines
- Choose the representation that best matches the pattern's nature:
- Ring/circular → for hash rings, ring buffers
- Timeline → for temporal patterns (WAL, MVCC, retry)
- State diagram → for state machines, circuit breakers (use mermaid)
- Tree → for tries, heaps, B-trees
- Box-and-arrow → for data structures (LRU, skip list)
- ASCII
textblocks: every box border must be vertically aligned - ZH docs: CJK characters = 2 display columns; compensate with fewer spaces
- Verify alignment in a monospace font before committing
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.
- 1mo ago First seen · 135 lines · 39 tokens per session scan A 2a63544ca241
new-pattern is a skill published in the GitHub repository Totoro-jam/battle-tested-patterns (343 stars, last pushed 1mo ago), licensed MIT. It adds 39 tokens to every session and 1,504 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
just
Prefer the nearest relevant justfile as the default command surface for build, test, lint, format, run, deploy, and repo automation workflows. Use when a repo or subproject has a justfile, or when the user mentions just, justfile, recipes, or Makefile-to-just migration.
comms-context
Fetch on-call and discussion context from Slack threads and PagerDuty incidents — participants, timeline, and status. Auto-loads on Slack permalinks or PagerDuty incident references. Keywords — Slack, thread, PagerDuty, on-call.
principle-communication
Caveman output mode — ultra-terse brief replies with fewer tokens. Strips filler, hedging, pleasantries. Three levels — caveman lite (default), caveman full, ultra caveman / max caveman (maximum compression). Persists until normal mode. Auto-load when the user requests terser output, says "be brief", "less tokens"…
herdr
Control or customize Herdr, a terminal multiplexer for coding agents. Use when the user explicitly mentions Herdr, asks about its local configuration or source, or asks to inspect or control panes, tabs, workspaces, commands, or another agent. Do not use merely because a task could benefit from a background terminal…
java-clean-comments
Enforces comment and Javadoc hygiene in Java — no commented-out code, no author or ticket metadata, no comments restating the code, and Javadoc that documents contracts rather than repeating signatures. Use when writing or reviewing Java comments and Javadoc, and when the code shows commented-out blocks, TODO or FIXME…
py-clean-comments
Use when writing, fixing, editing, or reviewing Python comments and docstrings. Enforces Clean Code principles—no metadata, no redundancy, no commented-out code. Also trigger on: commented-out code blocks, TODO/FIXME banners, author/ticket/date metadata in comments, docstrings that no longer match the code, redundant…