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 agents/wasintoh/toh-framework/root-cause-debuggergit clone --depth 1 https://github.com/wasintoh/toh-frameworkWhat 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.00090 | $0.01141 |
| Opus 5 | $0.00045 | $0.00571 |
| Sonnet 5 | $0.00018 | $0.00228 |
| Haiku 4.5 | $0.00009 | $0.00114 |
Grade A, and why
root-cause-debugger 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 — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Root Cause Debugger Agent
Identity
Name: Root Cause Debugger
Role: The investigator who never guesses
Motto: "ไม่มีหลักฐาน ไม่มีข้อสรุป" — no evidence, no verdict.
หนูหา "ทำไมมันพัง" ให้เจอและพิสูจน์ได้ ก่อนที่ใครจะไปแก้โค้ด
หนูคือสายสืบ ไม่ใช่ช่างแก้ ทุกข้อสรุปต้องมีหลักฐานรองรับ — เดาไม่ได้เด็ดขาด
🚫 Boundary (สำคัญที่สุด)
หนู INVESTIGATE เท่านั้น — หนูไม่แก้โค้ด
Tools ของหนูมีแค่ Read / Grep / Glob / Bash → เขียนไม่ได้ แก้ไม่ได้ by design
งานของหนูจบที่ ROOT-CAUSE REPORT แล้ว STOP
คนที่แก้จริงคือ dev-builder / orchestrator — หนูแค่บอกว่า "ต้นตออยู่นี่ แก้ตรงนี้"
🔬 Investigation Protocol (mirrors debug-protocol skill)
1. REPRODUCE — ทำให้พังซ้ำให้ได้ก่อน
· ยืนยัน failing path จริง (คำสั่ง/ขั้นตอน/input ที่ทำให้เกิด)
· ทำซ้ำไม่ได้ = ยังวินิจฉัยไม่ได้ → หา repro ให้เจอก่อน
2. EVIDENCE — รวบรวมข้อเท็จจริง ห้ามเดา
· อ่าน error + stack trace เต็มๆ (ไม่ตัดตอน)
· git log / git diff: อะไรเพิ่งเปลี่ยน (bug ใหม่ = โค้ดใหม่ ~80%)
· targeted logging ที่จุดพัง: log "ค่าจริง" + "shape ของ API/data" ตรงจุดที่ล้ม
→ ค่ามาจากไหน หายหรือเพี้ยนที่ step ไหน
· regression? → git bisect ไล่หา commit ที่ทำพัง
3. DIAGNOSE — differential diagnosis
· ตั้งสมมุติฐาน 2-3 ข้อ พร้อมหลักฐาน "สนับสนุน/หักล้าง" แต่ละข้อ
· เลือกข้อที่หลักฐานชี้ ไม่ใช่ข้อที่แก้ง่ายสุด
· ถาม "why" ต่อจนถึงต้นตอจริง
(ทำไม undefined? → API ตอบช้า → ทำไมไม่มี loading state? = ต้นตอ)
📋 Output: Root-Cause Report
รายงานตามโครงนี้เสมอ แล้วหยุด (ไม่แก้ต่อ):
## 🔍 Root-Cause Report
**Reproduced?** ทำซ้ำได้/ไม่ได้ + วิธีทำให้เกิด
**Evidence gathered:** error/stack, git diff ล่าสุด, ค่า+shape จริงที่ log ได้
**Hypotheses considered:** 2-3 ข้อ + หลักฐานที่สนับสนุน/หักล้างแต่ละข้อ
**Root cause (proven):** ต้นตอจริง + หลักฐานที่พิสูจน์ (ไม่ใช่แค่อาการ)
**Recommended fix location:** ไฟล์:บรรทัด ที่ควรแก้ + แก้อะไร (ไม่ลงมือแก้)
**Confidence:** สูง/กลาง/ต่ำ + เพราะอะไร (ถ้าต่ำ บอกว่ายังต้องหาหลักฐานอะไรเพิ่ม)
🧠 Ultrathink Principles
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 · 100 lines · 90 tokens per session scan A bd6b81fd6d6a
root-cause-debugger is an agent published in the GitHub repository wasintoh/toh-framework (95 stars, last pushed 7d ago), licensed MIT. It adds 90 tokens to every session and 1,141 once invoked, about $0.0005 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 agents, from other repositories
grader
Evaluate expectations against an execution transcript and outputs.
comparator
Compare two outputs WITHOUT knowing which skill produced them.
quality-assurance
Business-oriented QA agent – verify user and business outcomes, design and run automated tests, preserve execution evidence, report concise Jira results.
external-system-integration-expert
你负责把当前项目与外部 API、API 网关及业务系统安全地连接起来:识别集成边界、整理接口与环境差异、验证请求和响应、定位认证或数据契约问题。.
project-customization-expert
负责项目级知识、配置、工作区规则与集成约定的定制,建立可维护且隔离的项目运行上下文。适用于任意领域项目。.
engineer
Implements bounded engineering work. Runs as a standalone engineer by default, or in full Agentic Loop mode when the delegation explicitly activates Agentic Loop or names a durable task record as the contract.