Skip to content
Skills Library
Programming · Automation

create-pr

/create-pr

Use when creating a new GitHub pull request, opening a PR for the current branch, or when another skill (like ship-it) needs a PR created for a branch that does not have one yet.

Repository
skill-issue ↗
Licence
MIT
Last repository change
16.10.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
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 16.10.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 creating a new GitHub pull request, opening a PR for the current branch, or when another skill (like ship-it) needs a PR created for a branch that does not have one yet.

Original author description

Use when creating a new GitHub pull request, opening a PR for the current branch, or when another skill (like ship-it) needs a PR created for a branch that does not have one yet.

How it works

  1. 1. Preconditions
  2. 2. Detect PR template
  3. 3. Determine title
  4. 4. Generate body
  5. 5. Confirm and create
Original SKILL.md headings · 66 lines, 417 words
SKILL.md preview
---
name: create-pr
description: Use when creating a new GitHub pull request, opening a PR for the current branch, or when another skill (like ship-it) needs a PR created for a branch that does not have one yet.
---

# Create PR

Open a new GitHub pull request for the current branch using the repo's PR template if one exists. Defaults to `--draft`.

## 1. Preconditions

- Current branch must be pushed to a remote. If `git rev-parse --abbrev-ref --symbolic-full-name @{u}` fails, run `git push -u origin HEAD` first.
- Skip creation if a PR already exists for the branch: `gh pr view --json number 2>/dev/null` returns 0. In that case the caller likely wants `gh pr edit` instead.

## 2. Detect PR template

Check for a template in this order and use the first match:

1. `.github/pull_request_template.md`
2. `.github/PULL_REQUEST_TEMPLATE.md`
3. `docs/pull_request_template.md`
4. `pull_request_template.md` (repo root)
5. `.github/PULL_REQUEST_TEMPLATE/*.md`. If multiple, prefer one matching the dominant commit type (`feature.md` or `feat-*` for `feat:` commits, `bugfix.md` for `fix:`, etc.). If still ambiguous, ask the user which to use.

Filename matching is case-insensitive on macOS but case-sensitive on Linux; check both common cases.

If none found, use the standard body in step 4.

## 3. Determine title

Use [Conventional Commits](https://www.conventionalcommits.org/) format derived from the branch's commits (`git log <base>..HEAD`):

- Single commit: use its subject line verbatim.
- Multiple commits: synthesize one conventional-commit-style title covering the change. Keep under 72 chars.

## 4. Generate body

Apply `terse-output` to the body: bullets over prose, no filler ("just", "really"), no hedge openers ("I noticed that…", "You might want to consider…"). Lead with what changed and why; skip implementation play-by-play.


**With template**: read the template file and fill its sections from the diff (`git diff <base>...HEAD`) and commit history. Preserve the template's structure, headings, comments, and checklists exactly. Leave checklist items unchecked unless the work demonstrably satisfies them. For sections that do not apply, mark them `N/A` only if the template requires a value; otherwise leave the section body empty.

Do not strip HTML comments from the template (they are often instructions to the PR author and may be intentionally rendered as hidden guidance).

**Without template**, use this body:

```markdown
## Summary

<1–3 bullets covering what changed and why>

## Test plan

- [ ] <specific verification steps>
```

## 5. Confirm and create

Per [no-post-without-confirmation](../../rules/no-post-without-confirmation.md), present the title and body to the user and wait for explicit approval before creating.

After approval, write the body to a temp file (avoids shell-escaping issues with multiline markdown) and create the PR:

```bash
gh pr create --draft --title "<title>" --body-file /tmp/pr-body.md
```

Always pass `--draft` per [draft-prs](../../rules/draft-prs.md). Only omit `--draft` if the user explicitly asked for a ready/non-draft PR.

Print the resulting PR URL.

Versions

RepositoryScoreLicence
This page · paultyng/skill-issue100MIT
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 8b7ff076674b (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

  • 100create-pull-request
    Create a GitHub Pull Request from the current or specified branch. Use when: opening a PR, submitting code for review, creating a draft PR, publishing a branch as a pull request, proposing changes to a repository.
  • 86pr
    Use for /pr, or ''create a PR'' / ''open a pull request'' — creates a pull request for the current branch against the repo''s base branch with a formatted title and body. Not for reviewing an existing PR (review-pr).
  • 100st-pr
    Files a short, clear pull request for the current branch. Use when the user asks to open, file or create a PR, or says /st-pr.
  • 90create-pull-request
    Create or update the pull request for the current branch, with a description filled from this repository's PR template using the diff and CI evidence. Use when opening a PR, or writing or refreshing a PR description, checklist, or review summary.
  • 100pr
    Use for /pr, or 'create a PR' / 'open a pull request' — creates a pull request for the current branch against the repo's base branch with a formatted title and body. Not for reviewing an existing PR (review-pr).
  • 100ds-pr
    Files a short, clear pull request for the current branch. Use when the user asks to open, file or create a PR, or says /ds-pr.

Feedback and reports

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