AGENT SKILL

debug

Systematic root-cause analysis for bugs, errors, and unexpected behavior. Use to debug this, find the root cause, or investigate why is this failing. Also invoked as ultradebug.

适用职业开发工程师
License 许可
MIT
最近更新
2026-11-11
Stars
★ 1
Forks
1

01 前言 Front Matter

name
debug
triggers
[ "debug this", "why is this failing", "root cause", "investigate", "ultradebug" ]
description
Systematic root-cause analysis for bugs, errors, and unexpected behavior. Use to debug this, find the root cause, or investigate why is this failing. Also invoked as ultradebug.

02 资源文件 1

03 SKILL.md 正文

Debug

Systematic 7-step debugging. Don't guess — trace.

Steps

  1. Reproduce — get a minimal, reliable reproduction
  2. Locate — find the exact file, line, and call path where it breaks
  3. Hypothesize — list 2-3 competing explanations
  4. Evidence — for each hypothesis: what would confirm or rule it out
  5. Test — run the fastest confirming/ruling test first
  6. Fix — change exactly what the evidence points to
  7. Verify — confirm fix resolves the issue, run full test suite

Rules

  • Never change code before you know the root cause
  • Read the actual error message — don't skim it
  • Check assumptions: is the value what you think it is? Add a log
  • Distinguish "symptom" from "cause" — fix the cause
  • If stuck after 3 hypotheses, add instrumentation before guessing more

Output

Root cause: <one sentence>
Location:   <file>:<line>
Fix:        <what to change and why>

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.

Skill与智能体开发
★ 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