Create pr

From elie222/inbox-zero · View interactive version

Create pr is an AI agent skill from the GitHub repository elie222/inbox-zero. Review the working tree, commit it safely, and open a GitHub pull request. Use when the user asks to create, open, raise, or publish a PR, or to finish changes as a PR. For watching an existing PR — CI, review bots, failures, comments — use the pr-watch skill instead.

How to use this skill

Skill file

Open a pull request

Get the change reviewed, committed with public-safe metadata, and published.

Opening the PR is not the end of the job: hand off to pr-watch unless the user

opted out of monitoring.

Boundaries

tokens, secrets, or other sensitive information in a branch name, commit

message, or PR body. Public GitHub identities already on the PR may be

referenced when a reply needs them.

such as "updated the marketing repository," without internal details.

creation entirely and use pr-watch.

1. Inspect and review

Read AGENTS.md, then inspect the current branch, status, and diff:

git branch --show-current && git status --short && git diff HEAD --stat

Before publishing, review the diff for correctness, security, test gaps, and

repository conventions. Fix high-confidence bugs and mechanical issues. Do not

expand the requested scope for optional refactors.

Run focused validation appropriate to the changed files — the unit tests that

cover them, a type check, the linter. Do not run builds or broad test suites

when repository instructions prohibit them or the user did not request them. CI

runs the full suites on the PR anyway, so duplicating them locally buys nothing

and costs a great deal of time.

2. Branch, commit, and push

Create a dedicated branch when on the base branch or when the current branch

does not belong to these changes. Use a public-safe feat/, fix/, or chore/

name unless repository instructions require another prefix.

Before pushing, read the current branch name even if you did not choose it;

tools can name a branch from the user's request. If it contains anything the

Boundaries above rule out (an email, a person's name, a username, a customer or

company name, a domain, an account ID, a token), rename the local branch to a

public-safe name with git branch -m <safe-name> before the first push.

Respect the user's staged selection. Otherwise stage explicit paths, never

git add .:

git add <file1> <file2>
git commit -m "<public-safe summary>"
git push -u origin <branch>

If there is nothing new to commit, confirm the branch is already pushed before

continuing.

3. Create the PR

First check whether the branch already has one, and do not create a duplicate:

gh pr view --json number,url,headRefName,headRefOid

For a new PR, use this public-safe format:

<area>: <Title under 80 characters>

<One- or two-sentence summary>

- concrete change
- concrete validation or behavior
gh pr create --title "<title>" --body "<body>"

Display the PR link and branch. In the final response, include a concise

performance note covering runtime work, database or network calls, and hot-path

risk when relevant.

4. Hand off to the watch

If the user requested skip review or #skipreview, post that marker and stop.

Otherwise start the watch in the same turn you created the PR — do not stop to

report first. Opening a PR is not completing it, and a report delivered while

checks are still running is a report of nothing:

# run_in_background: true
"$(git rev-parse --show-toplevel)/.claude/skills/pr-watch/pr-digest" --watch

That call reports a failure or timeout immediately, or waits for the checks

on this commit to settle, then prints a digest ending in a VERDICT line. Read .claude/skills/pr-watch/SKILL.md for

how to act on each verdict, triage a failing job, and answer review comments.

Starting the command matters more than remembering the skill: once it is

running, its output tells you what to do next even if nothing reminded you.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.