Skip to content
Skills Library
Programming · Automation

create-pr

/create-pr

Use when the user asks to prepare, publish, or open a GitHub pull request from a local checkout. Verifies branch and diff scope, runs relevant checks, creates needed commits, pushes only when authorized, and opens a truthful draft or ready PR.

Licence
MIT
Last repository change
18.08.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
4
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 18.08.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when the user asks to prepare, publish, or open a GitHub pull request from a local checkout. Verifies branch and diff scope, runs relevant checks, creates needed commits, pushes only when authorized, and opens a truthful draft or ready PR.

Original author description

Use when the user asks to prepare, publish, or open a GitHub pull request from a local checkout. Verifies branch and diff scope, runs relevant checks, creates needed commits, pushes only when authorized, and opens a truthful draft or ready PR.

How it works

  1. Tool routing
  2. Prepare the branch
  3. Validate and commit
  4. Write the PR
  5. Publish and open
  6. Attach and verify evidence
  7. Verify the PR
  8. Safety
  9. Deliverable
Original SKILL.md headings · 101 lines, 906 words
SKILL.md preview
---
name: create-pr
description: Use when the user asks to prepare, publish, or open a GitHub pull request from a local checkout. Verifies branch and diff scope, runs relevant checks, creates needed commits, pushes only when authorized, and opens a truthful draft or ready PR.
---

# Create a pull request

## Tool routing

- Use local Git for repository identity, branch, diff, staging, commits, and push.
- Prefer the GitHub connector for repository and PR context and for PR creation after the branch is pushed.
- Use `gh` for authentication checks, Actions logs, current-branch PR discovery, forked-head syntax, or PR creation when connector coverage is insufficient.

## Prepare the branch

1. Read repository instructions and resolve the repository root, current branch, remotes, upstream, and remote default branch.
2. Inspect `git status --short --branch`, the merge base, `git log --oneline <base>..HEAD`, `git diff --stat <base>...HEAD`, and the full diff.
3. Confirm scope only when the worktree mixes unrelated changes. Preserve user changes outside the requested scope.
4. Stay on an existing feature branch. If currently on the default branch, create a descriptive branch using the repository or host convention.
5. Fetch the target remote when current remote state matters. Rebase or merge only when requested or required by repository policy.

## Validate and commit

1. Run the relevant focused checks and any required repository gates. Separate regressions from baseline or environment failures.
2. Create the fewest reviewable commits. Follow repository message conventions and inspect the staged diff before every commit.
3. Recheck the final range and worktree. Do not include unrelated commits, local-only files, credentials, or generated artifacts by accident.

## Write the PR

1. Build the title from the actual outcome. Follow the repository's title convention; do not copy a vague branch name.
2. Start from `references/pr-description-template.md` or the repository's own pull request template.
3. State what changed, why, validation with real results, user or operational impact, risk, migrations, rollout, and related issues.
4. Delete empty optional sections. Never claim unrun checks, nonexistent screenshots, or future work as completed.
5. Reuse relevant, current, and safe screenshots or recordings already produced during implementation or validation. Do not omit useful existing evidence merely because it was not created specifically for the PR.
6. When visual evidence would materially help review and is easy to capture, create it. Do not block the PR or manufacture low-value media when evidence is irrelevant, impractical, redundant, or unsafe. Follow `references/evidence-attachments.md`.

## Publish and open

1. Push only when the user requested or confirmed publication. For a new remote branch, use `git push -u <remote> <branch>`.
2. Never force-push without separate explicit approval. If approved, use `--force-with-lease` against the intended remote branch.
3. Resolve repository, base, and head explicitly, especially for forks.
4. Open a ready-for-review PR by default. Use draft only when the user explicitly asks for a draft. Carry that decision into the exact API field or CLI flags.

Preferred connector fields:

```text
repository_full_name: <owner/repo>
base: <target-branch>
head: <source-branch or owner:branch>
title: <reviewed title>
body: <reviewed Markdown>
draft: <false by default; true only when a draft was explicitly requested>
```

`gh` fallback for the same repository or a user-owned fork:

```text
# Ready for review (default)
gh pr create --repo <owner/repo> --base <base> --head <branch-or-user:branch> --title "<title>" --body-file <prepared-body.md>

# Draft (only when explicitly requested)
gh pr create --repo <owner/repo> --base <base> --head <branch-or-user:branch> --title "<title>" --body-file <prepared-body.md> --draft
```

