Agent skill

Create Pull Request

by platformplatform in platformplatform/PlatformPlatform

“Create a GitHub pull request.”

— description from SKILL.md by platformplatform
MITAuto-check passedDevelopment

Install Create Pull Request

skills CLI
$ npx skills add platformplatform/PlatformPlatform --skill create-pull-request -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install platformplatform/PlatformPlatform create-pull-request --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/platformplatform/PlatformPlatform.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/create-pull-request .claude/skills/create-pull-request && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
create-pull-request
GitHub stars
440
Token cost
~2.7k tokens
SKILL.md length
1,230 words
Files
1
Skills in repo
18
Repo updated
First seen
Licence
MIT

At a glance

  • Works in 12 steps: Gather Context → Kick Off Background Work → Verify Branch Name → …
  • SKILL.md covers STEP 1: Gather Context, STEP 2: Kick Off Background Work, STEP 3: Verify Branch Name and STEP 4: Ask the User, plus 9 more sections
  • Calls git and gh; reaches github.com

About this skill

Create Pull Request is a skill in platformplatform/PlatformPlatform (440 stars). Its SKILL.md is about 2.7k tokens. Licence: MIT.

Requirements

  • Pre-approved tools (allowed-tools): *

Workflow steps

12 steps, taken from the step headings in SKILL.md.

  1. Gather Context
  2. Kick Off Background Work
  3. Verify Branch Name
  4. Ask the User
  5. Correlate to [Task]
  6. Draft Title and Description
  7. Optional Review Gate
  8. Branch Hygiene
  9. Push
  10. Wait for Background Validation
  11. Create or Update the Pull Request via gh
  12. Report

What it can do on your machine

Read from SKILL.md and the folder at commit 269de1c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • *

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Create Pull Request loads about 2.7k tokens when it runs. Until then it costs about 12 tokens; SKILL.md has 1,230 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~12
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from platformplatform/PlatformPlatform at commit 269de1c, republished under its MIT licence (© platformplatform). 1,230 words, ~2,654 tokens.

