pr
SkillDev toolsUse when the user explicitly asks to push the current branch and open a PR, rewrite an open PR's body from its commits, or wait for CI and merge it
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the pr skill
What this skill tells your AI
The instructions your AI receives, as published by vinta/hal-9000 in skills/pr/SKILL.md and read by ahel’s review.
Invoking this skill IS the request. Your task is fully specified here. Never ask what to do.
Your first Bash call is cd "$(git rev-parse --show-toplevel)", alone, once. The working directory persists across Bash calls, so run every later command bare, exactly as written below. A cd ... && or $() prefix stops a command matching allowed-tools, and the merge then hits the permission gate.
The user invoked this skill with: "$ARGUMENTS"
Mode comes from the arguments first: create means create mode, update means update mode, merge means merge mode. With none of those three words, including an empty argument, run gh pr view --json state --jq .state 2>/dev/null and let its result decide: a non-zero exit (no PR for this branch) means create mode, OPEN means update mode, any other state means report that state and stop. Merge mode only ever comes from the argument.
PR material
Create mode and update mode run these steps where they say "gather PR material":
-
git log --format='%n%s' --name-only main..HEAD(fall back tomaster..HEAD). Each commit is a block: its subject, then the files it touched. A flat log next to a branch-wide diff stat lets the writer guess which commit touched which file. -
The PR describes the net change of the branch. A commit whose subject starts with
Revert "and the commit it names cancel each other when both sit in the log, and a subject starting withchore: bumpdescribes no change. Remove those blocks from the log before passing it on. -
git log --format=%b main..HEAD(same fallback). Collect every issue number written as#Nor as a GitHub issue URL. Each one becomes aFix #Nline at the end of the body, one per line, no duplicates. -
Invoke the
write-like-meskill. Pass as argument: "Write a GitHub PR title and body from the material below. Output the title as the first line, a blank line, then the body, and nothing else: the caller splits on the first line, so a label or heading would land in the title.
Title: one plain-English line under 72 chars that names the change itself, with no fix: or feat: type prefix. GitHub shows titles as plain text, so write file names bare, without backticks. Body: GitHub renders it as markdown, so wrap every file path, command, flag, and identifier in backticks, at every occurrence. Body shape depends on how many separate changes the branch holds.
One change: 1-3 sentences of prose, what changed and why, no list.
Adds a pr skill that pushes the current branch, drafts a PR title and body with write-like-me, and opens the PR with gh. Wires it into the plugin manifest and marketplace so it ships with hal-skills.
Two or more changes: one - item per change, each item 1-3 short sentences stating the change and one before/after example when the change has a visible input and output. Apply this to every change, not only the first.
- Move
name-suffixfrom AI spacing into the core rules. - URLs are left alone. Anything starting with
http://orhttps://is hidden from the rules, so%E4%B8%ADand/wiki/CJK#CJKsurvive. /next to CJK never gets spaces anymore.CJK/CJKstaysCJK/CJK, same as_. File paths still work:CJK/homeCJKbecomesCJK /home CJK.
" followed by the log from step 2, then a closing "" line.
- From
write-like-me's output, take the first line as title, the rest as body. Append a blank line and theFix #Nlines from step 3 to the body.
Create mode
git rev-parse --abbrev-ref HEAD— abort ifmainormaster.gh pr view --json url 2>/dev/null— if a PR already exists, report its URL and stop.git push -u origin HEAD.- Gather PR material.
gh pr create --title "<title>" --body "<body>".- Report the PR URL.
Update mode
gh pr view --json url,state 2>/dev/null— abort if no PR or not open.git log --oneline @{u}..HEAD— if it lists commits,git pushso the PR shows them.- Gather PR material.
gh pr edit --body "<body>"— the title stays as it is.- Report the PR URL.
Merge mode
gh pr view --json url,number,state— abort if no PR or not open.git log --oneline @{u}..HEAD— if it lists commits,git pushso CI and the merge see them.gh pr checks --watch— blocks until all checks complete. Use a 10-minute Bash timeout. If you pushed and it reports no checks yet, the push just queued them: wait 15 seconds and run it again once.- If exit code 0 (all checks passed):
gh pr merge --merge --delete-branchgit switch main && git pull- Delete local branch if it still exists:
git branch -d <branch> - Report: merged, remote and local branches cleaned up.
- If non-zero (check failed):
- Run
gh pr checksonce more to list failed checks and their URLs. - Report which checks failed. Take no other action.
- Run
Signals
- GitHub stars
- 130
- Forks
- 25
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
pr-vinta- Source
- github.com/vinta/hal-9000