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/diagnose/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/diagnose)<a href="https://agentmods.dev/skills/totoro-jam/battle-tested-patterns/diagnose"><img src="https://agentmods.dev/badge/skills/totoro-jam/battle-tested-patterns/diagnose/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/diagnose"><img src="https://agentmods.dev/badge/skills/totoro-jam/battle-tested-patterns/diagnose.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.00025 | $0.00319 |
| Opus 5 | $0.00013 | $0.00160 |
| Sonnet 5 | $0.00005 | $0.00064 |
| Haiku 4.5 | $0.00003 | $0.00032 |
Grade A, and why
diagnose 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 10d 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
Diagnose a Failure
You are debugging a test failure or build error in this project. Follow the structured loop — do NOT jump to a fix without reproducing first.
Loop
1. Reproduce
Run the failing command and capture the exact error:
pnpm test # All tests (docs + exercises in TS/Rust/Go/Python)
pnpm test:rust # Rust only
pnpm test:go # Go only
pnpm test:python # Python only (auto-finds Python ≥ 3.10)
pnpm build # VitePress
2. Isolate
Narrow down to the smallest failing unit:
- Which test file?
- Which test case?
- Which assertion?
3. Hypothesize
State your hypothesis in one sentence before changing any code.
4. Instrument
Add minimal logging or assertions to confirm/deny your hypothesis. Do NOT change production code yet.
5. Fix
Apply the minimal fix. Change as little as possible.
6. Verify
Run the full test suite, not just the failing test:
pnpm test && pnpm build
If it still fails, return to step 1 with what you learned.
7. Regression Test
If the bug was non-trivial, add a test that would have caught it.
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.
- 10d ago First seen · 54 lines · 25 tokens per session scan A 65261c909bb9
diagnose is a skill published in the GitHub repository Totoro-jam/battle-tested-patterns (341 stars, last pushed 5d ago), licensed MIT. It adds 25 tokens to every session and 319 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-30.
Other skills, from other repositories
pinchtab-dev
Develop and contribute to the PinchTab project. Use when working on PinchTab source code, adding features, fixing bugs, running tests, or preparing PRs. Triggers on "work on pinchtab", "pinchtab development", "contribute to pinchtab", "fix pinchtab bug", "add pinchtab feature".
debugging-failures
Diagnose a failing Ginkgo suite as an agent — always run with --json-report into a predictable temp/gitignored location, read the terminal verdict line, then use jq to extract structured failure details (name, message, file:line, panic value, captured logs). Covers the panicked-vs-failed trap, panic locations pointing…
verify-bug
Post-merge UAT verification workflow. Walks JIRA reproduce steps, performs comparative audits (Before/After), attaches evidence to JIRA, and transitions status on PASS.
quality-engineering-test-healing
Failure taxonomy and allowed/forbidden repairs for a failing E2E test. Use when a Playwright/Maestro/Detox/XCUITest/Espresso/Appium test fails and you must decide whether to repair the test or route to a real bug.
config-loader-helper
Diagnose configuration-related failures, enumerate required env vars, and guide safe local test setup (no secrets).
fix-suggester
Diagnose failures and propose minimal, test-backed fixes with verification and rollback instructions.