piv-create-pr
Installation
SKILL.md
Create PR: Open the Pull Request, Hand Off for Review
This is the ship step of the PIV loop: the implementation is committed on a feature branch; now open the PR
so it can be reviewed (by the piv-review-pr agentic gate, then a human).
Phase 0 — Detect the base branch
Don't hardcode main. Resolve it:
- If
$ARGUMENTScontains--base <branch>, use that. - Else:
git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' - Fallback:
git remote show origin 2>/dev/null | grep 'HEAD branch' | awk '{print $NF}' - Last resort:
main. Store as{base}.