debug-protocol SKILL.md skillA

debug-protocol from curtischoutw/claude-institution is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add curtischoutw/claude-institution/debug-protocol@git:20261002.c9145f9

Pins git:20261002.c9145f9 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
curtischoutw/claude-institution
Path
institution/skills/debug-protocol/SKILL.md
Versions recorded
5
Latest version
git:20261002.c9145f9, committed Oct 2, 2026
First version recorded
Jul 5, 2026
Size
3,790 bytes
Repository stars
5
License
MIT

系統化除錯協定,含停損規則。在除錯卡住、同一問題修了 2 次以上還沒好、或開始想「隨便改改看會不會好」時使用。防止亂槍打鳥式修改把程式碼越改越爛。.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# debug-protocol:系統化除錯

核心原則:**一次一個假設,一個假設一個最小改動,改完立刻驗證。** 沒有失敗重現指令之前,不准動任何程式碼。

## 步驟

### 1. 重現(沒有這步就沒有下一步)
- 找到一條指令能穩定重現失敗(測試指令、curl、script)。貼出失敗輸出。
- 無法穩定重現 → 先解決重現問題(加 log、固定 seed、記錄環境),不要修「猜的 bug」。

### 2. 建立假設日誌
在回覆中(或 scratchpad)維護一張表,之後每輪更新:

```
| # | 假設 | 驗證方式 | 結果 |
|---|------|---------|------|
| 1 | token 過期沒被 refresh | 在 refresh 處加 log 重跑 | 排除:有進 refresh |
```

### 2.5 假設從哪來(想不出假設時照此優先序)

1. **最近改動優先**:`git log -p <相關檔>`、`git diff main`——大多數新 bug 來自新改動。
2. **差異分析**:能重現與不能重現的情境差在哪(環境、輸入、版本、時序)?差異處就是嫌疑處。
3. **按症狀查常見嫌疑**:
   - 間歇性失敗 → 時序/競態、共享狀態、外部依賴逾時
   - 邊界值出錯 → off-by-one、型別轉換、空集合/None
   - 只在某環境出錯 → 設定、路徑、版本、環境變數
4. 以上都想不出 → 用二分縮小範圍(git bisect 或註解掉一半邏輯),別憑空猜。

### 3. 驗證假設(先觀察,後修改)
- 優先用「唯讀」手段驗證:讀碼、加 log、下斷點、bisect(`git bisect` 或手動二分註解)。
- 假設被證實之後才改程式碼;改動必須是針對該假設的**最小修改**。

### 4. 每輪改動後
- 重跑步驟 1 的重現指令。
- 沒修好 → 把這輪改動 **revert 乾淨**(不留半套修改疊加),更新假設日誌,回步驟 2。

## 停損規則(3-strike)

連續 3 輪修改都失敗時,**強制停手**,依序做:

1. `git checkout` / revert 回最後乾淨狀態。
2. 寫下:已排除的假設清單、目前掌握的事實、還沒看過的區域。
3. 擴大情報面(擇一):
   - 往上游讀更多程式碼(呼叫鏈、設定載入、初始化順序)
   - 用 `git log -p <file>` 查該區域最近改動
   - 開一個 subagent 平行調查另一條假設線
   - `git bisect` 找出引入問題的 commit
4. 帶著新事實重新進 plan mode 再開始。
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add curtischoutw/claude-institution/debug-protocol@sha256:bda886c2d5f8f937

The line at the top of this page pins the label git:20261002.c9145f9, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_bjf3uidsq32h54xv.svg)](https://markdownregistry.com/a/art_bjf3uidsq32h54xv)

2 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 5 versions of this file, between Jul 5, 2026 and Oct 2, 2026, about one every 22 days.

versioncommittedcommitsizeaudit
git:20261002.c9145f9 latest2026-10-02 c9145f9 3,790 BA view · diff
git:20260826.9a280e12026-08-26 9a280e1 3,794 BA view · diff
git:20260824.55dafdb2026-08-24 55dafdb 3,899 BA view · diff
git:20260714.6307d7e2026-07-14 6307d7e 3,662 BA view · diff
git:20260705.2c237372026-07-05 2c23737 2,817 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (3790 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

curtischoutw/claude-institution · 5 stars · license MIT · pushed 2026-10-03 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_bjf3uidsq32h54xv
GET https://markdownregistry.com/api/v1/resolve?ref=curtischoutw/claude-institution/debug-protocol
GET https://markdownregistry.com/api/v1/blob/bda886c2d5f8f93701e6850310edd64eb96b367edff107cf5d8180b92a2e765b

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from curtischoutw/claude-institution

CLAUDE.md@institution CLAUDE.md file
curtischoutw/claude-institution · institution/CLAUDE.md
git:20261003.51b6900 · audit A · 5 stars
lesson SKILL.md skill
curtischoutw/claude-institution · institution/skills/lesson/SKILL.md · 被使用者糾正後,先分流(單純事實/偏好交給內建 auto memory,需要變成規則才進本流程),把規則寫成可長期沿用的條目記入 tasks/lessons.md。在使用者說「不對」「不是這樣」「我說過」或任何形式指出錯誤後立即使用;也用於…
git:20260826.65d9991 · audit A · 5 stars
verify SKILL.md skill
curtischoutw/claude-institution · institution/skills/verify/SKILL.md · 宣稱任務「完成」之前必跑的驗證 checklist。在準備回報完成、準備 commit、或使用者問「好了嗎」時使用。產出一份附證據的驗證報告。
git:20261002.c9145f9 · audit A · 5 stars

Every file in curtischoutw/claude-institution

Browse by kind, by grade A, or by owner.