From specpilot
Refine the next ticket from the Todo column using speckit. Use this when the user runs /specpilot.refine or asks to refine, spec, or plan the next ticket from the board.
How this skill is triggered — by the user, by Claude, or both
Slash command
/specpilot:specpilot.refineThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Pick the next ticket from the **To do** column, run it through speckit, and move it to **Ready**.
Pick the next ticket from the To do column, run it through speckit, and move it to Ready.
Board-first flow: the ticket already exists on the GitHub Project board. Use
/specpilot.specifyinstead if you want to start from a feature idea and create the ticket automatically.
$ARGUMENTS may contain:
--once — process one ticket then stop--dry-run — show which ticket would be picked, do nothingRead .specpilot.json from the project root. If missing, tell the user to run /specpilot.setup first and stop.
Identify:
role: "spec" → speckit writes artifacts here (speckit.specsDir)speckit.workspaceDir → where speckit slash commands run fromgh project item-list command every time this step is reached — including when looping back from Step 5. NEVER reuse a previously fetched ticket list.gh project item-list <projectNumber> --owner <owner> --format jsonstatus exactly matches config.statuses.todo (read from .specpilot.json — do NOT hardcode "Todo" or any other string; the actual value may contain spaces, e.g. "To do")assignee is set in config, additionally filter by that assignee--dry-run, print the ticket title and stopgh issue view <number> --repo <owner>/<repo> --json title,body,labels. Do NOT rely on the item-list summary — the ticket may have been updated.config.github.assignee using gh project item-edit with the assignee field (if assignee is set in config)Read the ticket title and body. Determine whether the ticket describes:
Classification signals (check in order):
bug label → BugIf Bug → go to Step 2b (Bug routing) If Feature → go to Step 3 (Run speckit — full pipeline)
Bugs belong in existing specs, not in new spec folders. Route the bug to the correct parent spec:
List existing specs: Read all spec.md files in the specs directory (speckit.specsDir), scanning recursively to support both flat structures (specsDir/005-foo/spec.md) and app subfolders (specsDir/member/005-foo/spec.md). For each spec, note:
005-recurrent-transactions)member)spec.md)Match the bug to a spec: Compare the ticket description against each spec's scope. Look for:
Confirm with user: Present the match:
"This looks like a bug in [spec name]. I'll add it to
[spec-folder]/spec.mdas a bug fix entry. Correct?"
Write the bug into the existing spec: Append to the "Bug Fixes" section of the matched spec.md:
BUG-R09, BUG-047)Update the plan: If plan.md exists for the matched spec, append a bug fix design section with root cause analysis and fix strategy. If the bug is simple enough (clear fix, no design decisions), this step can be skipped.
Update tasks: If tasks.md exists for the matched spec, append a new phase with implementation tasks for the bug fix. Follow the existing task format (task IDs, file paths, test tasks).
Label the ticket as a bug: Apply the bug label to the existing GitHub issue:
bug label exists in the repo: gh label list --repo <owner>/<repo> --json namegh label create bug --repo <owner>/<repo> --color "d73a4a" --description "Something isn't working"gh issue edit <issue-number> --repo <owner>/<repo> --add-label "bug"[BUG] prefix to the title — the label is the canonical markerPush spec branch and open PR: Create a branch, commit, push, and open a PR — same as features:
git checkout -b bugfix/<BUG-ID>-<short-description> (e.g. bugfix/BUG-D01-monthly-summary-overflow)git add the changed spec files and git commit -m "<ticket title>"git push origin <branch-name>gh pr create --title "<ticket title>" --body "Bug fix spec for <ticket title>"Exception: Only push directly to main if the user explicitly asks for it.
Run all four speckit commands sequentially from speckit.workspaceDir.
App subfolder detection → Before running specify, check if speckit.specsDir contains app subfolders (directories like member/, admin/ that themselves contain numbered spec folders). If multiple app subfolders exist, ask the user which app this feature targets:
"I found multiple app folders in specs: member, admin. Which app is this feature for?" Store the chosen app name for passing to the create-new-feature script via
-App <name>.
specify → Read the ticket title and body from GitHub. Run /speckit.specify passing the full ticket description as input. If an app subfolder was selected, the create-new-feature script will receive the -App parameter to create the spec in the correct subfolder.
clarify → Run /speckit.clarify. When clarify has questions:
plan → Run /speckit.plan
tasks → Run /speckit.tasks
In the spec location (speckit.specsDir):
012-feature-name)git push origin <branch>gh pr create --title "<ticket title>" --body "Spec for <ticket title>"config.statuses.ready in the GitHub Projectconfig.github.assignee is still assigned to the ticket--once, stopProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
npx claudepluginhub eduardo-caua/cogloop --plugin specpilot