AGENT SKILL

debug-deep

Composite skill — full debugging workflow from "this is broken" to root cause and fix. Chains systematic-debugging (root-cause hypotheses) → tracer agent (evidence walk) → sentry (production correlation if applicable) → ci-watch (regression check) → incident-response (if production-impacting). Use when a bug needs deep investigation, not just a quick fix. Deep debug for hard bugs and recurring failures.

License 许可
MIT
最近更新
2026-11-14
Stars
★ 1
Forks
1

01 前言 Front Matter

name
debug-deep
triggers
[ "debug-deep", "complex-bug-reports", "production-incidents", "recurring-failures", "debug" ]
description
Composite skill — full debugging workflow from "this is broken" to root cause and fix. Chains systematic-debugging (root-cause hypotheses) → tracer agent (evidence walk) → sentry (production correlation if applicable) → ci-watch (regression check) → incident-response (if production-impacting). Use when a bug needs deep investigation, not just a quick fix. Deep debug for hard bugs and recurring failures.

02 资源文件 1

03 SKILL.md 正文

Debug Deep

The full investigation workflow. Replaces "OK try X, now try Y, hmm let me check Sentry" with one chained skill that gathers evidence systematically.

Auto-invocation triggers

  • User reports a bug they've already tried to fix once
  • Bug report mentions "intermittent", "sometimes", "in production but not local"
  • Sentry / error monitoring shows the same issue 3+ times
  • CI failure pattern matches a recurring class
  • User says "this is broken, find why"

Workflow

Phase 1 — Hypothesis tree (always)

Invoke systematic-debugging to build a hypothesis tree with evidence-for/against columns. No fixes yet — just structured root-cause analysis.

Phase 2 — Evidence walk (always)

Invoke tracer agent (via Agent tool, subagent_type=tracer) to walk the call paths and collect concrete evidence per hypothesis. Tracer ranks hypotheses by evidence weight and recommends next probes.

Phase 3 — Production correlation (if production-impacting)

Invoke sentry to query for matching error signatures in the last 30 days. Look for:

  • Frequency trend (rising / steady / one-off)
  • Affected users / orgs / environments
  • Stack trace overlap with the local repro

If production data contradicts the hypothesis tree → loop back to Phase 1 with the new evidence.

Phase 4 — Regression check (always)

Invoke ci-watch to find when the failure first appeared in CI history. Bisect to the introducing commit if linear history allows. Cross-reference with the hypothesis tree's "introduced when" entries.

Phase 5 — Fix (autonomous if hypothesis is high-confidence)

Once the tree converges on one hypothesis with strong evidence:

  • For local-scope fixes: implement directly via Edit
  • For cross-module fixes: invoke refactor-pipeline
  • For production-impacting fixes: invoke incident-response to coordinate the fix with rollback plan, comms, and post-mortem

Phase 6 — Capture (always)

  • Invoke adr-write if the bug revealed a structural issue worth recording
  • Add a regression test (don't skip — that's how the bug comes back)
  • Invoke knowledge-loop to capture the debugging path for next time

Reconciliation

DEBUG DEEP — <bug summary>
  Phase 1 Hypotheses:    N candidates ranked
  Phase 2 Evidence:      <strongest hypothesis, confidence>
  Phase 3 Production:    <Sentry frequency, affected scope>
  Phase 4 Regression:    introduced in commit <SHA> (<date>)
  Phase 5 Fix:           <commit / PR / incident ref>
  Phase 6 Captured:      <ADR path, regression test path>

Outputs / Evidence

  • Hypothesis tree (Phase 1)
  • Evidence collected per hypothesis
  • Sentry frequency data
  • Bisect result
  • Fix commit/PR
  • Regression test
  • ADR if structural

Failure / Stop Conditions

  • Hypothesis tree has zero high-confidence winners after Phase 2 → stop, do not guess; surface the tree to user with recommended next probes
  • Sentry inaccessible → continue without Phase 3, mark report as PARTIAL
  • Bisect not viable (force-pushed history) → skip Phase 4, rely on hypothesis tree
  • Production fix without rollback plan → block; require incident-response

04 同仓库更多 Skills

LucasSantana-Dev
LucasSantana-Dev/forgekit

token-audit

Audit historical Claude Code token usage from JSONL session files — shows total spend, cache hit rates, top costly sessions, weekly trends, and where tokens are going. Run after heavy sessions or weekly to measure optimization impact. Answers how many tokens a session used, how expensive was that session, session cost, and token usage report.

★ 1
LucasSantana-Dev
LucasSantana-Dev/forgekit

smart-model-route

Auto-classify prompt complexity via Haiku (with heuristic fallback) and inject model routing hints for Agent tool calls. Wired as a UserPromptSubmit hook — fires on every prompt, routes low tasks to Haiku, standard to Sonnet, complex to Sonnet with thorough reasoning, and critical (security/arch/migrations) to Opus. Handles model selection, for example choose model by task complexity.

★ 1
LucasSantana-Dev
LucasSantana-Dev/forgekit

smart-commands

Decision guide for when to proactively use Claude Code slash commands — /think, /model, /compact, /clear. Use when choosing whether to invoke a command before or during a task, or when a complexity-classifier hook has flagged a task as high or critical. Pairs with the complexity-classifier UserPromptSubmit hook. Answers when to compact, should I switch models, and whether to use extended thinking. Use to pick the right /model command and switch model.

★ 1
LucasSantana-Dev
LucasSantana-Dev/forgekit

spec-ship

暂无简介

★ 1
LucasSantana-Dev
LucasSantana-Dev/forgekit

spec-new

Create a committed per-feature spec under `docs/specs/YYYY-MM-DD-<slug>/{spec,tasks}.md` with frontmatter (status, created, owner, pr, tags). Promotes an ephemeral `.claude/plans/<name>.md` into a persistent, searchable artifact. Use when starting a feature that's larger than a one-shot PR.

★ 1
LucasSantana-Dev
LucasSantana-Dev/forgekit

roadmap-refresh

Regenerate `docs/roadmap.md` for a repo from all specs under `docs/specs/` + their frontmatter (status, tags, pr). Produces Now/Next/Recently-shipped sections. Run after creating / shipping a spec, or at the start of a new session for orientation.

★ 1