agentleFS
hdprajwalhdprajwal/agent-skills/skills/issue-to-pr/SKILL.md

issue-to-pr

Skill1 starsChanged 5 months agoMITView on GitHub

Take one independent open GitHub issue from the queue to an open PR by composing skills you already have — isolation, implementation, and review — then stop at the PR for your merge approval. Use to clear a GitHub issue queue one issue at a time (\"take issue #42 to a PR\", \"work the next issue\", \"grab an issue\"). One issue per run; never merges to main on its own.

  • Commits and pushes

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Scope: one issue per run: Do the whole pipeline for a single issue, open the PR, stop.

    line 16
  2. Distinctive:

    If nothing qualifies, stop and say so — don't force one.

    line 59
  3. Very specific:

    stop: Don't run gh pr merge — the merge is the user's call.

    line 132
  4. Very specific:

    Never gh pr merge — the merge is the user's.

    line 143
  5. Distinctive:

    Don't re-explain isolation, implementation, or review — invoke the skill.

    line 145
  6. Distinctive:

    Only blocking findings gate and trigger another round.

    line 146

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Issue to PR

Take one open GitHub issue from queue to PR. This skill is glue, not re-implementation — it picks an independent issue, then hands each step to the skill that already does it well, and stops before the merge.

Say at the start: "Using issue-to-pr — select → isolate → implement → review loop → PR, stopping before merge."

Scope: one issue per run. Do the whole pipeline for a single issue, open the PR, stop. To clear the queue, re-invoke (or wrap in /loop).

Never merge to main. The run ends at an open PR. The user merges.

What this skill reuses

The only thing unique here is selecting an independent issue and ordering the steps. Everything else is an existing skill — don't restate their content, invoke them:

StepDelegate to
Isolation (branch off main)using-git-worktrees — branch is the default
Implement the fixincremental-implementation — slices, green gate, commits
Dispatch fresh subagentssubagent-driven-development / dispatching-parallel-agents
Review the diff + apply fixescode-review skill (reviews current diff; --fix applies)

The pipeline

Preflight → Select issue → Isolate → Implement → Review loop (≤3) → Push → PR → STOP

0. Preflight

gh auth status            # gh authed
git status --porcelain    # working tree clean — stop if not
git switch main && git pull

Note the project's test and build commands (package.json / Makefile / Cargo.toml / CI). They're the green gate for every step below.

1. Select an independent issue ← the unique part

Dispatch the selector subagent (selector-prompt.md). It runs gh issue list / gh issue view and returns ONE issue solvable without waiting on any other — no "blocked by / depends on / after #N", not an epic, not already assigned or carrying an open PR. It returns the number, title, a one-line reason it's independent, and what "done" looks like.

If nothing qualifies, stop and say so — don't force one.

2. Isolate

Invoke using-git-worktrees. A plain feature branch is the default:

git switch -c fix/<N>-<short-slug>     # feat/ for features

3. Implement

Dispatch a fresh implementer subagent (the subagent-driven-development pattern). Its brief: the full issue text (paste it — don't say "go read the issue"), the definition of done, the project's test/build commands, and one instruction — follow the incremental-implementation skill: thin slices, tests + build green before moving on, commit each slice. Tests/build green is a hard gate; it does not report DONE on red.

Handle its status: NEEDS_CONTEXT/BLOCKED → resolve or stop and ask. Never push red code.

4. Review loop (max 3 rounds)

Each round, run the code-review skill on the current working-tree diff at high effort:

/code-review high

Map its output to blocking vs non-blocking:

  • Blocking (the "major" findings) — correctness bugs, missing/wrong behavior vs the issue, regressions, security holes, broken/missing tests. These gate the PR.
  • Non-blocking (the "minor" findings) — reuse / simplification / efficiency / style cleanups. These do not gate; carry them into the PR description.

Then:

  • Blocking findings, rounds remain → fix them and re-review. Use /code-review high --fix to apply directly, or for larger fixes dispatch a fresh subagent told to follow incremental-implementation and fix only the blocking findings. Re-run tests/build to green, commit, then review again.
  • No blocking findings → exit the loop; ready to push.
  • 3 rounds done, blocking findings remain → stop. Push nothing. Report what's left and what was tried; hand it to the user.

Non-blocking findings never trigger another round. Cap is 3 review→fix cycles.

5. Push + PR

Confirm tests/build green, then:

git push -u origin fix/<N>-<short-slug>
gh pr create --fill --body "Closes #<N>

<one-line summary of the fix>

Review: blocking findings resolved in N round(s).
Non-blocking follow-ups (from code-review):
- [ ] ...
"

Closes #<N> auto-closes the issue on merge.

6. Stop — hand off the merge

Report: PR URL, the issue it closes, how many review rounds ran and what blocking findings were fixed, the non-blocking follow-ups, and test/build status. Then stop. Don't run gh pr merge — the merge is the user's call.

Stop and ask when

Preflight fails · no independent issue exists · the implementer is BLOCKED · blocking findings survive 3 rounds · the fix needs a product decision the issue doesn't answer.

Remember

  • One issue per run. Open PR, then stop.
  • Never gh pr merge — the merge is the user's.
  • Tests/build green is a hard gate before every push.
  • Don't re-explain isolation, implementation, or review — invoke the skill.
  • Only blocking findings gate and trigger another round; cap at 3.

Related

  • using-git-worktrees, incremental-implementation, code-review, subagent-driven-development, dispatching-parallel-agents — the skills this one orchestrates.
  • to-issues / triage — fill and groom the queue this draws from.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.