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/genai-io/san/debugnpx skills add genai-io/san --skill debuggit clone --depth 1 https://github.com/genai-io/sanWhat 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.00084 | $0.00696 |
| Opus 5 | $0.00042 | $0.00348 |
| Sonnet 5 | $0.00017 | $0.00139 |
| Haiku 4.5 | $0.00008 | $0.00070 |
Grade A, and why
debug 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.
How it starts
The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Debug: root cause before fix
The iron law: no fix without a root cause first. Patching a symptom you don't understand turns one bug into whack-a-mole — every blind fix makes the next bug harder to find. Find why it breaks, then fix that.
Phase 1: Investigate
Gather evidence before forming any hypothesis.
- Collect the symptoms. Read the exact error, stack trace, and the steps that trigger it. If you don't have enough to reproduce, ask the user one precise question at a time — don't guess your way forward.
- Trace the code path. From the symptom, work backward toward possible
causes:
Grepfor the call sites,Readthe logic. Understand what the code actually does before theorizing about why it's wrong. - Check what changed.
git log --oneline -20 -- <affected files>and read the recent diffs. If it worked before, the cause is almost certainly in a change — a regression narrows the search to the diff. - Reproduce it deterministically. Get to a command or test that fails every time. If you can't reproduce it reliably, you don't yet understand it — gather more evidence before going further. An intermittent bug reproduced is half solved.
End Phase 1 with one sentence: "Root cause hypothesis: …" — a specific, testable claim about what is wrong and why, not a vague area of suspicion.
Phase 2: Test the hypothesis
- Confirm the cause directly: a failing assertion, a log at the suspect line, a minimal snippet that isolates it. Prove the hypothesis before acting on it.
- If the evidence contradicts the hypothesis, discard it and return to Phase 1. Do not bend the evidence to fit a theory you're attached to.
- Lock scope to the module the root cause lives in. Resist "while I'm here" edits to unrelated code — they widen the blast radius and hide the real fix.
Phase 3: Fix and prove it
- Write a test that reproduces the bug and fails for the right reason.
- Make the smallest change that addresses the cause — not the symptom, not a nearby cleanup. If a proper fix is large or risky, present the options and ask.
- Run the new test (now green) and the surrounding suite (still green). The regression test stays, so this exact bug cannot come back silently.
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 · 64 lines · 84 tokens per session scan A b2557159d9e3
debug is a skill published in the GitHub repository genai-io/san (75 stars, last pushed 5d ago), licensed Apache-2.0. It adds 84 tokens to every session and 696 once invoked, about $0.0004 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
bug-fix
Bug fix workflow. Use when: fixing bugs, resolving issues, regression fixes. Not for: new features (use feature-dev), understanding code (use code-explore). Output: fix + regression test + review gate.
bubbletea-testing
Use this skill whenever writing tests for Bubble Tea (charmbracelet/bubbletea) TUI applications in Go. Triggers include any mention of testing Bubble Tea models, teatest, golden file testing for TUIs, testing tea.Cmd or tea.Msg, snapshot testing terminal output, or writing tests for any Go CLI/TUI that uses the Elm…
check-coverage
Comprehensive assessment of Unit / Integration / E2E three-layer test coverage, identify gaps and provide actionable recommendations.
modernize-tests
Modernize test suites to use modern Swift Testing features or migrate from XCTest.
python-testing
Python testing best practices using pytest including fixtures, parametrization, mocking, coverage analysis, async testing, and test organization. Use when writing or improving Python tests.
golang-testing
Go testing best practices including table-driven tests, test helpers, benchmarking, race detection, coverage analysis, and integration testing patterns. Use when writing or improving Go tests.