This skill should be used when the user asks to "solve an issue", "implement a ticket", "Issue lösen", "Ticket implementieren", "löse #42", "#42 umsetzen", "solve issue", "implement ticket", "Epic abarbeiten", "Milestone umsetzen", "work on issue", "fix #42", "bearbeite #42", "start working on", "implementiere #42", "mach #42", "arbeite an Issue #42", "Ticket abarbeiten", "PR für #42 erstellen", or wants to implement one or more GitHub/GitLab issues through the full lifecycle: worktree, brainstorm, plan, implement, quality-gate, and PR creation.
Implement GitHub/GitLab issues through the full development lifecycle. Read the issue, create an isolated worktree, brainstorm and plan the solution, implement it, run quality gates, verify against acceptance criteria, and ship a PR that auto-closes the issue. Supports single tickets, multiple specific tickets, and entire epics or milestones.
Parse the user's request to identify the execution mode:
If the scope is ambiguous, ask the user to clarify. Present the options:
What is the scope?
→ Single ticket — just #{number}
→ Multiple tickets — specify which numbers
→ Full milestone/epic — implement all open tickets in {name}
Check the current session context for the SessionStart hook output:
Flow Plugin: Platform detected — **GitHub** (use gh CLI)Flow Plugin: Platform detected — **GitLab** (use glab CLI)If no hook output is present, fall back to manual detection:
git remote get-url origin 2>/dev/null
github.com → use gh CLIgitlab → use glab CLIStore the platform for all subsequent commands. Never mix gh and glab in the same
invocation. See references/platform-detect.md (in issue-engineer skill) for the full
CLI command mapping.
Execute these steps in order for a single ticket. Each step must complete before the next begins.
Fetch the full issue content:
GitHub:
gh issue view {number} --json title,body,labels,milestone,assignees
GitLab:
glab issue view {number}
Parse the response and extract:
If the issue body is empty or has no acceptance criteria, warn the user. Suggest using
the issue-engineer skill to improve the ticket before proceeding. Do not implement
tickets with no clear definition of done.
Invoke superpowers:using-git-worktrees to create an isolated worktree.
Branch naming convention:
feature/issue-{number}-{slug}
Derive the slug from the issue title: lowercase, replace spaces and special characters with hyphens, remove consecutive hyphens, truncate to 40 characters, strip trailing hyphens.
Examples:
feature/issue-42-add-user-authenticationfeature/issue-15-fix-login-redirect-bugPass the branch name to the worktree skill. It handles git worktree add and changes
the working directory into the new worktree.
This is the core of the ticket-solver. Invoke superpowers:brainstorming with the
issue context. This single invocation triggers an automatic three-step chain:
brainstorming → writing-plans → subagent-driven-development
Do NOT invoke writing-plans or subagent-driven-development manually. The chain is automatic. Brainstorming completes its design exploration and automatically transitions to writing-plans. Writing-plans produces the implementation plan and automatically offers execution via subagent-driven-development (for 3+ independent tasks) or executing-plans (for 1-2 sequential tasks).
The ticket-solver's only job is to kick off brainstorming with the right context.
Context to provide in the brainstorming invocation:
What happens during the chain:
Wait for the entire chain to complete before proceeding to the quality gate.
After implementation completes, invoke the quality-gate agent:
Invoke agent: quality-gate
The agent runs four stages (see references/quality-gates.md for full details):
silent-failure-hunter — silent failures, swallowed errorscode-simplifier — unnecessary complexitycode-reviewer — project standards and conventionspr-test-analyzer — test coverage gapsPROCEED or FIX REQUIREDHandle the result:
PROCEED → move to verification (Step 3.6)FIX REQUIRED → fix all must-fix issues (Step 3.5), then re-invoke the quality gateFor trivial changes (typo fixes, documentation-only), skip Stage 2 and run only
build & tests. See references/quality-gates.md for skip criteria.
If the quality gate reported must-fix issues:
Repeat the quality gate cycle until the recommendation is PROCEED.
Invoke superpowers:verification-before-completion:
Do not claim completion without evidence. The verification skill requires actual command output confirming success — no assumptions.
Create a pull request that links back to the issue.
GitHub:
gh pr create \
--title "{issue title}" \
--body "$(cat <<'EOF'
Closes #{number}
## Summary
{description of what was implemented}
## Acceptance Criteria
- [x] Criterion 1
- [x] Criterion 2
- [x] Criterion 3
## Quality Gate
- Build & Tests: PASSED
- Must-Fix issues: 0
EOF
)"
GitLab:
glab mr create \
--title "{issue title}" \
--description "$(cat <<'EOF'
Closes #{number}
## Summary
{description of what was implemented}
## Acceptance Criteria
- [x] Criterion 1
- [x] Criterion 2
- [x] Criterion 3
## Quality Gate
- Build & Tests: PASSED
- Must-Fix issues: 0
EOF
)"
Critical: The body must contain Closes #{number} so merging auto-closes the issue.
Use commit-commands:commit-push-pr as an alternative — ensure the issue reference is
included regardless of method.
Report completion to the user with the PR link, branch name, and confirmation that all acceptance criteria passed.
Use this workflow when the scope is a milestone, epic, or multiple tickets.
GitHub — by milestone:
gh issue list --milestone "{name}" --state open --json number,title,labels,body,assignees
GitLab — by milestone:
glab issue list --milestone "{name}" --opened --output-format json
Multiple specific tickets:
Fetch each issue individually using the commands from Step 3.1.
Spawn the epic-orchestrator agent with all ticket details:
Invoke agent: epic-orchestrator
Context: All fetched tickets with titles, bodies, labels, and dependencies
The agent returns:
Present the proposed order to the user. Accept adjustments before starting.
Create a task to track progress across context compactions:
TaskCreate: "Epic: {name}"
- Ticket #{a}: {title} — pending
- Ticket #{b}: {title} — pending
- Ticket #{c}: {title} — pending
For each ticket in the determined order:
TaskUpdate: Ticket #{number} — done (PR #{pr})Blocking failure (subsequent tickets depend on the failed one):
Independent failure (no dependencies broken):
Ticket #{number} — FAILED ({reason})Present a summary table after all tickets are processed:
## Epic Complete: {name}
| Ticket | Title | PR | Status |
| ------ | ----------------------- | ---- | ------ |
| #42 | Add user authentication | #101 | done |
| #43 | Add password reset | #102 | done |
| #44 | Add OAuth2 support | — | FAILED |
Completed: 2 of 3 tickets
PRs created: #101, #102
Failed: #44 — {failure reason}
These rules apply to all execution modes:
In epic/milestone mode, compact after every completed ticket. Each ticket consumes significant context (issue content, brainstorming, plan, implementation, quality gate). Without compaction, context limits are reached after 2-3 tickets. The task list persists through compaction.
The brainstorming → writing-plans → subagent-driven-development chain delegates heavy work to subagents operating in isolated contexts. Only results return to the main context, not full implementation traces. This is the primary mechanism for keeping the main context manageable.
Use TaskCreate and TaskUpdate to maintain state across compactions:
GitHub/GitLab is the source of truth, not in-memory state. To check if a ticket was already implemented after a context loss:
gh pr list --search "closes #{number}" --json number,state
Skip tickets that already have open or merged PRs.
brew install gh or
brew install glab). Do not fall back to raw API calls.gh auth login or glab auth login.gh issue view {number}.references/implementation-flow.md — detailed step-by-step flow with all commands,
decision points, and the full epic workflow including failure handlingreferences/quality-gates.md — quality gate stages, agent table, severity
categories, report format, and skip criteriareferences/platform-detect.md (in issue-engineer skill) — platform detection
logic and the complete gh vs glab CLI command mapping