本文へ移動
cccskills
無料GitHub で公開

debug

Root cause analysis for bugs and errors. Use when something is broken and the cause is not obvious. Applies the 5-step investigation method — observe, hypothesize, trace backwards, binary search, prove.

日本語の概要は準備中です。原文の説明を表示しています。

インストール方法を見る

含まれるファイル(1)

  • SKILL.md2.2 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Debug Skill

Systematic root cause analysis.

When to use

  • An error is happening and the cause is not obvious
  • A test is failing unexpectedly
  • Behavior changed after a refactor
  • Production incident requiring root cause identification

5-Step Investigation Method

Step 1 — OBSERVE: Gather exact evidence

Do NOT guess. Collect all available evidence first:

  • Exact error message (full stack trace, not summary)
  • Exact input that triggers the failure
  • Exact expected vs. actual output
  • When it started failing (which commit? which change?)
  • Environment where it fails (dev? CI? prod? all?)

Step 2 — HYPOTHESIZE: Form concrete hypotheses

Based on the evidence, generate 2-3 specific hypotheses:

  • Each hypothesis must be falsifiable (testable)
  • Rank by probability based on evidence
  • Do NOT assume the most complex explanation — prefer simple causes

Step 3 — TRACE BACKWARDS: Follow the execution path

From the failure point, trace backwards:

grep -rn --color=never '<error_symbol_or_message>' . | head -20
  • Find the function that threw the error
  • Find its caller
  • Find the caller's caller
  • Keep tracing until you reach user input or a boundary

Step 4 — BINARY SEARCH: Narrow the scope

If the trace is long, use bisection:

  • Does it fail with the same input after reverting X? (git bisect or manual)
  • Does it fail with minimal input? (reduce the test case)
  • Does it fail in isolation? (extract the failing unit)

Step 5 — PROVE: Verify the root cause

Before fixing, prove you found the right root cause:

  • Write a test that reproduces the bug exactly
  • Verify the test fails (red) with the current code
  • Apply the fix
  • Verify the test passes (green)
  • Run the full test suite — no regressions

Rules

  • NEVER fix before proving the root cause
  • NEVER submit a fix without a reproducing test
  • If two hypotheses remain after Step 4, test the simpler one first
  • Document the root cause in claude/tasks/lessons.md if it's a non-obvious pattern

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

ask

無料

Route a codebase question to the right tool — structural graph, semantic search, or risk analysis. Use when you need to find or understand code without knowing exact file names.

日本語の概要は準備中です。原文の説明を表示しています。

brain-bootstrap/claude-code-brain-bootstrap112026年4月25日 更新

bootstrap

無料

Auto-configure CLAUDE.md and claude/ knowledge docs for a new project. Use when setting up Brain Bootstrap in a new repository. Discovers the codebase, fills in templates, and writes project-specific configuration.

日本語の概要は準備中です。原文の説明を表示しています。

brain-bootstrap/claude-code-brain-bootstrap112026年4月25日 更新

Use before any new feature, component, or behavioral change — when you need to explore requirements and design before writing code

日本語の概要は準備中です。原文の説明を表示しています。

brain-bootstrap/claude-code-brain-bootstrap112026年4月25日 更新

careful

無料

Activate safety guards for the session. Use /careful before critical operations — blocks rm -rf, DROP TABLE, git push --force, kubectl delete namespace, docker system prune via PreToolUse hook.

日本語の概要は準備中です。原文の説明を表示しています。

brain-bootstrap/claude-code-brain-bootstrap112026年4月25日 更新

changelog

無料

Generate a user-facing changelog from git commits — categorize, filter noise, translate to user language. Runs in isolated fork context.

日本語の概要は準備中です。原文の説明を表示しています。

brain-bootstrap/claude-code-brain-bootstrap112026年4月25日 更新

Save session state before context gets full or before ending. Writes current task state, branch, and loaded docs to claude/tasks/todo.md so the next session can resume cleanly.

日本語の概要は準備中です。原文の説明を表示しています。

brain-bootstrap/claude-code-brain-bootstrap112026年4月25日 更新

brain-bootstrap のスキルをすべて見る

このスキルの問題を報告する