pr-createlisted
Install: claude install-skill matthull/my-skills
# PR Create
Create or update a pull request with a structured description that helps reviewers understand what changed, what was tested, and where to focus.
**Input:** `{{input}}`
---
## Mode Detection
Determine which mode to run in:
1. **Orchestrated mode** — a file path to a pre-filled PR description was provided (e.g., `specs/{project}/pr-description.md`). Read that file and use it as the PR body. The verifier or other upstream agent already filled the template with verification context.
2. **Standalone mode** — no pre-filled description provided. Gather context and fill the template yourself (see "Standalone Context Gathering" below).
If `{{input}}` contains a `.md` file path → orchestrated mode.
Otherwise → standalone mode.
---
## Step 1: Gather State
Use the **code-hosting** capability. Default (gh CLI), run these in parallel:
```
git branch --show-current # current branch name
git status # uncommitted changes
git log master..HEAD --oneline # commits on this branch
gh pr list --head $(git branch --show-current) --json number,url,state --limit 1
```
From this determine:
- **Branch name** and **ticket ID** (extract from branch prefix, e.g., `abc-214` from `abc-214-add-csv-export` — see `resources/domain-skill.md` for this project's ticket prefix pattern; skip ticket linking if none is configured)
- **PR exists?** — if yes, this is an update; if no, this is a create
- **Uncommitted changes?** — if yes, commit first (ask use