Download SKILL.mdSave it as .claude/skills/create-pull-request/SKILL.md (or your agent's skills folder).
name
create-pull-request
description
Create a GitHub pull request.
allowed-tools
*

Create Pull Request Workflow

STEP 1: Gather Context

Run in parallel (quick reads, not background):

  • git status - working tree state
  • git branch --show-current - local branch
  • git --no-pager log --format=%s --reverse $(git merge-base HEAD main)..HEAD - commits on the branch
  • git --no-pager diff main - full diff
  • git rev-parse @{u} 2>/dev/null - upstream presence (already pushed?)
  • gh pr view --json number,url,state 2>/dev/null (only if upstream exists) - check if the branch already has an open pull request

STEP 2: Kick Off Background Work

Everything in this step starts in the background (run_in_background: true) so the workflow proceeds without waiting. Results are reconciled in STEP 10.

Validation

Skip anything already green this session. Only run what's genuinely uncertain.

When validation IS needed:

Run build first:

  • Backend change: build (no flags - covers backend AND frontend; backend changes can break the frontend build via API contracts)
  • Frontend-only: build --frontend
  • CLI-only: build --cli

After build, in parallel (with --no-build where applicable):

  • aspire-restart - service / Aspire wiring changed
  • format --<target>, lint --<target> - for each target whose code changed
  • test --no-build - backend change
  • e2e - frontend or shared E2E-covered code changed; use --smoke for low-impact changes (judgment)

Use judgment to decide which target a file belongs to (e.g. project / manifest / lock files affect their owning build, even when the extension isn't obvious). Each item runs only if needed and not already green.

STEP 3: Verify Branch Name

Three checks - all read-only at this stage; renames happen in STEP 8.

  1. Strip worktree- prefix. Local-only convention; never push it.
  2. Naming convention. Lowercase kebab-case.
  3. Drift check. If the slug no longer describes the work (e.g. fix-login-bug whose commits do a refactor), draft a new name.

If either check 1 or check 3 fires, stash the proposed new name; STEP 4 will ask the user to confirm.

STEP 4: Ask the User

Ask everything upfront so the user doesn't wait through slow research/drafting just to be prompted at the end. Single AskUserQuestion call, up to four questions:

  1. Labels (multi-select, can pick zero or more): Enhancement, Bug, Deploy to Staging.
  2. Pull request checklist (single-select): the recommended option spells out every [ ] item from .github/PULL_REQUEST_TEMPLATE.md in present-tense (e.g. for the current template: "Confirm you have added tests, done manual regression tests, and updated the documentation"). The alternative is "Leave checklist items unchecked".
  3. Review before pushing (single-select): "Show me the rendered title and description before pushing" / "Push immediately".
  4. Branch rename confirmation (single-select), only if STEP 3 flagged a rename: "Rename <current> to <proposed>?" with options Yes / No / Use a different name (free-text).

Stash the answers; consumed in STEP 6, 7, 8, 11.

STEP 5: Correlate to [Task]

Look up .claude/reference/product-management/[PRODUCT_MANAGEMENT_TOOL].md for [Task] ID format and MCP tools.

  1. Parse [Task] ID from branch name. The exact pattern depends on the configured [PRODUCT_MANAGEMENT_TOOL] — check .claude/reference/product-management/[PRODUCT_MANAGEMENT_TOOL].md. Strip worktree- first if present.

  2. If [Task] detected, fetch via MCP. Use its title, description, and parent [Feature] to validate the draft in STEP 6 and spot drift.

  3. Detect unrelated commits (rare). If some commits clearly belong to a different scope, offer to create a new [Task] as future follow-up - written as a fresh problem statement (future tense, what needs to happen). [Feature] choice: parent [Feature] of current branch's [Task] -> [Feature] with [Active] status -> ask.

  4. If no [Task] in the branch name, ask: "No [Task] detected. Create one for this pull request?". If yes, draft a [Task] from the diff (problem statement, not what was done) and create it via MCP. Suggest a [Feature] using the same rules as above.

STEP 6: Draft Title and Description

Title

Write a fresh title based on the actual diff, commits, and [Task] context - not the branch name (branch names are often abbreviated and won't make a good title).

  • Imperative form ("Fix", "Add", "Upgrade", "Refactor")
  • Sentence case (not Title Case)
  • No trailing period
  • No "Pull Request" / "PR" / abbreviations
  • No personal pronouns ("we", "our", "he", "she")
  • No [Task] IDs in the title
Description

Use the official template at .github/PULL_REQUEST_TEMPLATE.md:

  • Summary & Motivation: lead with the most important change, explain what and why (not how), use bullets for multiple items, mention minor fixes last. Do not end with a closing benefit summary - that is the most common rejection reason.
  • No "pull request" or "pull-request" in the body - CI rejects either phrase. Use "this change", "the change", etc.
  • Checklist: copy items from the template. Render every [ ] as [x] if the user picked "Mark all checklist items..." in STEP 4; otherwise leave them as [ ].

Save the rendered title (as a level-1 heading) + body to .workspace/<branch-name>/pull-request.md. Use the un-prefixed branch name if STEP 3 stripped worktree-.

Show full SKILL.md (471 more words)Show less

STEP 7: Optional Review Gate

If the user picked "Show me before pushing" in STEP 4:

  • Print the rendered title and the body inline.
  • Ask "Open pull request with this content? (yes / edit)".
  • On "edit", let the user dictate changes. Re-save the markdown. Re-confirm.

Otherwise skip this step.

STEP 8: Branch Hygiene

If STEP 4 confirmed a rename, rename the branch and verify. Safe in a worktree (directory path is independent of branch name). The push step sets the new upstream.

STEP 9: Push

  1. Re-check upstream tracking with git rev-parse @{u} 2>/dev/null.
  2. If unset (branch never pushed, or just renamed): ask "Branch is local-only. Push to origin?". On confirm, push and ensure the pushed branch has upstream tracking (git push --set-upstream origin "$(git branch --show-current)").
  3. If upstream exists, check divergence:
    • git log --oneline @{u}..HEAD (local-ahead)
    • git log --oneline HEAD..@{u} (remote-ahead)
    • If remote-ahead: surface the divergence and stop. Don't force-push without an explicit user request.
    • If only local-ahead: git push.

STEP 10: Wait for Background Validation

Check the status of the background tasks started in STEP 2.

  • Done and passed: continue silently.
  • Done and failed: print the failure and pause. Do not push or open the pull request until the user decides (fix / push anyway / abort).
  • Still running: surface the status. Ask "Wait for completion, or proceed?". If proceeding, mention that CI will re-run these.
  • Killed earlier (user opt-out): skip.

STEP 11: Create or Update the Pull Request via gh

Pre-flight: gh auth status. If not authenticated, surface and stop.

Use the existing pull request check result from STEP 1.

If an open pull request already exists for this branch:

sh
gh pr edit <number> \
  --title "<title>" \
  --body-file ".workspace/<branch>/pull-request.md" \
  --add-label "<each-selected-label>"

(Strip the level-1 heading from the body file before passing.) Tell the user the pull request was updated, not newly created. Don't change draft/ready state without an explicit ask.

If no pull request exists:

sh
gh pr create \
  --title "<title>" \
  --body-file ".workspace/<branch>/pull-request.md" \
  --base main \
  --assignee @me

Append --label "<name>" per label from STEP 4. @me resolves to the authenticated user. Don't pass --draft; this workflow opens ready-for-review.

Capture the pull request URL from gh's output for STEP 12.

STEP 12: Report

Print:

  • The pull request URL (clickable)
  • Title
  • Labels applied
  • [Task] linked via branch name (auto by [PRODUCT_MANAGEMENT_TOOL])
  • Pull-request markdown saved at the absolute path

End with a clickable link to the saved file.

Examples

Example 1 - Title
# DO: imperative, sentence case, no period
Add user profile image upload functionality
Fix data protection key sharing between self-contained systems
Upgrade dependency versions to latest stable releases

# DON'T: past tense, period, title case, prefixes
Added User Profile Image Upload Functionality.
PR: Implement new feature
Updating dependencies
Example 2 - Description
markdown
### Summary & Motivation

Add data protection key sharing between self-contained systems to fix antiforgery token validation failures. Previously, each self-contained system had isolated encryption keys, causing tokens generated in one system to be invalid in another.

- Configure a common application name for all self-contained systems
- Store keys in a user-accessible directory on disk

# DO: stop here - no closing benefit summary

### Checklist

- [x] I have added tests, or done manual regression tests
- [ ] I have updated the documentation, if necessary
markdown
### Summary

# DON'T: personal pronouns, past tense, "pull request" term, vague descriptions
In this pull request we fixed a bug causing issues in our scs's.

- We added some configuration.
- Fixed a bug.

These changes make the system more robust and maintainable. # DON'T: closing summary
Example 3 - Branch with worktree- prefix

Local: worktree-fix-login-redirect -> propose fix-login-redirect (rename in STEP 8, push in STEP 9).

Example 4 - Branch drift

Local: fix-login-redirect. Actual work: refactored the login command and added auto-redirect.

Propose refactor-login-command-with-auto-redirect. Confirm in STEP 4; rename in STEP 8.

Example 5 - Unrelated commits

Branch: fix-login-redirect. Commits: the redirect fix + an unrelated typo fix in README.

Surface the typo commit. Offer to create a new [Task]: "Fix typo in README troubleshooting section" (problem statement, future tense). The pull request continues with both commits.

Example 6 - End-of-output report
Pull request opened: https://github.com/<owner>/<repo>/pull/123

Title:        Fix login redirect after OTP verification
Labels:       Bug, Deploy to Staging
[Task]:       linked via branch name (auto-detected by [PRODUCT_MANAGEMENT_TOOL])
Description:  /absolute/path/to/repo/.workspace/fix-login-redirect/pull-request.md

© platformplatform, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/create-pull-request of platformplatform/PlatformPlatform.

Open the folder on GitHubat commit 269de1c

Compare with similar skills

Create Pull Request next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Create Pull Request compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Create Pull Request this skillplatformplatform/PlatformPlatform440—~2.7kAutomated safety check: PassMIT
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0
Pull Request Title and Body Writeropeninterpreter/openinterpreter69k2 repos~1.1kAutomated safety check: PassApache-2.0
PR Review State Fetchprisma/orm48k—~767Automated safety check: PassApache-2.0
Creating Description For Gh PRredis/jedis12k—~838Automated safety check: PassMIT

Similar skills

  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Pull Request Title and Body Writer

    openinterpreter/openinterpreter

    Rewrites the title and body of one or more pull requests with gh, leading with why the change was made, then what changed, and describing only the net result.

    69k GitHub starsUsed in 2 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Official

    Fetches a pull request's canonical review state as JSON, validates it, and renders markdown, a text summary and triage target files from it using bundled scripts.

    48k GitHub stars~767 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Official

    Generate a clear, concise GitHub PR title and description from the diff between two local git branches, and save it to prDescription.md in the repo root.

    12k GitHub stars~838 tokensUpdated today
    DevelopmentAuto-check passed
  • Opens a pull request for the current branch using the repo's template, a work item ID in the title and a description filled in from the actual diff.

    60k GitHub stars~824 tokensUpdated yesterday
    DevelopmentAuto-check passed

More from platformplatform/PlatformPlatform

All 18 skills in this repo
  • Create Prd

    platformplatform/PlatformPlatform

    Create a product requirement document (PRD) for a new feature.

    440 GitHub stars~3k tokensUpdated 13 days ago
    Auto-check passed
  • Rebuild Branch

    platformplatform/PlatformPlatform

    Rebuild a stale branch by cherry-picking each commit onto a fresh branch off main, using a ralph-loop to validate each commit (build, test, format, lint, optional e2e) before moving on.

    440 GitHub stars~2.1k tokensUpdated 13 days ago
    Auto-check: notes
  • Swc Plugin Compatibility

    platformplatform/PlatformPlatform

    Diagnose and fix Lingui SWC plugin compatibility errors with Next.js, Rspack, or other SWC runtimes.

    440 GitHub stars~873 tokensUpdated 13 days ago
    Auto-check passed
  • Aspire Restart

    platformplatform/PlatformPlatform

    Start or restart the .NET Aspire AppHost via the developer CLI.

    440 GitHub stars~415 tokensUpdated 13 days ago
    Auto-check passed
  • Commit

    platformplatform/PlatformPlatform

    Commit session changes to git. An agent skill from platformplatform/PlatformPlatform.

    440 GitHub stars~567 tokensUpdated 13 days ago
    Auto-check passed
  • E2E

    platformplatform/PlatformPlatform

    Run end-to-end Playwright tests via the developer CLI. An agent skill from platformplatform/PlatformPlatform.

    440 GitHub stars~542 tokensUpdated 13 days ago
    Auto-check passed

Works with

Categories

Questions about Create Pull Request

How do I install Create Pull Request in Claude Code?

Run `npx skills add platformplatform/PlatformPlatform --skill create-pull-request -a claude-code`. Or copy the skill folder (.claude/skills/create-pull-request in platformplatform/PlatformPlatform) into .claude/skills/create-pull-request in your project. Claude Code loads it when a task matches its description.

How do I install Create Pull Request in Codex?

Run `npx skills add platformplatform/PlatformPlatform --skill create-pull-request -a codex`. Or copy the skill folder (.claude/skills/create-pull-request in platformplatform/PlatformPlatform) into .agents/skills/create-pull-request in your project. Codex loads it when a task matches its description.

Can I use Create Pull Request in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add platformplatform/PlatformPlatform --skill create-pull-request -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/create-pull-request, .gemini/skills/create-pull-request, .github/skills/create-pull-request and .opencode/skills/create-pull-request in your project.

What does Create Pull Request need to run?

Going by SKILL.md and its folder, Create Pull Request needs the command-line tools its instructions call (git and gh). Its frontmatter pre-approves these tools: *.

Does Create Pull Request access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Create Pull Request safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Create Pull Request use?

Create Pull Request is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Create Pull Request use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Create Pull Request?

Skills that share tags, products or a category with Create Pull Request: Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars), Create Pull Request (cline/cline, 70k stars), Pull Request Title and Body Writer (openinterpreter/openinterpreter, 69k stars) and PR Review State Fetch (prisma/orm, 48k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Create Pull Request?

platformplatform (a GitHub organization) maintains it in platformplatform/PlatformPlatform, which has 440 GitHub stars. The repository holds 18 skills in this directory. The repository was last updated on September 24, 2026.

Source: platformplatform/PlatformPlatform on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.