Skip to content
Skills Library
Programming · Automation

create-pr

/create-pr

Create a pull request using the repo PR template. Use when the user wants to open or submit a PR without immediately merging it. SKIP for end-to-end ship flows; use `ship` instead.

Repository
gopher-ai ↗
Licence
MIT
Last repository change
20.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
0
Deprecation

No signals detected. Repository changed on 20.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

Create a pull request using the repo PR template. Use when the user wants to open or submit a PR without immediately merging it. SKIP for end-to-end ship flows; use `ship` instead.

Original author description

Create a pull request using the repo PR template. Use when the user wants to open or submit a PR without immediately merging it. SKIP for end-to-end ship flows; use `ship` instead.

How it works

  1. Plugin Resource Resolution
  2. Usage
  3. Steps
Original SKILL.md headings · 136 lines, 522 words
SKILL.md preview
---
name: create-pr
description: "Create a pull request using the repo PR template. Use when the user wants to open or submit a PR without immediately merging it. SKIP for end-to-end ship flows; use `ship` instead."
---

# Create PR

## Plugin Resource Resolution

`<PLUGIN_ROOT>` is notation. Replace it with a concrete absolute plugin root before every resource read or command:

- **Codex:** Start from the directory containing the absolute selected `SKILL.md` path, then ascend two directories (`skills/<name>` -> plugin root).
- **Claude Code:** Bind it to the injected `${CLAUDE_PLUGIN_ROOT}` value.

Create a pull request following the repo's PR template and conventions.

Before requesting decisions, read
`<PLUGIN_ROOT>/lib/driver-interaction.md` and follow its
cross-platform capability-binding rules.

Read `<PLUGIN_ROOT>/lib/decision-gates.md` before resolving template
selection.

## Usage

```
$go-workflow:create-pr
```

## Steps

### Step 1: Gather Context

```bash
CURRENT_BRANCH=$(git branch --show-current)
DEFAULT_BRANCH=$(git remote show origin 2>/dev/null | grep 'HEAD branch' | sed 's/.*: //')
git log "${DEFAULT_BRANCH}..HEAD" --oneline
git diff "${DEFAULT_BRANCH}..HEAD" --stat
```

### Step 2: Branch Protection

If the current branch is `main`, `master`, or matches the default branch:

```
WORKFLOW_RESULT=INCOMPLETE
WORKFLOW_REASON=default-branch
```

Stop without pushing or creating a PR.

### Step 3: Push Branch

Ensure the branch is pushed to the remote:

```bash
git push -u origin "$CURRENT_BRANCH"
```

### Step 4: Find PR Template

Check for a PR template in these locations (in order):

```bash
cat .github/pull_request_template.md 2>/dev/null || \
cat .github/PULL_REQUEST_TEMPLATE.md 2>/dev/null || \
cat docs/pull_request_template.md 2>/dev/null || \
cat pull_request_template.md 2>/dev/null || \
echo "NO_TEMPLATE"
```

If a template directory exists, resolve a **driver-resolvable gate**. Prefer an
explicit repository configuration or the template whose name and required
sections match the change type. Otherwise choose the general-purpose template,
or the first lexical template when all candidates are equally general. State
`Decision`, `Evidence`, and `Rationale`; do not request input.

### Step 5: Build PR Body

PR titles, bodies, and test-plan entries describe modules, contracts, and
observable behavior, not file paths, line numbers, or current internal layout.
Acceptance criteria are stated as behaviors a reviewer can verify.

**If a template was found**: Use its exact section structure. Fill in every section based on the commits and diff. Do not omit or skip sections.

**If no template**: Use this default format:

```markdown
## Summary
- <1-3 bullet points describing what changed and why>

## Test Plan
- <How the changes were tested>
```

### Step 6: Link Issues

Look for issue references in:
- Branch name (e.g., `issue-42-`, `fix/42-`)
- Commit messages
- Arguments passed to this skill

Include `Fixes #<number>` or `Closes #<number>` in the PR body.

### Step 7: Determine PR Title

- Use conventional commit format: `<type>(<scope>): <subject>`
- Keep under 70 characters
- Derive from the commits and changes

### Step 8: Reuse or Create PR

Check for an open pull request associated with the current branch before
attempting to create one:

```bash
EXISTING_PR=$(gh pr view \
  --json number,url,state,headRefName,baseRefName \
  --jq 'select(.state == "OPEN") | [.number, .url, .headRefName, .baseRefName] | @tsv' \
  2>/dev/null || true)

if [ -n "$EXISTING_PR" ]; then
  IFS=$'\t' read -r PR_NUMBER PR_URL PR_HEAD PR_BASE <<< "$EXISTING_PR"

  if [ "$PR_HEAD" != "$CURRENT_BRANCH" ] || [ "$PR_BASE" != "$DEFAULT_BRANCH" ]; then
    echo "WORKFLOW_RESULT=INCOMPLETE"
    echo "WORKFLOW_REASON=existing-pr-mismatch"
    exit 1
  fi

  echo "Reusing pull request #$PR_NUMBER: $PR_URL"
else
  gh pr create --title "<title>" --body "<body>"
fi
```

### Step 9: Report

Display the PR URL so the user can review it.

Versions

RepositoryScoreLicence
This page · gopherguides/gopher-ai100MIT
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 02d8a14dc93e (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

  • 92open-pr
    Create a PR to provided base branch using the pull request template. Use when opening a new PR.
  • 100create-pull-request
    Create a GitHub pull request following project conventions. Use when the user asks to create a PR, submit changes for review, or open a pull request. Handles commit analysis, branch management, PR template usage, and PR creation using the gh CLI tool.
  • 100create-github-pr
    Create GitHub pull requests using the gh CLI. Use when the user wants to create a new PR, submit code for review, or open a pull request. Trigger keywords - create PR, pull request, new PR, submit for review, code review.
  • 80pull-request:create
    Create a pull request, merge request, or change request (PR, MR, CR). Use when the user asks to open one, including right after committing changes.
  • 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.
  • 100create-pull-request
    Create a GitHub pull request following project conventions. Use when the user asks to create a PR, submit changes for review, or open a pull request. Handles commit analysis, branch management, and PR creation using the gh CLI tool.

Feedback and reports

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