debug
Skill192 starsChanged 36 days agoMITView on GitHub
Interactive debugging workflow with hypothesis-driven probe loop. Use when: unknown bugs, script errors, silent failures, troubleshooting. Not for: known bugs (use bug-fix), GitHub issue analysis (use issue-analyze), code understanding (use code-explore). Output: debug report with probe journal + root cause + fix.
- Commits and pushes
192 other projects use a version of this.
Adopted by
Most recently taken up by
- PeanutGT/NutsSkillstheir own version, first seen Nov 8, 2026
- jskswamy/skillstheir own version, first seen Nov 8, 2026
- Firzus/agent-skillstheir own version, first seen Nov 8, 2026
- domengabrovsek/agent-configtheir own version, first seen Nov 8, 2026
- domengabrovsek/claudetheir own version, first seen Nov 8, 2026
- microsoft/veronatheir own version, first seen Nov 8, 2026
Used with
Projects with it also use add-discord, add-slack and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkilladd-discord
Add Discord bot channel integration via Chat SDK.
Also in 11 projects that use this
MicrosoftSkilladd-slack
Add Slack channel integration via Chat SDK.
Also in 11 projects that use this
- +10 more from microsoft
Other versions192 projects use a version of this.
Word for word · 1
- sd0xdev/sd0x-harness★ 192100% same
Edited · 0
None found.
Wrote their own version · 191
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
- anthropics/knowledge-work-plugins★ 35ksame name
- gavrielc/nanoclaw★ 31ksame name
- nanocoai/nanoclaw★ 31ksame name
- qwibitai/nanoclaw★ 31ksame name
- openai/symphony★ 27ksame name
- FalkorDB/FalkorDB★ 10ksame name
- NVIDIA/TensorRT-Model-Optimizer★ 5.6ksame name
- NVIDIA/Model-Optimizer★ 5.6ksame name
181 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository102 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- adrSkill
- agentctl-setupSkill
- architectureSkill
- askSkill
- best-practicesSkill
- bug-fixSkill
- bump-versionSkill
- check-coverageSkill
- claude-healthSkill
- code-exploreSkill
- code-investigateSkill
- codex-architectSkill
- codex-brainstormSkill
- codex-cli-reviewSkill
- codex-code-reviewSkill
- codex-explainSkill
- codex-implementSkill
- codex-review-branchSkill
- codex-review-docSkill
- codex-review-fastSkill
- codex-reviewSkill
- codex-securitySkill
- codex-setupSkill
- codex-test-genSkill
- codex-test-reviewSkill
- contract-decodeSkill
- create-prSkill
- create-requestSkill
- de-ai-flavorSkill
- deep-analyzeSkill
- deep-exploreSkill
- deep-researchSkill
- dep-auditSkill
- deploy-flowSkill
- dev-security-auditSkill
- doc-refactorSkill
- doc-reviewSkill
- epic-mergeSkill
- feasibility-studySkill
- feature-devSkill
- feature-verifySkill
- fp-briefSkill
- generate-runnerSkill
- gh-stackSkill
- git-investigateSkill
- git-profileSkill
- install-hooksSkill
- install-rulesSkill
- install-scriptsSkill
- issue-analyzeSkill
- jiraSkill
- load-pr-reviewSkill
- merge-prepSkill
- necessity-auditSkill
- next-stepSkill
- obsidian-cliSkill
- op-sessionSkill
- orchestrateSkill
- plan-reviewSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 174 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 89
When ≥2 equally credible hypotheses exist:
- Distinctive: line 92
Use Nash equilibrium result as new primary hypothesis
- Distinctive: line 135
If code file changed → enter review loop (auto-loop)
- Very specific: line 141
Default: conversation-only output.
“Common” is measured: kept by at least 6 in 10 of the 174 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Debug Skill
Trigger
- Keywords: debug, 除錯, troubleshoot, diagnose, 查問題, 找 bug, 為什麼不動, 為什麼不 work, something wrong, not working
When NOT to Use
| Scenario | Alternative |
| GitHub Issue / PR thread 分析 | /issue-analyze |
| 已知根因、直接修復 | /bug-fix |
| 理解程式碼如何運作 | /code-explore |
| 需要雙視角確認邏輯 | /code-investigate |
| 部署後唯讀功能驗證 | /feature-verify |
Prohibited Actions
❌ git add | git commit | git push — per @rules/git-workflow.mdThis skill debugs and may fix code but does not commit. /precommit is a quality gate only. To commit, offer the menu per rules/git-workflow.md § Proactive Offer — a commit option on any real branch, a push option only where review-state.js offer allows one — and invoke /smart-commit --execute on selection; never print the command for the user to copy.
Workflow
Phase 0 Phase 1 Phase 2 Phase 3 Phase 4 Phase 5
Intake → Classify → Probe Loop → Root Cause → Fix + → Report
+ Repro (Taxonomy) (max 6) Confirmation Verify
│ │ │ │ │ │
▼ ▼ ▼ ▼ ▼ ▼
Execute refs/ Bash /seek-verdict Edit+test --export
reproduce failure- /codex- /code-investigate /bug-fix (optional)
taxonomy brainstorm (optional)Phase 0: Intake + Reproduce
| Step | Action | Output |
| 0a | 解析問題描述(症狀、範圍、環境) | 結構化問題描述 |
| 0b | 嘗試重現(執行命令/腳本) | 預期 vs 實際結果 |
| 0c | 重現成功? | Yes → Phase 1 / No → ⚠️ Need Human |
Repro Contract: 根因聲稱必須基於可重現的觀察,不可基於靜態推測。
Phase 1: Classify
根據觀察到的失敗模式,使用 Failure Taxonomy 分類並選擇 first-probe 策略。
See references/failure-taxonomy.md for:
- 6 problem types + detection signals + first-probe commands
- Classification decision tree
- Escalation paths
Phase 2: Probe Loop
假設驅動的互動式探測迴圈。See references/probe-protocol.md for full rules.
每個 probe 是一個假設測試:
1. 定義假設 H
2. 設計探測命令 C
3. 預測「若 H 成立 → 期望 O」
4. 執行 C → 觀察實際結果
5. 更新假設集合
6. 選下一個最具鑑別力的探測Termination
| Condition | Action |
| 根因已定位 + ≥1 執行結果佐證 | Stop → Phase 3 |
| ≥2 競爭假設無法區分 | Brainstorm → /codex-brainstorm 對抗辯論 |
| 連續 2 輪無新資訊 | Escalate → ⚠️ Need Human |
| Max rounds (6) reached | Escalate → ⚠️ Need Human |
/codex-brainstorm Integration
When ≥2 equally credible hypotheses exist:
- Pause probe loop
- Invoke
/codex-brainstormvia Skill tool — topic = hypothesis comparison - Use Nash equilibrium result as new primary hypothesis
- Resume probe loop to verify
Phase 3: Root Cause Confirmation
| Step | Action | Required |
| 3a | 總結根因(What + Why + Impact + Evidence) | ✅ |
| 3b | /seek-verdict --intent confirm — Codex 獨立驗證 | ✅ Mandatory |
| 3c | /code-investigate 雙視角深入驗證 | Optional |
| 3d | /git-investigate 追蹤引入點(若 regression) | Conditional |
/seek-verdict Integration (Step 3b — Mandatory)
Invoke /seek-verdict --intent confirm for independent root cause verification.
Anti-anchoring contract (per @skills/seek-verdict/SKILL.md):
- Fresh thread: a new § Start dispatch, never a § Resume onto an existing thread
- No Claude conclusions: prompt must not contain Claude's probe findings or root cause judgment
- Finding packet only: provide symptoms, files, observed behavior — let Codex judge independently
Result routing:
| Result | Action |
| ACTIONABLE (confirm) | → Phase 4 |
| NON_ACTIONABLE (high confidence) | Re-enter Phase 2 or ⚠️ Need Human |
| UNCERTAIN | → Phase 4 (conservative), note low confidence |
Phase 4: Fix + Verify
| Condition | Path |
| Simple fix (≤3 lines) | Edit + regression test + verify |
| Complex fix (multi-file) | Delegate to /bug-fix |
| Architecture-level change | ⛔ Need Human — report root cause + recommendation |
All fix paths require regression test per @rules/testing.md evidence model. Bug type → test level mapping per @skills/bug-fix/SKILL.md.
Simple fix path:
- Edit fix
- Write regression test
- Re-execute Phase 0 repro command (verify fix)
- If code file changed → enter review loop (auto-loop)
Phase 5: Debug Report
Output format: see references/report-template.md.
Default: conversation-only output. With --export [path], write to file (with redaction per Probe Safety Rules).
Probe Safety Rules
| Rule | Description |
| Read-first default | 預設探測為唯讀:cat, curl -s, grep, ls, git log |
| Write-probe gate | 可能修改狀態的探測標記 [WRITE_PROBE],非 sandbox 環境需用戶確認 |
| Timeout | 每個探測命令 timeout ≤ 30 秒 |
| Output budget | 單次探測輸出 ≤ 500 行(超出 truncate) |
| Redaction | 禁止記錄 API keys, tokens, passwords(per @rules/security.md),以 [REDACTED] 取代 |
| Deny list | 禁止:rm, drop, delete, truncate, 任何 destructive 操作 |
Config
| Key | Default | Description |
debug.max_probe_rounds | 6 | Maximum probe loop iterations |
Review Loop
MUST re-review after fix until PASS (per @rules/auto-loop.md)
Fix → Review → Issues found → Fix again → ... → ✅ Pass → Next stepDoc Sync
Doc Sync is governed by @rules/auto-loop.md (behavior-layer rule). After precommit pass, triggers conditionally when changes map to docs/features/.
Output
## Debug Report: <title>
- **Type**: <classification>
- **Root Cause**: <what + why>
- **Fix**: <change description>
- **Verdict**: <seek-verdict result>
- **Probe Rounds**: <N>Verification
- Phase 0 reproduced the issue
- Problem classified using failure taxonomy
- Probe journal recorded for each round
/seek-verdict --intent confirmexecuted (Phase 3)- Root cause has ≥1 execution evidence
- Regression test written (if fix applied)
- Review loop completed (if code changed)
- No
git add/commit/pushexecuted
References
| File | Purpose | When to Read |
references/failure-taxonomy.md | Problem classification + first-probe routing | Phase 1 |
references/probe-protocol.md | Probe Loop rules + termination criteria | Phase 2 |
references/report-template.md | Debug Report template + export format | Phase 5 |
Examples
Script Bug
Input: /debug bash scripts/deploy.sh 回傳 exit code 1
Phase 0: 執行 bash scripts/deploy.sh → 確認失敗
Phase 1: Script Bug
Phase 2: R1: bash -x trace → 發現 line 42 curl 失敗
R2: 直接 curl endpoint → 404
R3: 檢查 URL → 路徑缺少 /api prefix → Stop
Phase 3: /seek-verdict confirm → ACTIONABLE
Phase 4: Edit line 42 + regression test
Phase 5: Debug ReportAPI Error
Input: /debug API 回傳空陣列但資料庫有資料
Phase 0: curl API endpoint → 確認回傳 []
Phase 1: Silent Failure(表面正常但結果錯誤)
Phase 2: R1: 檢查 query filter → 發現 status 欄位名稱不符
R2: 直接 DB query → 有資料 → Stop
Phase 3: /seek-verdict confirm → ACTIONABLE
Phase 4: 修正 field name + unit test
Phase 5: Debug ReportSilent Failure
Input: /debug ks-status.sh 回傳 ready:false 但 deployment 已就緒
Phase 0: 執行 bash ks-status.sh → ready:false, 缺少 replicas 欄位
Phase 1: Silent Failure(404 被 fallback 吞掉)
Phase 2: R1: 直接 curl API → invalid JSON → R2: 原始回應 → 404
R3: 改用 apps/v1 路徑 → 200 + 完整資料 → Stop
Phase 3: /seek-verdict confirm → ACTIONABLE
Phase 4: api/v1 → apps/v1(1 word fix)+ test
Phase 5: Debug ReportDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

