Pull Request Creation

VerifiedCaution

Creates a pull request after full verification. Handles the ship workflow: verify, push, and create PR.

Sby Skills Guide Bot
DevOpsIntermediate
8/25/2026
Claude CodeCursorCodex
#pull-request#git#github-cli#rebase#pre-flight-checks

Recommended for

Automated summary

Automates shipping a branch as a pull request: branch guard, rebase onto the base branch, full /verify run, push, and PR creation through gh.

Strengths

  • Explicit guard that refuses to push directly to main or master
  • Rebases onto origin/<base> before pushing, catching conflicts early
  • Runs the complete six-step /verify pipeline before any PR is opened
  • Standardized PR body with summary, test-plan checklist and Closes #N, plus the PR URL returned to the user

Limitations

  • Assumes an authenticated gh CLI plus a /verify pipeline and project commands (make, elps) that may not exist in the repo
  • GitHub-only: no GitLab or Bitbucket equivalent
  • On rebase conflicts it stops and leaves resolution to you, so no PR is created
When to use it

Use it when a feature branch is ready and you want it delivered as a pull request with all checks already green.

When not to use it

Avoid it on repositories not hosted on GitHub, without gh configured, or when the project's verification steps are undefined.

Security analysis

Caution
Quality score82/100

The skill uses powerful network and version control operations (git fetch/rebase/push, gh pr create) for legitimate PR workflow purposes. It includes a guard against pushing to main/master, reducing risk, but still modifies remote state and relies on shell execution without declared tool permissions.

Findings
  • •Uses git push and gh pr create to modify remote repositories
  • •Executes shell commands without declared allowed-tools
How this analysis is made

Examples

Ship current branch
Create a PR for my current branch and run the full verification first.
Submit for review
Submit these changes for review — rebase on main, run verify, push and open the pull request.
Open PR closing an issue
Open a pull request for this branch that closes #142 and include the test plan checklist.

/pr — Pull Request Creation Skill

Creates a PR after verifying all checks pass. Handles the full ship workflow: verify, push, create PR.

Trigger

Use when asked to create a PR, submit changes for review, or ship changes.

Workflow

1. Determine Base Branch

gh repo view --json defaultBranchRef -q '.defaultBranchRef.name'

This is typically main.

2. Guard: Verify Not on Main

current=$(git branch --show-current)
if [ "$current" = "main" ] || [ "$current" = "master" ]; then
  echo "ERROR: On $current — create a feature branch first"
  exit 1
fi

STOP if on main/master. Create a feature branch before proceeding. Never push directly to the default branch.

3. Fetch and Rebase

git fetch origin
git rebase origin/<base-branch>

If there are conflicts, resolve them before proceeding.

4. Run Full Verification

Run the complete /verify pipeline (all 6 steps). If any step fails, stop and fix before creating the PR.

5. Push

git push -u origin <current-branch>

6. Create the PR

gh pr create --title "<concise title>" --body "$(cat <<'EOF'
## Summary
- <bullet point describing what changed>
- <bullet point describing why>

## Test Plan
- [ ] `make test` passes
- [ ] `make static-checks` passes
- [ ] `./elps fmt -l ./...` reports no changes
- [ ] `./elps lint ./...` reports no diagnostics
- [ ] `./elps doc -m` reports no missing docs

Closes #<N>
EOF
)"

7. Report

Return the PR URL so the user can review it.

PR Title Guidelines

  • Keep under 70 characters
  • Use imperative mood: "Add ...", "Fix ...", "Update ..."
  • Be specific: "Add rethrow builtin for handler-bind" not "Add new feature"

PR Body Guidelines

  • Summary: 1-3 bullet points explaining what and why
  • Test Plan: Checklist of verification steps
  • Closes #N: Link to the issue if this PR resolves one
  • Include the Claude Code attribution line

Checklist

  • [ ] All changes committed
  • [ ] Rebased on latest base branch
  • [ ] Full verify pipeline passes
  • [ ] Pushed to remote with -u flag
  • [ ] PR created with summary, test plan, and issue link
  • [ ] PR URL returned to user

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/pull-request-creation-mt8766x4/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/pull-request-creation-mt8766x4' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/pull-request-creation-mt8766x4/download' --output '.skill-downloads/pull-request-creation-mt8766x4/SKILL.md.part' && mv '.skill-downloads/pull-request-creation-mt8766x4/SKILL.md.part' '.skill-downloads/pull-request-creation-mt8766x4/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

This file does not provide a usable name/description header for this native procedure. It remains available to download and inspect; use the manual method below.

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/pull-request-creation-mt8766x4/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills