pr-craft
Installation
SKILL.md
pr-craft
Drive a clean PR end to end: branch, stage only the relevant files, conventional-commit, push, open the PR with a structured body.
Flow
- Inspect.
git status+git diff(andgit diff --staged). Identify which changed files belong to this task. Pre-existing modified/untracked files unrelated to the work (lockfiles, config, scratch dirs) are NOT yours — leave them. - Branch. If on the base branch (
main/staging/master), createtype/short-slug(e.g.fix/marketing-consent-required-signup). Type matches the commit type. If already on a feature branch, stay. - Stage explicitly.
git add <file> <file> …— name each relevant file. Nevergit add ./-A. Re-rungit statusto confirm only intended files are staged. - Commit. Conventional Commits subject (
type(scope): summary, ≤72 chars). Body explains why + bullet the changes. End withRefs task <id>/Refs <ticket>when known. Obey the repo's CLAUDE.md (e.g. noCo-Authored-Bytrailer if it says so). - Push.
git push -u origin <branch>. - Open PR.
gh pr create --base <base> --head <branch> --title "<same as commit subject>" --body "$(cat <<'EOF' … EOF)". Base = the branch the user named, else the repo default (staginghere, oftenmainelsewhere — checkgit remote show originor repo CLAUDE.md if unsure). - Report the PR URL. Offer follow-ups (log time, comment the link on the task).
PR body structure
Only include sections that carry signal — drop empty ones. Concise, no filler.