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/wasintoh/toh-framework/toh-fixgit clone --depth 1 https://github.com/wasintoh/toh-frameworkWrote 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/commands/wasintoh/toh-framework/toh-fix)<a href="https://agentmods.dev/commands/wasintoh/toh-framework/toh-fix"><img src="https://agentmods.dev/badge/commands/wasintoh/toh-framework/toh-fix.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00013 | $0.01308 |
| Opus 5 | $0.00006 | $0.00654 |
| Sonnet 5 | $0.00003 | $0.00262 |
| Haiku 4.5 | $0.00001 | $0.00131 |
Grade A, and why
toh-fix 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 4d 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 — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/toh-fix — Evidence-First Bug Fixing 🔧
/toh-fix [error or problem]
/toh-f [error or problem]
🧭 IRON RULE
อย่าแตะโค้ดจนกว่าจะบอก root cause ได้พร้อมหลักฐาน. ห้ามเดา ห้ามกดอาการ (
undefined→ ใส่?.) แล้วเรียกว่าแก้แล้ว ถ้ายังบอกไม่ได้ว่า "พังเพราะอะไร" = ยังไม่ถึงเวลาแก้ ให้ไปหาหลักฐานต่อ
เมื่อร่องรอยตัน / ยังไม่รู้สาเหตุ → delegate การสืบสวนให้ agent root-cause-debugger
(agent สาย investigate อย่างเดียว: อ่าน log / git / data flow แล้วรายงานสาเหตุกลับมา — ไม่แก้โค้ดเอง)
Protocol: REPRODUCE → EVIDENCE → DIAGNOSE → FIX → PROVE
1. REPRODUCE — ทำให้พังซ้ำก่อน
ทำให้ bug เกิดขึ้นบนเจตนา ก่อนคิดแก้เสมอ. รู้ path/URL/action ที่ทำให้พัง แล้วเห็นมันพังกับตา ถ้าทำซ้ำไม่ได้ = ยังแก้ไม่ได้ — บอกตรงๆ แล้วขอข้อมูลเพิ่ม (steps, env, ข้อมูลที่ใช้, screenshot)
2. EVIDENCE — เก็บหลักฐาน (ห้ามเดา)
- อ่าน error + stack trace เต็มๆ — ไฟล์ไหน บรรทัดไหน เรียกมาจากไหน
git log/git diff— อะไรเพิ่งเปลี่ยน (bug ใหม่ = โค้ดใหม่ ~80%)- ตาม data flow ด้วย log/debugger จริง — ค่ามาจากไหน, ตอนถึงจุดพังค่าเป็นอะไรจริงๆ, มันหายที่ step ไหน
3. DIAGNOSE — differential diagnosis
เขียนสมมุติฐาน 2–3 ข้อ แต่ละข้อมี หลักฐานสนับสนุน + หักล้าง → เลือกข้อที่ หลักฐานชี้ ไม่ใช่ข้อที่แก้ง่ายสุด → ถาม "ทำไม" ต่อจนถึงต้นตอ (ทำไม undefined? → API ตอบช้า → ทำไมไม่มี loading state?)
4. FIX — แก้ที่ต้นตอ
แก้ root cause ที่จุดเดียว. จะเสริม defensive guard ตรงจุดที่อาการโผล่ก็ได้ แต่ guard ไม่ใช่การแก้ — ต้นตอต้องหาย
5. PROVE — พิสูจน์ว่าหาย
รันเส้นทางเดิมที่พังซ้ำ + เส้นทางข้างเคียงที่อาจโดนกระทบ แล้วค่อยรายงาน (ไม่ใช่ "น่าจะได้แล้ว")
🔁 Rewrite Rule
เสนอเขียนใหม่เมื่อ พิสูจน์ได้ว่า design ผิด เท่านั้น — ไม่ใช่นับจำนวนรอบที่ลอง "ลองมาหลายรอบแล้วเลยลบทิ้ง" = ยอมแพ้ ไม่ใช่วิศวกรรม. ถ้าหา evidence เป็นระบบ ส่วนใหญ่จบใน 1–2 attempt
🔍 Common Root Causes
หาสาเหตุจริง แล้ว พิสูจน์ — ไม่ใช่แปะ fix สำเร็จรูป
| Symptom | สาเหตุจริงที่พบบ่อย | วิธี PROVE |
|---|---|---|
Cannot read property X of undefined |
ไม่มี loading state / API response shape เปลี่ยน / race condition | ตอน render มีข้อมูลจริงไหม? log ค่า + shape ของ API response จริง; พังเฉพาะ network ช้า (หรือเร็ว) ไหม? |
Type X is not assignable to Y |
type ที่ประกาศไว้ โกหก runtime shape จริง | log/inspect ค่า runtime จริง เทียบกับ type ที่ประกาศ — อันไหนตรงความจริง |
| Hydration mismatch | server กับ client render ต่างกัน (Date.now/Math.random/window/locale) |
หาให้เจอว่า อะไร ที่ต่างระหว่าง server render กับ client render |
Module not found |
path ผิด / ยังไม่ได้ install / case-sensitivity | เช็ค path ไฟล์จริงกับ package.json — ชื่อ/ตัวพิมพ์ตรงกันไหม |
| ทำงานบนเครื่อง แต่ build พัง | type-check เข้มกว่า / env var หาย / dynamic import | อ่าน error ตอน build จริง อย่าเดา ว่าเป็นอะไร |
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.
- 4d ago First seen · 101 lines · 13 tokens per session scan A 1df1d58084e9
toh-fix is a command published in the GitHub repository wasintoh/toh-framework (95 stars, last pushed yesterday), licensed MIT. It adds 13 tokens to every session and 1,308 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 commands, from other repositories
brainstorm
Command dispatcher for brainstorm.
start
Operate in Agentic Loop mode: create or refine the durable task record, route maintainer, engineer, and auditor roles, verify evidence, certify the finished work unit, and close out according to the project backend.
plan
Command dispatcher for plan.
planflow
Draft a plan and get it approved as an editable flowchart in the browser before executing.
hello
Trivial hello command from example. Used to verify plugin installation works end-to-end.
github-modes
This document describes all GitHub integration modes available in Claude-Flow with ruv-swarm coordination. Each mode is optimized for specific GitHub workflows and includes batch tool integration for maximum efficiency.