Your first issue to merged PR
In this tutorial you take one small issue all the way to a merged pull request, with an AI agent doing the work and you doing the reviewing. At the end you’ll have a merged PR on a sandbox repository that you can delete afterwards.
You’ll use two skills: github-issue-to-pr, which turns an issue into a PR, and
github-address-pr-review, which answers a review. This is the “curate issue by issue”
way of working described in How I work, and the
smallest piece of that workflow.
What you need
Section titled “What you need”- Claude Code, signed in.
- Git, and the
GitHub CLI (
gh), signed in. Check withgh auth status. just, a command runner. The skills run the project’sjust fmtandjust test.- The
claims-auditskill, whichgithub-issue-to-prneeds for its audit step. Install it into your Claude Code skills directory by following claims-mcp’s install guide, then restart Claude Code. - Python 3, for the sandbox project below.
1. Install the plugin
Section titled “1. Install the plugin”In Claude Code, run these two commands. They come from the github-workflows reference page, which has the install commands for other clients too.
/plugin marketplace add PeterGrace/pg-skills/plugin install github-workflows@pg-skillsStart a new Claude Code session afterwards so it loads the plugin.
2. Create a sandbox repository
Section titled “2. Create a sandbox repository”In a terminal, create a tiny project and push it to a new repository on your own
account. The project is one function and one test, and a justfile with the two
recipes that github-issue-to-pr expects, fmt and test.
mkdir sandbox-greeter && cd sandbox-greetergit init -b main
cat > greeter.py <<'PY'def greet(name): return "Hello, " + name + "!"PY
cat > test_greeter.py <<'PY'import unittestfrom greeter import greet
class GreetTest(unittest.TestCase): def test_greet(self): self.assertEqual(greet("Ada"), "Hello, Ada!")
if __name__ == "__main__": unittest.main()PY
cat > justfile <<'JUST'fmt: @echo "nothing to format"
test: python3 -m unittest -vJUST
cat > .gitignore <<'IGNORE'__pycache__/*.py[cod]IGNORE
just testgit status --shortgit add . && git commit -m "Add greeter"gh repo create sandbox-greeter --private --source=. --pushjust test should print OK. The .gitignore keeps Python’s __pycache__ out of the
repository, so later test runs don’t leave the working tree dirty. git status --short
should list only .gitignore, greeter.py, justfile and test_greeter.py. Making the repository private keeps your sandbox out of
sight, and you can delete it at the end.
3. File a tiny issue
Section titled “3. File a tiny issue”gh issue create --title "greet should handle an empty name" --body "greet(\"\") returns \"Hello, !\". It should return \"Hello, stranger!\" instead. Add a test."Note the issue number it prints. The rest of this tutorial calls it 1.
4. Run github-issue-to-pr
Section titled “4. Run github-issue-to-pr”Open Claude Code in the sandbox-greeter directory and say:
Run the github-issue-to-pr skill on issue 1.Here is what you should see. The skill is a push-through workflow, so it doesn’t stop to ask you unless something fails.
- Because your session is the top-level one, it hands the work to an
issue-implementersubagent in a worktree of its own, and relays the report. - The agent reads the issue, creates a branch named
<prefix>-issue-1-<slug>, where the prefix (fix,featorissue) depends on the issue’s labels and the slug comes from its title, and makes the change. - It runs
just fmtandjust test. It skipscargo clippybecause the project has noCargo.toml, and says so. Then it commits. - A second, fresh subagent audits the issue’s requirements and the draft PR description
against the commit. Your repository has no
claims.json, so the audit runs in table-only mode and nothing is recorded; the results go into the PR body. The audit follows theclaims-auditskill, which this plugin doesn’t ship. - It pushes, opens a PR whose body includes
Closes #1, and comments the PR link on the issue.
When it finishes you have a PR number. Open it with gh pr view 2 --web (use your number)
and look at the Summary, the Validation section and the Claims table. To read that
table, see Validate a change.
5. Review the PR
Section titled “5. Review the PR”The author uses a review bot, Brooke, for this step. You probably don’t have one, so you’ll be the reviewer. A bot is optional. To see what a bot review looks like, read one of Brooke’s. You don’t need one to finish this tutorial.
Post a review that asks for one more change. GitHub won’t let you approve your own PR, so leave a comment review:
gh pr review 2 --comment --body "Please also add a test for a name with surrounding spaces: greet(\" Ada \") should return \"Hello, Ada!\"."You can also open the PR in your browser, go to Files changed and leave inline comments on particular lines. The next skill reads both kinds.
6. Run github-address-pr-review
Section titled “6. Run github-address-pr-review”Back in Claude Code, say:
Walk through the review comments on PR 2.The implementer’s worktree may still have the PR’s branch checked out. If the skill
reports that it can’t check the branch out, run git worktree list, remove the
implementer’s worktree with git worktree remove <path>, and ask again.
This skill never asks you anything. For your comment it should:
- fetch the PR’s conversation comments, inline comments and review bodies, and find yours;
- decide to apply it, because it’s a sensible, cheap request within the PR’s scope;
- edit the code, add the test and commit it, quoting your comment in the message;
- run
just fmtandjust testagain, and push only when they pass; - reply naming the commit, after the push (a review body gets a top-level PR comment rather than a threaded reply);
- end with a report: the PR, a count per disposition, the commit SHAs, the validation results and the push status.
The skill may also choose to explain and change nothing, and then you’ll see a reply saying why. Either is a valid way to finish this step.
7. Merge
Section titled “7. Merge”Check the PR’s checks and read the new commit. Then merge. The skill doesn’t merge for you, and neither does the workflow unless you tell it to.
gh pr merge 2 --mergeBecause the PR’s base is main, the Closes #1 in its body closes the issue when it
merges. Check:
gh issue view 1 --json state -q .stateIt prints CLOSED.
What you did
Section titled “What you did”You took one issue to a merged PR: an implementer agent opened the PR and a second agent audited its claims, you reviewed it, and a second skill answered your review. That’s the whole loop. The epic workflow runs this same loop for many issues at once.
Next steps
Section titled “Next steps”- Delete the sandbox:
gh repo delete sandbox-greeter --yes(ghmay first ask you to rungh auth refresh -s delete_repo). - Read How I work to see where this fits.
- Plan a larger piece of work with Plan a milestone.