AGENT SKILL
debug
Investigate a problem, log it to the debug changelog, cross-check past issues, and suggest a non-duplicate fix.
适用职业开发工程师
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- debug
- type
- debugging
- version
- v0.3
- description
- Investigate a problem, log it to the debug changelog, cross-check past issues, and suggest a non-duplicate fix.
02 资源文件 2
- 参考文档agents/openai.yaml252 B
- 参考文档CHANGELOG.md629 B
03 SKILL.md 正文
Debug
Invoke as $debug.
Investigate a reported problem, maintain a persistent debug changelog (docs/debug-changelog.md), and propose a fix that avoids repeating past solutions.
Process
- Parse the error message, stack trace, or bug description.
- Capture environment context: current branch, recent commits, uncommitted changes.
- Ensure
docs/debug-changelog.mdexists (createdocs/directory and file if missing). - Read the full debug changelog and search for prior entries matching the current symptom.
- If a match is found, report what was tried before and whether the recurrence is systemic.
- Trace the execution path from the symptom to the root cause, reading only files in the chain.
- Check recent git history for changes that may have introduced the issue.
- Propose a minimal fix, cross-checking the changelog to avoid repeating a previously failed approach.
- Apply the fix, write or update tests, and run them to verify.
- Prepend a structured entry to
docs/debug-changelog.mdwith: date, symptom, category, severity, root cause, fix, test results, related entries, and systemic flag.
Output
- Problem: Symptom, new or recurring
- Root Cause: file:line, what's wrong, when introduced
- Fix Applied: approach, files modified, test results
- Changelog Updated: entry added, any cross-references
- Prevention: what check would have caught this earlier; systemic follow-up if applicable
Next-Step Routing
After reporting the debug outcome:
- If the root cause remains unresolved or verification still fails, use Recommended next command:
$debug <specific failing symptom>with the failing command and evidence, or$investigate <claim>when the remaining work is broader repo validation. - If the fix created or modified tracked files, check
.agents/project.jsonforexec-loop; recommend$shipwhen enabled, ornpx skillpacks install exec-loopfrom the project shell when it is not enabled. - If a systemic follow-up was added to
tasks/todo.md, check.agents/project.jsonforexec-loop; state that the approved task artifact is ready for an execution-loop runner; if runner tooling is missing, recommend installingexec-loopwith the project package manager. - If verification passed, no tracked files are dirty, and no systemic follow-up remains, state that no follow-up command is recommended.
Constraints
- Always read the full debug changelog before proposing a fix.
- Do not refactor unrelated code.
- Never duplicate a previously failed fix without justification.
- If the root cause can't be determined, report what was ruled out.
- Always run tests after applying the fix.
Default Shipping Contract
Follow the shared shipping contract convention in CLAUDE.md.
04 同仓库更多 Skills
source-checkout-allowed
Valid source-checkout-only fixture.
★ 1
deck-install-valid
Valid deck install fixture.
★ 1
codex-pack-guard-valid
Valid Codex Pack Availability Guard fixture.
★ 1
codex-missing-skill-valid
Valid Codex missing skill fallback fixture.
★ 1
codex-base-skill-fallback-valid
Valid Codex base skill fallback fixture.
★ 1
claude-pack-guard-valid
Valid Claude Pack Availability Guard fixture.
★ 1