create-pr · git:20260916.b1ca260 · 2026-09-16 · sha256 20bb2b98f9dd8493

create-pr git:20260916.b1ca260A

Immutable. This exact content is served forever at /api/v1/blob/20bb2b98f9dd8493.

---
name: create-pr
description: >-
  Open a pull request for a finished feature branch: push it through the guard, link its issue,
  gate the title, and open it ready when the full test passes (a draft when asked, or when the
  test is red). Triggers: "open a PR for this branch", "create a pull request for my fix", "turn
  this branch into a PR", « ouvre une PR pour ce correctif », « crée la pull request ». Does NOT
  apply to merging a PR (merge-pr), building a planned issue (implement-issue), reviewing a diff
  (code-review), or filing an issue (create-issue).
license: MIT
compatibility: >-
  Requires an authenticated gh CLI with push rights, and git. Reads the committed repo profile
  (.claude/skills/repo-profile.md) generated by profile-repo. Pushes through implement-issue's
  guarded-push.sh and opens the PR through skills/_shared/open-pr.md.
metadata:
  author: Philippe Matray
  suite: tagout
---

# Open a pull request for a finished branch

## What this does

`implement-issue` opens its draft PR before any work lands. A branch built any other way — a fix
committed by hand, a spike that turned out right — needs a way to become a PR the way the kit
expects. This skill is that way: `/create-pr [#<issue>] [--draft]` on a feature branch whose
commits are done pushes it through the guard, decides ready or draft, and opens the PR through
[`../_shared/open-pr.md`](../_shared/open-pr.md) — the one home of the existence lookup, the title
gate and the create call. Then it hands off to `merge-pr`.

## Autonomy contract

Run **hands-off** once started. See
[ADR 0005](../../docs/adr/0005-the-lifecycle-skills-run-hands-off-triage-backlog-does-not.md) for the
decision scope: pick the reasonable default, state the assumption, keep going. Stop only for a
genuine blocker:

- `gh` not authenticated, or no push rights.
- A Step 2 refusal — the default branch, a dirty tree, nothing ahead of it, a closed issue. Each one refuses before any write.
- A PR already open for this branch or its issue: report it, open none.
- A guard exit that is not a success, or a readback that does not match.

A red *Full test* is not a blocker. It opens a draft and says why, so nobody merges it by mistake.

## Checklist

Create a task per item and work them in order.

1. **Preconditions** — profile, `gh` auth, commit identity.
2. **Locate the work** — the branch, its issue, the refusals and the existing-PR lookup, all before any write.
3. **Open** — guarded push, ready or draft, the body, then the shared PR-open recipe.
4. **Recap** — the shared closing shape ([`../_shared/recap.md`](../_shared/recap.md)), Next `/merge-pr #<pr>`.

Resume-safe: a re-run finds the PR an earlier run opened (the recipe's §1) and stops on it.

---

## How to read this skill

**One step file at a time, when you reach it — never all up front.** Every token loaded here is
re-read on every later turn, so the step bodies live under `references/steps/`. Open a step when its
checklist item starts; the shared references it names load the same way.

- Step 1 — [`references/steps/01-preconditions.md`](references/steps/01-preconditions.md) · reads [`_shared/preconditions.md`](../_shared/preconditions.md)
- Step 2 — [`references/steps/02-locate-the-work.md`](references/steps/02-locate-the-work.md) · reads [`_shared/open-pr.md`](../_shared/open-pr.md)
- Step 3 — [`references/steps/03-open.md`](references/steps/03-open.md) · reads [`_shared/open-pr.md`](../_shared/open-pr.md), [`_shared/guard-invocation.md`](../_shared/guard-invocation.md)
- Step 4 — [`references/steps/04-recap.md`](references/steps/04-recap.md) · reads [`_shared/recap.md`](../_shared/recap.md)