From claude-dev-kit
Analyzes a bug from error logs or reproduction steps, fixes it, and creates a GitHub Issue + PR. Detects project context (sprint system, active worktrees) and enforces checkpoint verification.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-dev-kit:diagnoseThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!-- AUTO-GENERATED by scripts/gen_skills.py — DO NOT EDIT. Edit SKILL.md.tmpl instead. -->
Run silently at the start:
python3 scripts/kit_update_check.py 2>/dev/null
If exit code is 1 (update available), show the output to the user once. Do not block the workflow.
Run these checks silently at the start. Use results to adapt behavior:
[ -f issues.md ] — if true, this project uses the sprint system. Respect issue numbering and STATUS.md.[ -f docs/sprint_state.md ] — if true and Status shows running, a sprint is active. Be aware of parallel work in worktrees.[ -f docs/prd_digest.md ] — if true, read it for quick project context before starting.gh auth status before any GitHub operation.Every phase has a mandatory checkpoint. Run the verification command and check exit code. If exit code is not 0, STOP immediately and report failure. Do NOT proceed to the next phase. Standard prefix:
bash scripts/checkpoint.sh
Append --skill <name> --phase <phase> --issue <ID> for the specific check.
checkpoint.sh resolves the main repo root internally, so the command stays
a single prefix-matchable form (safe to allowlist as Bash(bash scripts/checkpoint.sh *)).
Pipeline skills operate in git worktrees to isolate changes from main.
WT="$(bash scripts/wt_setup.sh <branch>)" — creates the
worktree via scripts/worktree.sh create and writes .claude-kit/freeze-dir.txt
inside it in a single step.bash scripts/worktree.sh rootbash scripts/wt_cleanup.sh <branch> — cd's to main root
inside a subshell, then removes the worktree (never leaves CWD dangling).
All file operations happen inside $WT/. Shared files live on main only.Shared files (issues.md, STATUS.md, CHANGELOG.md) are managed on main only.
Always use registry_edit.sh for concurrent-safe writes — it resolves the
main repo root internally and delegates to flock_edit.sh:
bash scripts/registry_edit.sh issues.md -- bash -c '<update command>'
Never commit these files to feature branches.
Before completing any major phase, pause and verify:
At the start of this skill, check if contributor mode is enabled:
python3 scripts/kit_config.py get contributor_mode
If the result is true:
python3 scripts/contributor_report.py --skill <name> --step "<step>" --rating <N> --notes "<friction or suggestion>"
Every phase in this skill that has a CHECKPOINT block must be verified. Run the verification command after completing each phase. If the exit code is not 0, STOP immediately and report the failure. Do NOT proceed to the next phase.
Slug convention: After creating the worktree, store the branch slug (e.g., fix/bookmark-none-subscript) for use in checkpoint commands.
$ARGUMENTS is empty or blank, ask the user: "Please provide an error description, stack trace, or file path to diagnose."Steps:
gh authenticated (gh auth status).pytest to confirm no regressions. Suggest a regression test if none exists.WT="$(bash scripts/wt_setup.sh fix/<slug>)"
wt_setup.sh creates the worktree and writes the freeze marker inside
.claude-kit/freeze-dir.txt atomically. Apply the fix inside $WT/,
run tests from $WT/.CHECKPOINT — MANDATORY — NEVER SKIP Run:
bash scripts/checkpoint.sh --skill diagnose --phase worktree --issue "$SLUG"If exit code ≠ 0: STOP immediately and report the failure. Do NOT proceed.
CHECKPOINT — MANDATORY — NEVER SKIP Run:
bash scripts/checkpoint.sh --skill diagnose --phase test --issue "$SLUG"If exit code ≠ 0: STOP immediately and report the failure. Do NOT proceed.
gh issue create --title "fix: <concise bug description>" --body "<body>"$WT/).CHECKPOINT — MANDATORY — NEVER SKIP Run:
bash scripts/checkpoint.sh --skill diagnose --phase push --issue "$SLUG"If exit code ≠ 0: STOP immediately and report the failure. Do NOT proceed.
gh pr create --title "fix: <concise bug description>" --body "Closes #<issue_number>\n\n<details>"/review and /ship.If issues.md exists in the project root, register this work in the sprint ecosystem:
issues.md to find the next available ISSUE-NNN number.bash scripts/registry_edit.sh issues.md -- bash -c '<append issue entry>'
Issue fields:
<number><pr_url>If issues.md does not exist, skip this step silently.
gh auth status fails: stop and instruct the user to run gh auth login.bash scripts/wt_cleanup.sh <branch> for safe worktree removal —
the wrapper cd's to main root and removes the worktree in a single subshell.bash scripts/wt_cleanup.sh <branch>git push origin --delete <branch> (remote cleanup, if pushed)gh pr close <pr_number> then clean up worktree and branch as above.IMPORTANT: Never commit issues.md, STATUS.md, or CHANGELOG.md to the feature branch.
These are registry files managed only on main. Always use bash scripts/registry_edit.sh <file> -- bash -c '<update command>' — the wrapper resolves the main repo root internally.
npx claudepluginhub pillip/claude-dev-kit --plugin claude-dev-kitFixes GitHub issues using parallel analysis, hypothesis-based root cause analysis, similar issue detection, and prevention recommendations. Use for debugging errors, regressions, bugs, or triaging.
Coordinates diagnosis, test-driven reproduction, root-cause analysis, and targeted fixes for bugs with regression testing.