Solve one GitHub issue or a group of issues in a single PR end-to-end: fetch the issues, create a branch in a worktree, launch the team-develop agents.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Solve Issue?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/bug-ops-solve-issue)
---
name: solve-issue
description: "Solve one GitHub issue or a group of issues in a single PR end-to-end: fetch the issues, create a branch in a worktree, launch the team-develop agents."
when_to_use: "'solve issue', 'fix issue', 'implement issue', 'work on #N', 'solve #N and #M together'."
argument-hint: "<issue-number>[,<issue-number>...][;<issue-number>...]"
arguments: issues
allowed-tools: Bash(gh issue view *), Bash(gh issue edit *), Bash(gh issue artifact list *), Bash(gh issue artifact view *), Bash(git fetch *), Bash(git symbolic-ref *), Bash(git remote show *), Bash(gh api *), Bash(git branch *), Bash(test *), Bash(echo *)
---
# Solve GitHub Issue
Solve one GitHub issue, or a group of issues in a single PR, end-to-end using the team-develop agent workflow.
**Issues**: $issues
The argument is one issue number or a list in the format `/dev-agents:triage-and-solve` produces: commas separate issues of one track in solve order (blockers first), semicolons separate tracks that parallel developers implement independently. A list without semicolons is a single track. Keep the order and the tracks through every step.
## Preflight (collected automatically when this skill loads)
- Current branch: !`git branch --show-current 2>/dev/null || echo not-a-git-repo`
- Branching rules: !`test -f .claude/rules/branching.md && echo present || echo absent`
- Commit rules: !`test -f .claude/rules/commits-and-issues.md && echo present || echo absent`
## Steps
**1. Fetch issue data and assign**
Call `Skill(skill: "dev-agents:github-issues")` first: it covers the issue type and relation fields used below, statuses, artifacts, and the fallback for a `gh` that lacks them.
Split the argument into tracks on semicolons and each track into issues on commas, trim spaces and a leading `#`, and drop duplicates while keeping the first occurrence. For each number, in order:
Run: `gh issue view <number> --json number,title,body,labels,milestone,state,comments,issueType,subIssues`
A closed issue is dropped with a warning, and a track left empty is dropped; if no open issue is left, stop and report. Assign every remaining issue to yourself:
Run: `gh issue edit <number> --add-assignee @me`
Where the repository has issue statuses, set each assigned issue to `In progress` (github-issues, Status): assignment alone leaves it at `Todo`.
Parse per issue:
- `number`, `title`, `body`, `comments` → passed to team-develop (a spec too large for the issue body sits in the first comment, so the comment bodies travel with the issue); document artifacts of the issue (github-issues, Evidence) travel with it the same way
- `labels`, `issueType` → a `bug`/`fix` label or the `Bug` issue type chooses the branch prefix (`fix/` vs `feat/`)
- `milestone` → extract milestone number N for `feat/mN/` branch names (if present)
For a group, detect **tracking parents**: an issue whose open sub-issues (`subIssues.nodes` with `state` `OPEN`) are all in the list. A tracking parent is closed by the PR but not implemented on its own.
**2. Determine branch name**
Branch naming convention:
- Bug/fix label or `Bug` issue type → `fix/<short-slug>` (max 30 chars)
- Feature / no label with milestone → `feat/m{N}/<feature-slug>` where N comes from the milestone number
- Feature / no label without milestone → `feat/issue-{number}/<feature-slug>`
Slug derivation: take the issue `title`, lowercase it, replace non-alphanumeric runs with `-`, trim leading/trailing dashes, truncate to 30 chars.
For a group, derive the name from the first issue of the first track that is not a tracking parent; use `fix/` only when every issue is a bug by label or type, and `feat/m{N}/` only when every issue shares milestone N.
**Note**: If the preflight shows `.claude/rules/branching.md` as present, read it and follow those conventions instead of the defaults above. If `.claude/rules/commits-and-issues.md` is present, read it for commit message format and issue filing rules.
**3. Sync the default branch**
Run: `git fetch origin`, then `git symbolic-ref --short refs/remotes/origin/HEAD` → `{default}` (e.g. `origin/main`; when unset, `git remote show origin` names it on the `HEAD branch:` line).
**4. Create worktree**
Use the `EnterWorktree` tool with:
- `branch`: the branch name derived above
- `base`: `{default}`
This triggers the WorktreeCreate hook and switches the session cwd automatically. **Never** use `git worktree add` directly.
**5. Run team-develop workflow**
Invoke the team-develop skill to orchestrate development directly (you are the team lead).
Single issue:
```
Skill(skill: "dev-agents:team-develop", args: "Implement GitHub issue #{number}: {title}\n\nIssue body:\n{body}\n\nIssue comments:\n{comments}\n\nThe PR body closes #{number}:\nCloses #{number}\n\nWorking branch: {branch-name}\n\nFollow project rules in `.claude/CLAUDE.md` and `.claude/rules/` if they exist.")
```
Group — one section per track, one subsection per implemented issue, in solve order:
```
Skill(skill: "dev-agents:team-develop", args: "Implement GitHub issues in one branch and one PR. Tracks are independent: implement them with parallel developers, one developer per track, each owning only its track's files. Within a track, issues go in the listed order and each may build on the ones before it.\n\n## Track 1: #{n1}, #{n2}\n\n### Issue #{n1}: {title1}\n\n{body1}\n\nComments:\n{comments1}\n\n### Issue #{n2}: {title2}\n\n{body2}\n\nComments:\n{comments2}\n\n## Track 2: #{n3}\n\n### Issue #{n3}: {title3}\n\n{body3}\n\nComments:\n{comments3}\n\nTracking parents closed by this PR, not implemented separately: #{p}\n\nThe PR body closes every issue above and every tracking parent, one closing keyword per line:\nCloses #{n1}\nCloses #{n2}\nCloses #{n3}\nCloses #{p}\n\nWorking branch: {branch-name}\n\nFollow project rules in `.claude/CLAUDE.md` and `.claude/rules/` if they exist.")
```
Omit the tracking-parents line when there are none. With a single track, drop the track headings and the parallel-developers sentence.
## Notes
- Always use `EnterWorktree` (never `git worktree add`) — the hook switches session cwd
- If project-specific branching rules exist in `.claude/rules/`, follow them
- After team-develop completes, follow any PR checklist defined in the project rules
- `Closes #1, #2` on one line auto-closes only the first issue — each closing keyword goes on its own line