debug

An interactive debugging workflow that tests possible causes of unknown bugs through focused probes.

In plain words
What is it for?
It helps troubleshoot script errors, silent failures, and other unknown problems, producing a probe record, root-cause explanation, fix, and verification report.
Why use it?
It replaces guesswork with a recorded process for reproducing failures, narrowing down the root cause, and checking the fix.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/sd0xdev/sd0x-harness/debug
Any agent
npx skills add sd0xdev/sd0x-harness --skill debug
Clone the repo
git clone --depth 1 https://github.com/sd0xdev/sd0x-harness

Made for: Claude Code, Codex.

Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,443 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00067 $0.02443
Opus 5 $0.00034 $0.01222
Sonnet 5 $0.00013 $0.00489
Haiku 4.5 $0.00007 $0.00244

Measured 2d ago against content hash ebb2bb12a3a1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

debug 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 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| Read-first default | 預設探測為唯讀:`cat`, `curl -s`, `grep`, `ls`, `git log` |
skills/debug/SKILL.md · 243 lines

How it starts

The opening of the file, as written. The whole thing — 243 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.md

This skill debugs and may fix code but does not commit. /precommit is a quality gate only. To commit, the user must invoke /smart-commit --execute separately.

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

Read the full file on GitHub · 243 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 2d ago First seen · 243 lines · 67 tokens per session scan A ebb2bb12a3a1

Subscribe to this mod's changes

debug is a skill published in the GitHub repository sd0xdev/sd0x-harness (188 stars, last pushed 2d ago), licensed MIT. It adds 67 tokens to every session and 2,443 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

make-skill

Use this skill when sedimenting a session into a reusable workspace skill. Triggers when the user wants to turn the current conversation, workflow, or troubleshooting path into a SKILL.md. Phrases like 'turn this into a skill', 'remember how I did X', 'save this workflow', 'make a skill from this', and any /make-skill…

agentscope-ai/QwenPaw · 85 tokens

make-skill

用于把当前会话沉淀为可复用的 workspace skill。当用户希望把当前对话、工作流或排错路径写成 SKILL.md 时触发。触发表达包括「把这个变成 skill」「记住我是怎么做 X 的」「保存这个工作流」「make a skill from this」以及任何 /make-skill 调用。.

agentscope-ai/QwenPaw · 84 tokens

terraform-skill

Use when working with Terraform or OpenTofu - creating modules, writing tests (native test framework, Terratest), setting up CI/CD pipelines, reviewing configurations, choosing between testing approaches, debugging state issues, implementing security scanning (trivy, checkov), or making infrastructure-as-code…

agentscope-ai/QwenPaw · 62 tokens

docx

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of "Word doc", "word document", ".docx", or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when…

agentscope-ai/QwenPaw · 168 tokens

docx

当用户需要创建、读取、编辑或处理 Word 文档(.docx)时,使用此技能。触发场景包括提到“Word 文档”、“.docx”,或要求生成带目录、标题、页码、信头等格式的专业文档;也包括提取或重组 .docx 内容、插入或替换图片、在 Word 文件中查找替换、处理修订或批注,以及将内容整理为正式 Word 文档。如果用户要求生成“报告”“备忘录”“信函”“模板”等 Word / .docx 交付物,也应使用此技能。不要用于 PDF、电子表格、Google Docs,或与文档生成无关的一般编程任务。.

agentscope-ai/QwenPaw · 161 tokens

multi_agent_collaboration

Use this skill when another agent's expertise or context is needed, or when the user explicitly asks to involve another agent. First list agents, then use qwenpaw agents chat for two-way communication with replies.

agentscope-ai/QwenPaw · 47 tokens