work-issue

Automates GitHub issue resolution through worktree-based branches, PR creation, and per-issue resolution comments.

Updated Jun 4, 2026
One-click install
npx skills add https://github.com/PeteRichardson/skills --skill work-issue-peterichardson
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: work-issue
Source: https://github.com/PeteRichardson/skills/tree/main/work-issue
Command: npx skills add https://github.com/PeteRichardson/skills --skill work-issue-peterichardson

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Turning a GitHub issue into a reviewed pull request involves repetitive, error-prone bookkeeping: naming branches consistently, avoiding duplicate work on issues already covered by a PR, isolating changes in worktrees, and explaining to each issue reporter what the PR proposes. This Skill automates that entire lifecycle so every issue follows the same auditable path from open issue to open PR. ## Core Features & Use Cases - Structured branch naming: Encodes PR number, issue number, and review finding ID in every branch name (e.g., PR68-Fix-I60-F3-rust-ps-path), with grouped and stacked variants for multi-issue units. - Duplicate-work and deferral guards: Checks open PRs, branch names, and deferral labels before starting, so an issue is never worked twice and deliberately deferred issues are never touched. - Worktree isolation and teardown: Creates a dedicated git worktree per issue, verifies clean state before removal, and keeps the worktree with a printed reason whenever teardown preconditions fail. - Per-issue resolution comments: Posts a proposal-phrased comment on each issue explaining the diagnosis, what the PR changes for that issue specifically, and what is deliberately out of scope. - Batch and stacked-PR support: Processes every unaddressed open issue sequentially using issue-triage dispositions, and restacks stacked PRs after a parent merges using recorded parent head SHAs. - Use Case: A maintainer returns from vacation to 12 open issues and types "/work-issue all" to get an ordered triage plan, then one worktree, branch, PR, and resolution comment per issue without manual bookkeeping. ## Quick Start Ask the assistant to work issue 60 on its own worktree, push the branch, open a PR, and post a resolution comment on the issue.

Frequently Asked Questions about work-issue

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I turn a GitHub issue into a pull request automatically?

Invoke the skill with an issue number, such as "/work-issue 60". It creates a worktree, implements the fix, pushes a branch named with the issue and finding IDs, opens a PR with a Fixes reference, and posts a resolution comment on the issue.

How do I fix every open GitHub issue that has no PR yet?

Run "/work-issue all" to enter batch mode. It filters out deferred and already-addressed issues, orders the rest using the issue-triage protocol, then works each unit sequentially on its own worktree with one PR per unit.

Can I work multiple related GitHub issues in one pull request?

Yes. When issue triage returns a GROUP disposition, all issues in the group share one worktree, branch, and PR. The branch name lists every issue number, the PR body carries one Fixes line per issue, and each issue gets its own distinct resolution comment.

How do I restack a stacked PR after its parent merges?

Run "/work-issue restack" to process all open stacked PRs, or name specific PR numbers. It rebases each child's own commits onto the new base using the parent head SHA recorded in the PR body's stack marker, then force-pushes with lease.

What happens if a worktree still has uncommitted changes at teardown?

Teardown aborts and the worktree is kept. The skill prints the worktree's absolute path and which precondition failed, and it never uses git worktree remove --force, so uncommitted or unpushed work is never destroyed.

Does the skill work on issues labeled backlog or deferred?

No. Issues carrying deferral labels like backlog, icebox, someday, or wontfix are skipped and reported. A user can explicitly override by naming the issue number directly, but the skill never strips the label or works it silently.