debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
Skill by GGGODLIN
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/gggodlin-debugging
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Node.js package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/debugging~/threads/thread-manager~/threads/types
What's inside
- Skill name
debugging- Description
- Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes. Do not use for planning a feature before its spec is settled or reviewing an existing spec (review-spec).
- License
- MIT
- Instructions
- 282 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (16)
- CREATION-LOG.md
- LICENSE-addyosmani-agent-skills
- LICENSE-mattpocock-skills
- LICENSE-obra-superpowers
- SKILL.md
- SKILL.md.LICENSE
- condition-based-waiting-example.ts
- condition-based-waiting.md
- defense-in-depth.md
- find-polluter.sh
- root-cause-tracing.md
- presentation-shape.test.sh · scripts/tests/
- test-academic.md
- test-pressure-1.md
- test-pressure-2.md
- test-pressure-3.md
SKILL.md (first lines)
<!-- 本檔在契約測試底下:bash ~/.claude/skills/debugging/scripts/tests/presentation-shape.test.sh -->
# Systematic Debugging
## Overview
Random fixes waste time and create new bugs. Quick patches mask underlying issues.
**Core principle:** find the root cause before proposing a fix — random fixes waste time and create new bugs, and a symptom fix leaves the bug in place.
## When to Use
Use for any technical issue:
- Test failures
- Bugs in production
- Unexpected behavior
- Performance problems
- Build failures
- Integration issues
## The Four Phases
### Phase 1: Root Cause Investigation
Before proposing a fix:
1. **Read Error Messages Carefully**
- Don't skip past errors or warnings
- They often contain the exact solution
- Read stack traces completely
- Note line numbers, file paths, error codes
2. **Reproduce Consistently**
- Can you trigger it reliably?
- What are the exact steps?
- Does it happen every time?
- If not reproducible → run the non-repro decision tree below before anything else — "gather more data" without classification is just waiting
**Non-repro decision tree**(absorbed from addyosmani/agent-skills debugging-and-error-recovery, 2026-07-11)— classify which axis the flakiness lives on, each has different next actions:
- **Timing-dependent(race)?** → add artificial delays to widen the race window; log event ordering with timestamps; run under load/parallelism to raise the hit rate
- **Environment-dependent?** → diff env vars / config / dependency versions between where it fails and where it doesn't; try empty vs populated database / cache
- **State-dependent?** → check leaked state between tests or runs; run the failing case in isolation vs after the full suite — order sensitivity is the tell
- **Truly random?** → rare. Instrument the suspect path first (structured logging + correlation id), then wait for the next occurrence with evidence capture already in place
Classified and instrumented → continue to step 3 (Check Recent Changes) with the evidence collected.
3. **Check Recent Changes**
- What changed that could cause this?
- Git diff, recent commits
- New dependencies, config changes
- Environmental differences
4. **Gather Evidence in Multi-Component Systems**
**WHEN system has multiple components (CI → build → signing, API → service → database):**
**BEFORE proposing fixes, add diagnostic instrumentation:**
```
For EACH component boundary:
- Log what data enters component
- Log what data exits component
- Verify environment/config propagation
- Check state at each layer
Run once to gather evidence showing WHERE it breaks
THEN analyze evidence to identify failing component
THEN investigate that specific component
```
**Example (multi-layer system):**
```bash
# Layer 1: Workflow
echo "=== Secrets available in workflow: ==="
[ -n "${IDENTITY:-}" ] && echo "IDENTITY: SET" || echo "IDENTITY: UNSET" # 不用 ${IDENTITY:-UNSET}:有值時會把值印出來
# Layer 2: Build script
echo "=== Env vars in build script: ==="
env | grep -q '^IDENTITY=' && echo "IDENTITY present" || echo "IDENTITY not in environment"
# Layer 3: Signing script
echo "=== Keychain state: ==="
security list-keychains
security find-identity -v
# Layer 4: Actual signing
codesign --sign "$IDENTITY" --verbose=4 "$APP"
```
**This reveals:** Which layer fails (secrets → workflow ✓, workflow → build ✗)
**Redact before showing**(吸收自上游 2026-08-11;適用於本步驟與 Phase 3 證據表——所有要秀給使用者的指令、輸出、log、抓包內容):
- Secret 值本身(API key / password / token 值 / DSN 密碼段)不逐字出現在你顯示的輸出裡——改寫**指位**:env var 名、`.env` 路徑+行、keychain 條目名(與 save-session 同一條規則);同一值的非 secret 部分(host / port / db 名)照舊原樣。
- Feedback loop 綁 env var 讓憑證留在環境不進輸出——上面 `[ -n "${IDENTITY:-}" ] && echo SET || echo UNSET` 的「印存在性不印值」就是標準形(`${VAR:-UNSET}` 有值時會印出值,不算;上游 superpowers `bb92a777` 同一修法)。
- 帶 auth header 的 captured artifact 只引用有訊號的行。
- 遮完不足以診斷 → 明說並問使用者,不要印出 secret。
5. **Trace Data Flow**
**WHEN error is deep in call stack:**
See `root-cause-tracing.md` in this directory for the complete backward tracing technique.
**Quick version:**
- Where does bad value originate?
- What called this with bad value?
- Keep tracing up until you find the source
- Fix at source, not at symptom
### Phase 2: Pattern Analysis
**Find the pattern before fixing:**
1. **Find Working Examples**
- Locate similar working code in same codebase
- What works that's similar to what's broken?
2. **Compare Against References**From GGGODLIN/gggodlin-cc-harness, MIT.
More from GGGODLIN/gggodlin-cc-harness
- 0.674score
to-spec
GGGODLIN
Turn the current conversation into a spec — no interview, just synthesis of what was already discussed.
SkillAFreshness: A★ 72Claude Code +9 - 0.674score
workflow-hardening
GGGODLIN
Use when writing or designing any inline/dynamic Claude Code Workflow script, including short single-pass scripts, Ultracode or multi-agent orchestration…
SkillAFreshness: A★ 72Claude Code +9 - 0.674score
review-implement
GGGODLIN
Use after a spec-backed implementation reaches closeout and before shipping when a post-implementation scope or YAGNI review is needed, or when the user…
SkillAFreshness: A★ 72Claude Code +9 - 0.674score
research-before-answer
GGGODLIN
Use when answering a factual question about a named repo, package, library, framework, SDK, API, version, release note, deprecation, company, product, market…
SkillAFreshness: A★ 72Claude Code +9 - 0.674score
e2e-contract
GGGODLIN
Use when e2e-route 已選派文件/補丁行為確認或既有契約回歸工作,或使用者手動點名 /e2e-contract;包含同題確認案例、重跑已確認案例與改選工具。Do not use for 從自然語言 E2E 任務自行選用(先用 e2e-route)、普通探索固化、單元或純 API…
SkillAFreshness: A★ 72Claude Code +9 - 0.674score
agent-dispatch
GGGODLIN
Run one repo's ticket batch in a terminal worker inside a target worktree through Herdr — Claude Code by default, or Codex CLI or pi when the user picks that…
SkillAFreshness: A★ 72Claude Code +9 - 0.674score
check-my-stack
GGGODLIN
Evaluate whether a popular or hyped agent/dev tool is worth adopting or borrowing from, measured against the user's OWN existing stack — never in the abstract.
SkillAFreshness: A★ 72Claude Code +9 - 0.674score
gate-authoring
GGGODLIN
Use when 使用者要「寫 / 改 / 加一個 hook」「設計 gate / detector / tripwire」「動 settings.json hooks 段」——涵蓋全域 ~/.claude/hooks/、任一 repo 專案級 .claude/hooks/、任何 settings.json /…
SkillAFreshness: A★ 72Claude Code +9 - 0.674score
agent-authoring
GGGODLIN
建立或修改 subagent 定義檔(~/.claude/agents/*.md 或專案 .claude/agents/*.md)前必讀的流程 skill——frontmatter 欄位語意、tools 欄陷阱、載入時機、上線前 smoke test。觸發:「建 / 寫 / 加一個 agent」「改 agent…
SkillAFreshness: A★ 72Claude Code +9 - 0.674score
implement
GGGODLIN
Use when a spec or ticket set is ready to build and the user says implement / 開工 / 照 ticket 做 / start building, or the local pipeline reaches its…
SkillAFreshness: A★ 72Claude Code +9 - 0.674score
handoff-impl
GGGODLIN
跨 session 實作委外信道(handoff 單在 ~/.claude/handoffs/*.md,發單 session 驗收、另一 session 實作;信道預設手動搬單,自動接力屬未穩定實驗路徑、僅使用者明確要求實驗才走)。Use when 使用者說「開 handoff 單」「把這個實作交給 GPT /…
SkillAFreshness: A★ 72Claude Code +9 - 0.674score
write-pr-description
GGGODLIN
Use when a pull request title or description needs drafting or revising — before running `gh pr create`, `gh pr edit --body`, or any other command that opens…
SkillAFreshness: A★ 72Claude Code +9
Signals
- Stars
- 72
- Forks
- 5
- Open issues
- 0
- Last commit (this folder)
- Oct 13, 2026 (16 days ago)
- Last release
- Oct 19, 2026 (10 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/GGGODLIN/gggodlin-cc-harness
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from GGGODLIN
- 0.674score
gate-authoring
GGGODLIN
Use when 使用者要「寫 / 改 / 加一個 hook」「設計 gate / detector / tripwire」「動 settings.json hooks 段」——涵蓋全域 ~/.claude/hooks/、任一 repo 專案級 .claude/hooks/、任何 settings.json /…
SkillAFreshness: A★ 72Claude Code +9 - 0.674score
agent-dispatch
GGGODLIN
Run one repo's ticket batch in a terminal worker inside a target worktree through Herdr — Claude Code by default, or Codex CLI or pi when the user picks that…
SkillAFreshness: A★ 72Claude Code +9 - 0.674score
check-my-stack
GGGODLIN
Evaluate whether a popular or hyped agent/dev tool is worth adopting or borrowing from, measured against the user's OWN existing stack — never in the abstract.
SkillAFreshness: A★ 72Claude Code +9 - 0.674score
agent-authoring
GGGODLIN
建立或修改 subagent 定義檔(~/.claude/agents/*.md 或專案 .claude/agents/*.md)前必讀的流程 skill——frontmatter 欄位語意、tools 欄陷阱、載入時機、上線前 smoke test。觸發:「建 / 寫 / 加一個 agent」「改 agent…
SkillAFreshness: A★ 72Claude Code +9 - 0.674score
e2e-contract
GGGODLIN
Use when e2e-route 已選派文件/補丁行為確認或既有契約回歸工作,或使用者手動點名 /e2e-contract;包含同題確認案例、重跑已確認案例與改選工具。Do not use for 從自然語言 E2E 任務自行選用(先用 e2e-route)、普通探索固化、單元或純 API…
SkillAFreshness: A★ 72Claude Code +9 - 0.674score
handoff-impl
GGGODLIN
跨 session 實作委外信道(handoff 單在 ~/.claude/handoffs/*.md,發單 session 驗收、另一 session 實作;信道預設手動搬單,自動接力屬未穩定實驗路徑、僅使用者明確要求實驗才走)。Use when 使用者說「開 handoff 單」「把這個實作交給 GPT /…
SkillAFreshness: A★ 72Claude Code +9
Cite this page
debugging skill. Agent Mart. https://agentmart.dev/skills/gggodlin-debugging (last updated 2026-10-24)