plan-bug/SKILL.md
Interview the user about a bug and file it as a `planned + afk` GitHub issue ready for autonomous implementation. Use when the user wants to log a bug, report a defect, or file a bug ticket. Trigger phrases - "/plan-bug", "log a bug", "file a bug".
npx skillsauth add paulund/ai plan-bugInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Fast-path for logging bugs the user already understands. Interview, file, done — no codebase exploration, no reproduction attempt. The agent that later picks up the issue (via /dev-implement or an orchestrator) does the investigation.
For underspecified bugs that need evaluation or repro, use /ops-triage instead.
Confirm the repo from git remote. If the user already gave a one-line description, skip ahead. Otherwise ask: "What's the bug?"
Ask one question at a time, conversationally. Skip anything the user has already volunteered. Required fields:
Title — one-line summary, imperative present (e.g. bug: search returns stale results after filter change).
Steps to reproduce — numbered, concrete. Push back on "sometimes it breaks" — get the specific path that triggers it.
Expected behaviour — one or two sentences.
Actual behaviour — one or two sentences. Include any error message or console output the user has.
Severity — let the user describe impact (who's affected, how often, is there a workaround). Use that to recommend a priority:
p1 — data loss, security, blocks core flow, affects all usersp2 — significant feature broken, has workaround, or affects many usersp3 — edge case, cosmetic, low impactShow the recommendation and reasoning. Let the user override.
Environment (only when relevant) — browser/OS/version, account type, feature flags. Skip for backend-only bugs.
First seen / regression? — if the user knows when it started, capture it.
If the user can't produce repro steps, don't fabricate them. Recommend hitl with a note that repro is needed.
afk when: clear repro, clear expected vs actual, no judgement call needed on the fix.hitl when: acceptance criteria are fuzzy, fix involves a product/UX trade-off, or the bug touches a sensitive area (payments, auth, data migrations).State the recommendation and the reason. Let the user override.
Show the drafted issue — title, full body, and the exact label set — before filing. Wait for explicit "yes / file it / go ahead" before creating.
gh issue create \
--title "bug: <short description>" \
--label "bug,planned,<afk|hitl>,p<1|2|3>" \
--body "$(cat <<'EOF'
> *This was generated by AI during bug logging.*
## Summary
<one-paragraph description of the bug>
## Steps to reproduce
1. ...
2. ...
3. ...
## Expected behaviour
<...>
## Actual behaviour
<...>
## Environment
<browser/OS/version, or "n/a — backend">
## First seen
<when it started, or "unknown">
## Acceptance criteria
- [ ] <specific, testable criterion>
- [ ] Regression test added that fails before the fix
EOF
)"
After filing, print the issue URL. The planned + afk labels signal that the issue is ready for autonomous implementation — an orchestrator polling those labels will pick it up, or a human can invoke /dev-implement directly with the issue number.
Must:
> *This was generated by AI during bug logging.*) at the top of every issue body.bug + planned + (afk | hitl) + (p1 | p2 | p3).gh issue create.Must not:
hitl.needs-triage or needs-info — those belong to /ops-triage. plan-bug is for bugs the user already understands well enough to file directly.development
Use when implementing any logic, fixing any bug, or changing any behaviour. Use when you need to prove code works, when a bug report arrives, or when modifying existing functionality. Do NOT use for config changes, data migrations, or dependency updates.
development
Use when starting a new feature, when requirements are unclear, when asked to write code without a clear spec, or before any non-trivial implementation. Do NOT use for trivial bug fixes or one-line changes.
development
Use when you want authoritative, source-cited code free from outdated patterns. Use when building with any framework or library where correctness matters. Detects the stack from dependency files, fetches official documentation, implements following documented patterns, and cites sources for every framework-specific decision.
development
Use when preparing to ship a feature, release, or deployment. Use before merging to main, creating a release, or deploying to production. Do NOT use for CI-only changes or internal refactors that don't reach production.