`gh pr create --head` does not support an organization as the head owner. For a cross-repository PR whose base and fork belong to the same organization, use a connector that accepts the head repository or GitHub's REST endpoint:

```text
gh api --method POST repos/<base-owner>/<base-repo>/pulls -f title="<title>" -F body=@<prepared-body.md> -f base="<base>" -f head="<organization>:<branch>" -f head_repo="<fork-repo>" -F draft=false
```

Use `-F draft=true` only when a draft was explicitly requested. Verify the base and head repositories before sending the request.

Prefer explicit title and body over unreviewed `--fill`. `--body-file` publishes Markdown text; it does not upload files referenced by local paths.

## Attach and verify evidence

1. Inventory relevant screenshots, recordings, previews, logs, or other evidence already created during the work. Use them when they still represent the final change and pass the safety checks.
2. If useful evidence does not exist, capture it only when doing so is easy and proportionate to the review value.
3. Create the PR with the textual evidence section first.
4. Upload local screenshots or recordings through GitHub's attachment UI, or through a connected tool only if it supports user-attachment uploads.
5. Replace placeholders with GitHub-generated URLs, add accessible labels and context, then save the description or evidence comment.
6. Reopen the PR and verify every image or recording renders for the intended audience. Do not claim an attachment exists until the remote PR shows it.

## Verify the PR

Confirm URL, repository, base/head, draft state, title/body, included commits, changed-file scope, evidence links, and current checks. Connector metadata is preferred; `gh` fallbacks include:

```text
gh pr view --json url,number,title,baseRefName,headRefName,isDraft,commits,mergeable,statusCheckRollup
gh pr checks <number>
```

Do not manually rerun checks unless the user authorizes it.

## Safety

- Do not silently stage unrelated work or create a PR from the wrong repository or branch.
- Do not run interactive authentication on the user's behalf; report the exact prerequisite when authentication is missing.
- Do not expose secrets, personal data, private URLs, customer data, or unrelated browser content in PR evidence.
- Do not commit screenshots or recordings solely to attach them unless the repository explicitly requires versioned evidence.

## Deliverable

Report branch, commits, push target, PR URL and state, validation, attached evidence, pending manual evidence steps, check status, and unresolved risks. When visual evidence would normally help but is omitted, state the concise reason.
Files in this package (4)
  • SKILL.md 6 KB
  • agents/openai.yaml 1 KB
  • references/evidence-attachments.md 3 KB
  • references/pr-description-template.md 2 KB

Versions

RepositoryScoreLicence
This page · jMerta/codex-skills100MIT
wanteddev/montage-web100MIT
niekcandaele/claude-helpers100MIT
yonatangross/orchestkit100MIT
microsoft/aspire100MIT
rolemodel/skills100MIT
moeru-ai/airi100MIT
sakuro/dotfiles100MIT
fcakyon/claude-codex-settings100Apache-2.0

Database snapshot: 13.11.2026 · package version 672d1711c671 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100pull-request
    Use when the user asks to open, create, or draft a pull request, or runs /pull-request in any GitHub repository - abrir PR, criar pull request, gh pr create.
  • 100branch-commit-pr
    Create a professionally named local git branch, commit the current changes in clean Conventional Commits (no Claude/AI signature), push it, and open a GitHub pull request. Use when the user asks to "make a branch and PR", "commit and open a PR", "ship these changes", or invokes /branch-commit-pr.
  • 844-open-pr
    Opens or updates a pull request for the current feature. Invoked when the user wants to open a pull request, create a PR, update the draft PR, or runs /aido:4-open-pr.
  • 90pr-description
    Drafts pull request title and body from validated diff and opens or updates PR via GitHub MCP. Triggers when a change is ready to open or update a PR.
  • 100deliver
    Prepares a branch with verified commits for review and opens its PR. It checks scope hygiene, the branch name and every commit message, writes the PR title and a durable PR description, generates a self-check from the project's rules by ID, runs a final verification that must be…
  • 100pr
    Open a draft pull request on GitHub and drive CI review rounds until it is ready. MUST use when you want to create/open a PR.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.