How to deliver the work - commit, branch, and open the PR that closes the issue. Use in the final step of /flow:implement. Ensures GitHub closes the issue on merge and the PR documents how to verify.
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 Pr Delivery?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/eusilvio-pr-delivery)
---
name: pr-delivery
description: "How to deliver the work - commit, branch, and open the PR that closes the issue. Use in the final step of /flow:implement. Ensures GitHub closes the issue on merge and the PR documents how to verify."
user-invocable: false
---
# PR delivery
## Commit
- Descriptive message in the repo's style (see `repo-conventions` for the
convention). If Conventional Commits, e.g. `fix: include discount in buildQuote`.
- One coherent commit per logical unit; do not mix the change with unrelated
formatting.
- **No AI co-authorship trailer.** Never add `Co-Authored-By` or any trailer
naming an AI tool. A hook rejects such commits; the human is the only author.
## Branch + PR
- Branch name: `fix/<number>-<short-slug>` or `feat/<number>-<short-slug>`.
In a worktree (`WT=<path>` in your prompt) the worktree is detached at the
base: `git checkout -b <branch>` there. Never create the branch in the main
checkout when a worktree was given.
- Open the PR with `gh pr create`. The body must contain the line
`${CLAUDE_PLUGIN_ROOT}/scripts/flowctl.py spec ref <number>` prints:
`Closes #<number>` for a GitHub issue (GitHub closes it on merge), or
`Flow-Spec: <number>` for a local spec (`.flow/specs/<number>.md`, no GitHub
issue; the merge closes it). Never write `#<number>` for a local spec - it
would link an unrelated GitHub issue.
### Base branch - resolve it, never guess it
Resolution order, stop at the first hit:
1. **`CLAUDE.md` names a base** (a rule like "PRs open against `<branch>`",
possibly conditional on the current branch): use it.
2. **The user asked for a base**: use it.
3. Otherwise the repo's default branch:
```bash
gh repo view --json defaultBranchRef --jq .defaultBranchRef.name
```
Then confirm it exists on the remote (`git ls-remote --heads origin <base>`).
If the base named by CLAUDE.md does not exist there, do not invent one: in
`--auto` push the branch and end with `PIPELINE:FAILED no-base`; interactive,
ask.
Always pass `--base <base>` explicitly to `gh pr create`. Note that `Closes #N`
only auto-closes the issue when the PR merges into the default branch; for any
other base `/flow:merge` closes it by hand.
- **Do not close the issue or the spec by hand** - the merge (or `/flow:merge`) does.
- **`gh` GraphQL warning**: never use `gh issue view` or `gh pr view` without
explicit `--json` fields - the default query fetches `projectCards`
(deprecated, exits 1). `gh pr edit` also triggers this; use
`gh api -X PATCH repos/{owner}/{repo}/pulls/{n} -F body=...` instead.
## PR body
Include:
- What was done (short summary, not a narrated diff).
- How to verify: the exact commands the user should run manually
(test/lint/typecheck) and the route/URL when there is a UI.
- **Critérios da issue**: a checklist pulled from the issue body, item by
item, as `- [ ] <criterion>`. Same list that gets printed in chat (below).
- Local spec: the spec file is not on GitHub, so the PR body also carries the
spec title on top - the reviewer only sees the PR.
- Known risks or follow-ups, if any.
## After the PR is created - show the criteria
End the response by printing the issue's success criteria as a checklist
directly in chat, so the user can verify without opening the issue:
```
PR: <pr-url>
Critérios da issue #<number>:
- [ ] <criterion 1>
- [ ] <criterion 2>
...
```
Pull the criteria from the issue body - not invented. If the issue has none,
say so explicitly.