Agent skill

PR

by vinta in vinta/hal-9000

A skill your agent uses 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

MITAuto-check passedDevelopment

Install PR

skills CLI
$ npx skills add vinta/hal-9000 --skill pr -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vinta/hal-9000 pr --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vinta/hal-9000.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/pr .claude/skills/pr && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pr
GitHub stars
138
Token cost
~1.4k tokens
SKILL.md length
909 words
Files
1
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses 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

  • Works in 4 steps: git log --format='%n%s' --name-only… → The PR describes the net change of the… → git log --format=%b main..HEAD (same… → …
  • The user explicitly asks to push the current branch and open a PR
  • SKILL.md covers PR material, Create mode, Update mode and Merge mode
  • Calls git and gh

What it does

PR is an agent skill from vinta/hal-9000. Use 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

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Pull requests. It works with Git. The repository describes itself as: Opinionated AI coding agent and dev environment automation for macOS. The licence is MIT.

When your agent uses it

  • The user explicitly asks to push the current branch and open a PR
  • Rewrite an open PRs body from its commits
  • Wait for CI and merge it

Example prompts

  • “/pr”

Requirements

  • Pre-approved tools (allowed-tools): Bash(git push:*), Bash(gh pr:*)

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. git log --format='%n%s' --name-only main..HEAD (fall back to master..HEAD). Each commit is a block: its subject, then the files it…
  2. 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…
  3. git log --format=%b main..HEAD (same fallback). Collect every issue number written as #N or as a GitHub issue URL. Each one becomes a Fix…
  4. Invoke the write-like-me skill. Pass as argument: "Write a GitHub PR title and body from the material below. Shape the draft as the title…

What it can do on your machine

Read from SKILL.md and the folder at commit 23243bf. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(git push:*)
    • Bash(gh pr:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

PR loads about 1.4k tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 909 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~38
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vinta/hal-9000 at commit 23243bf, republished under its MIT licence (© vinta). 909 words, ~1,421 tokens.

Download SKILL.mdSave it as .claude/skills/pr/SKILL.md (or your agent's skills folder).
name
pr
description
Use 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
allowed-tools
Bash(git push:*), Bash(gh pr:*)
argument-hint
[create | update | merge]
context
fork
model
sonnet
effort
medium

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":

  1. git log --format='%n%s' --name-only main..HEAD (fall back to master..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.

  2. 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, as does a later commit that restores what an earlier one removed, and a subject starting with build: bump describes no change. Remove those blocks from the log before passing it on.

  3. git log --format=%b main..HEAD (same fallback). Collect every issue number written as #N or as a GitHub issue URL. Each one becomes a Fix #N line at the end of the body, one per line, no duplicates.

  4. Invoke the write-like-me skill. Pass as argument: "Write a GitHub PR title and body from the material below. Shape the draft as the title on 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. The draft goes straight into the caller's next gh command in the same response, never into a reply: a reply with no tool call ends the caller before the PR exists.

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. Leave out changes a reviewer would not miss, such as ignore files, asset moves, and personal config tweaks, unless the branch holds nothing else. Body shape depends on how many separate changes are left.

One change: 1-3 sentences of prose, what changed and why, no list.

<example>
Add pr skill for pushing branches and opening PRs

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. </example>

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. Give every item its example, not only the first.

<example>
Move name-suffix into core rules and protect URLs and slashes
  • Move name-suffix from AI spacing into the core rules.
  • URLs are left alone. Anything starting with http:// or https:// is hidden from the rules, so %E4%B8%AD and /wiki/CJK#CJK survive.
  • / next to CJK never gets spaces anymore. CJK/CJK stays CJK/CJK, same as _. File paths still work: CJK/homeCJK becomes CJK /home CJK.
    </example>

<material>" followed by the log from step 2, then a closing "</material>" line.

  1. From write-like-me's output, take the first line as title, the rest as body. Append a blank line and the Fix #N lines from step 3 to the body.
Show full SKILL.md (236 more words)Show less

Create mode

  1. git rev-parse --abbrev-ref HEAD — abort if main or master.
  2. gh pr view --json url 2>/dev/null — if a PR already exists, report its URL and stop.
  3. git push -u origin HEAD.
  4. Gather PR material.
  5. gh pr create --title "<title>" --body "<body>".
  6. Report the PR URL.

Update mode

  1. gh pr view --json url,state 2>/dev/null — abort if no PR or not open.
  2. git log --oneline @{u}..HEAD — if it lists commits, git push so the PR shows them.
  3. Gather PR material.
  4. gh pr edit --body "<body>" — the title stays as it is.
  5. Report the PR URL.

Merge mode

  1. gh pr view --json url,number,state — abort if no PR or not open.
  2. git log --oneline @{u}..HEAD — if it lists commits, git push so CI and the merge see them.
  3. 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.
  4. If exit code 0 (all checks passed):
    • gh pr merge --merge --delete-branch. It also switches to the base branch, pulls it, and deletes the local branch.
    • Report: merged, remote and local branches cleaned up.
  5. If non-zero (check failed):
    • Run gh pr checks once more to list failed checks and their URLs.
    • Report which checks failed. Take no other action.

© vinta, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/pr of vinta/hal-9000.

Open the folder on GitHubat commit 23243bf

Compare with similar skills

PR next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

PR compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PR this skillvinta/hal-9000138—~1.4kAutomated safety check: PassMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Understand Diff AnalysisEgonex-AI/Understand-Anything86k1 repos~1.4kAutomated safety check: PassMIT
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Open Code Review CLIalibaba/open-code-review44k—~3.1kAutomated safety check: PassApache-2.0
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Understand Diff Analysis

    Egonex-AI/Understand-Anything

    Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.

    86k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Open Code Review CLI

    alibaba/open-code-review

    Runs the ocr command-line tool to review Git changes, a commit or a branch comparison with an AI model, returning line-level comments and optionally applying fixes.

    44k GitHub stars~3.1k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Pull Request Title and Body Writer

    openinterpreter/openinterpreter

    Rewrites the title and body of one or more pull requests with gh, leading with why the change was made, then what changed, and describing only the net result.

    69k GitHub starsUsed in 2 repos~1.1k tokens
    DevelopmentAuto-check passed

More from vinta/hal-9000

All 15 skills in this repo
  • Finds which plugins in the repository changed, bumps only the ones not already bumped since origin/main, and checks that each plugin's two manifests stay in sync.

    138 GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Audits your Claude Code settings and environment variables against the current official docs and returns a ranked list of changes tied to how you actually work.

    138 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Logical Git Commits

    vinta/hal-9000

    Commits everything in the working tree as one logical change per commit, splitting files by hunk, with bodies that say what was wrong before and never an invented reason.

    138 GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • Keeps Ansible install tasks in line with upstream docs by fixing version, install-method and link drift one tool at a time, with a commit for each.

    138 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Rewrites docs, READMEs, issues, comments or UI text in plain Global English that translates well and still sounds native, keeping every fact intact.

    138 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Best Practices

    vinta/hal-9000

    A skill your agent uses when about to choose, configure, or refine a tool, library, config format, API pattern, or project setup, or before proposing a design of your own — research current…

    138 GitHub stars~553 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about PR

What does PR do?

A skill your agent uses 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. PR is an agent skill from vinta/hal-9000.

When should I use PR?

PR fits situations like: the user explicitly asks to push the current branch and open a PR; rewrite an open PRs body from its commits; wait for CI and merge it.

How do I install PR in Claude Code?

Run `npx skills add vinta/hal-9000 --skill pr -a claude-code`. Or copy the skill folder (skills/pr in vinta/hal-9000) into .claude/skills/pr in your project. Claude Code loads it when a task matches its description.

How do I install PR in Codex?

Run `npx skills add vinta/hal-9000 --skill pr -a codex`. Or copy the skill folder (skills/pr in vinta/hal-9000) into .agents/skills/pr in your project. Codex loads it when a task matches its description.

Can I use PR in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vinta/hal-9000 --skill pr -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pr, .gemini/skills/pr, .github/skills/pr and .opencode/skills/pr in your project.

What does PR need to run?

Going by SKILL.md and its folder, PR needs the command-line tools its instructions call (git and gh). Its frontmatter pre-approves these tools: Bash(git push:*), Bash(gh pr:*).

Does PR access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is PR safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does PR use?

PR is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does PR use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to PR?

Skills that share tags, products or a category with PR: Finishing a Development Branch (obra/superpowers, 296k stars), Understand Diff Analysis (Egonex-AI/Understand-Anything, 86k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars) and Open Code Review CLI (alibaba/open-code-review, 44k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PR?

vinta (a GitHub user) maintains it in vinta/hal-9000, which has 138 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 7, 2026.

Source: vinta/hal-9000 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.