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 commands/shaheerkhawaja/productionos/debuggit clone --depth 1 https://github.com/ShaheerKhawaja/ProductionOSWhat 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.00025 | $0.00615 |
| Opus 5 | $0.00013 | $0.00308 |
| Sonnet 5 | $0.00005 | $0.00123 |
| Haiku 4.5 | $0.00003 | $0.00061 |
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 3d 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
/debug — Systematic Debugging
Reproduce. Hypothesize. Test. Narrow. Fix. Never guess-and-check.
Step 0: Preamble
Run templates/PREAMBLE.md.
Step 1: Reproduce
Make the bug happen consistently:
# Run the failing test/command
# Capture the exact error output
# Note: environment, branch, recent changes
If you cannot reproduce: STOP. You cannot fix what you cannot see.
Step 2: Gather Evidence
# Recent changes that might have caused this
git log --oneline -10
# Files most recently modified
git diff --name-only HEAD~5
# Error logs
grep -r "Error\|Exception\|FAIL" logs/ 2>/dev/null | tail -20
Step 3: Generate Hypotheses
Based on evidence, generate up to $ARGUMENTS.max_hypotheses hypotheses:
| # | Hypothesis | Evidence For | Evidence Against | Test |
|---|-----------|-------------|-----------------|------|
| 1 | {cause} | {what supports this} | {what contradicts} | {how to verify} |
| 2 | ... | ... | ... | ... |
Rules:
- Rank by likelihood (most likely first)
- Each hypothesis must be testable
- Each test must be quick (< 2 min)
Step 4: Test Hypotheses
For each hypothesis, starting with most likely:
- Design a test that would confirm or eliminate it
- Run the test
- Record: CONFIRMED or ELIMINATED
- If confirmed: proceed to fix
- If eliminated: move to next hypothesis
Step 5: Fix
Once root cause identified:
- Make the MINIMUM change to fix the bug
- Run the original reproduction to verify fix
- Write a regression test
- Check for similar bugs elsewhere (same pattern)
Agent References
- Dispatch
self-healerfor automated fix attempt - Dispatch
code-reviewerto verify fix quality - Dispatch
test-architectto design regression test
Self-Eval
Run templates/SELF-EVAL-PROTOCOL.md:
- Is the root cause identified with evidence? (not guessed)
- Does the fix address the root cause? (not a symptom)
- Is there a regression test?
- Were similar bugs checked?
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.
- 3d ago First seen · 81 lines · 25 tokens per session scan A 2bc94275d5a2
debug is a command published in the GitHub repository ShaheerKhawaja/ProductionOS (8 stars, last pushed 4mo ago), licensed MIT. It adds 25 tokens to every session and 615 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-31.
Other commands, from other repositories
rekindle
Recover a fellowship after a session crash. Scans worktrees and state files, presents a recovery dashboard, and re-spawns Gandalf with recovered quest context. Use when returning to a crashed or expired fellowship session.
settings
View or edit fellowship configuration (/.claude/fellowship.json). Run /settings to see current settings, change values, or reset to defaults.
validate-docs
Validate that site and README documentation is current. Report-only — flags issues without modifying anything.
chronicle
One-time codebase onboarding — interactively extracts your team's conventions, identifies reference files, and generates CLAUDE.md sections so Claude codes the way your team does. Run once per project.
guide
Interactive guide to fellowship. Walks you through a real task using the structured research-plan-implement flow, then shows you what's next.
red-book
Use after receiving PR review feedback. Extracts conventions from reviewer comments and offers to add them to CLAUDE.md. Closes the convention learning loop.