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/curtischoutw/claude-institution/debug-protocolnpx skills add curtischoutw/claude-institution --skill debug-protocolgit clone --depth 1 https://github.com/curtischoutw/claude-institutionWrote 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/curtischoutw/claude-institution/debug-protocol)<a href="https://agentmods.dev/skills/curtischoutw/claude-institution/debug-protocol"><img src="https://agentmods.dev/badge/skills/curtischoutw/claude-institution/debug-protocol.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.00074 | $0.01276 |
| Opus 5 | $0.00037 | $0.00638 |
| Sonnet 5 | $0.00015 | $0.00255 |
| Haiku 4.5 | $0.00007 | $0.00128 |
Grade A, and why
debug-protocol scanned grade A with 1 finding 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- 找到一條指令能穩定重現失敗(測試指令、curl、script)。貼出失敗輸出。 What it actually says
debug-protocol:系統化除錯
核心原則:一次一個假設,一個假設一個最小改動,改完立刻驗證。 沒有失敗重現指令之前,不准動任何程式碼。
步驟
1. 重現(沒有這步就沒有下一步)
- 找到一條指令能穩定重現失敗(測試指令、curl、script)。貼出失敗輸出。
- 無法穩定重現 → 先解決重現問題(加 log、固定 seed、記錄環境),不要修「猜的 bug」。
2. 建立假設日誌
在回覆中(或 scratchpad)維護一張表,之後每輪更新:
| # | 假設 | 驗證方式 | 結果 |
|---|------|---------|------|
| 1 | token 過期沒被 refresh | 在 refresh 處加 log 重跑 | 排除:有進 refresh |
2.5 假設從哪來(想不出假設時照此優先序)
- 最近改動優先:
git log -p <相關檔>、git diff main——大多數新 bug 來自新改動。 - 差異分析:能重現與不能重現的情境差在哪(環境、輸入、版本、時序)?差異處就是嫌疑處。
- 按症狀查常見嫌疑:
- 間歇性失敗 → 時序/競態、共享狀態、外部依賴逾時
- 邊界值出錯 → off-by-one、型別轉換、空集合/None
- 只在某環境出錯 → 設定、路徑、版本、環境變數
- 以上都想不出 → 用二分縮小範圍(git bisect 或註解掉一半邏輯),別憑空猜。
3. 驗證假設(先觀察,後修改)
- 優先用「唯讀」手段驗證:讀碼、加 log、下斷點、bisect(
git bisect或手動二分註解)。 - 假設被證實之後才改程式碼;改動必須是針對該假設的最小修改。
4. 每輪改動後
- 重跑步驟 1 的重現指令。
- 沒修好 → 把這輪改動 revert 乾淨(不留半套修改疊加),更新假設日誌,回步驟 2。
停損規則(3-strike)
連續 3 輪修改都失敗時,強制停手,依序做:
git checkout/ revert 回最後乾淨狀態。- 寫下:已排除的假設清單、目前掌握的事實、還沒看過的區域。
- 擴大情報面(擇一):
- 往上游讀更多程式碼(呼叫鏈、設定載入、初始化順序)
- 用
git log -p <file>查該區域最近改動 - 開一個 subagent 平行調查另一條假設線
git bisect找出引入問題的 commit
- 帶著新事實重新進 plan mode 再開始。
- 若再 3 輪仍失敗 → 停止,如實向使用者回報:事實、已排除假設、卡點、建議方向。如實回報卡住遠優於硬掰一個「可能修好了」。
修好之後(缺一不可)
- 用一句話說出根因(說不出根因 = 可能只是碰巧不噴錯了,回步驟 2)。
- 加一個會在此 bug 回歸時失敗的測試。
- 跑 /done-check(其固定模板已含「已驗證:/範圍外發現:/AUTH:」三個逐字必填欄位)。
- 檢查修法是不是貼補:自問「知道根因後,這是優雅解嗎?」
除錯過程中最常踩到 hard-rules #4:查根因時會看到一堆順眼想改的東西。一律記到
tasks/todo.md 不順手修,並在收工回報寫「範圍外發現: <項目,或「無」>」。
禁止事項
- 禁止一輪改多個地方然後「看哪個有效」。
- 禁止用 try/except 吞掉錯誤來「修好」。
- 禁止沒讀過相關程式碼就套 Stack Overflow / 訓練記憶裡的通用解。
- 禁止修改測試的預期值來讓測試通過(除非能證明測試本身錯,且在總結中說明)。
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 · 74 lines · 74 tokens per session scan A 8a70ec629464
debug-protocol is a skill published in the GitHub repository curtischoutw/claude-institution (5 stars, last pushed 6d ago), licensed MIT. It adds 74 tokens to every session and 1,276 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
fable-method
A step-by-step problem-solving loop (classify the ask, define done, gather evidence, decide, act surgically, verify by observation, report outcome-first). Use when the user says "/fable-method", "use the fable method", or "approach this like Fable", or proactively when starting any multi-step task that no…
fable-domain
Discuss a domain with the user, research it from real sources, then generate a trusted skill bundle for it - a step-by-step workflow with a flowchart, a domain adapter, a trap fixture, and a smoke eval. Use when the user says "/fable-domain ", "make a skill for ", "add a domain to the fable method", or "give a lesser…
release-helper
Ensures configuration and code changes are released correctly. Use PROACTIVELY whenever you edit config.json, change any setting, or fix a configuration bug in this project, so the change reaches production.
fable-judge
Adversarial verification of finished work. Treats any "done" as a set of claims, then re-runs the claimed verifications, diffs what actually changed, detects weakened tests and false completion claims, and delivers an evidence-based verdict (VERIFIED / VERIFIED WITH CAVEATS / REFUTED). Use after any agent or model…
fable-loop
End-to-end orchestrated workflow that runs a task the way Fable ran sessions - parallel evidence subagents, one committed plan, surgical execution with an intent gate, adversarial verification agents, honest outcome-first report. Use for non-trivial multi-step tasks when the user says "/fable-loop", "run the fable…
feishu
Work with Feishu or Lark bots, docs, sheets, bitables, approval flows, and OpenAPI/MCP setup without hardcoding credentials.