gh-create-pr

gh-create-pr is a skill for Claude Code from gjoranv/claude-plan-skills. It costs 37 tokens per session (1,038 once invoked), scanned A, original, MIT.

A procedure for opening a pull request on GitHub, the code-hosting service used to propose changes for review.

In plain words
What is it for?
Use it when finished code changes need to be submitted from the current branch as a GitHub pull request.
Why use it?
It checks the branch and working tree, updates the base branch, handles commits, and pushes the changes before creating the review request.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

Good fit Use it when finished code changes need to be submitted from the current branch as a GitHub pull request.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gjoranv/claude-plan-skills/gh-create-pr
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add gjoranv/claude-plan-skills --skill gh-create-pr
Clone the repo
git clone --depth 1 https://github.com/gjoranv/claude-plan-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gh-create-pr

README.md
[![agentmods](https://agentmods.dev/badge/skills/gjoranv/claude-plan-skills/gh-create-pr/github.svg)](https://agentmods.dev/skills/gjoranv/claude-plan-skills/gh-create-pr)
Your own site
<a href="https://agentmods.dev/skills/gjoranv/claude-plan-skills/gh-create-pr"><img src="https://agentmods.dev/badge/skills/gjoranv/claude-plan-skills/gh-create-pr/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gh-create-pr

Your own site · 80×15
<a href="https://agentmods.dev/skills/gjoranv/claude-plan-skills/gh-create-pr"><img src="https://agentmods.dev/badge/skills/gjoranv/claude-plan-skills/gh-create-pr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,038 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.01038
Opus 5.5 $0.00015 $0.00415
Sonnet 5.5 $0.00007 $0.00208
Haiku 4.5 $0.00004 $0.00104

Measured 1mo ago against content hash e98e41cadcbd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gh-create-pr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

gh-create-pr/SKILL.md · 34 lines

How it starts

The opening of the file, as written. The whole thing — 34 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Create GitHub pull request(s) from the current branch. If this session touched multiple repos (check conversation context, plan issue, or ask the user), create a PR in each repo. Run steps 1-8 for each repo in sequence.

  1. Check state: Run git status and git branch --show-current.
  2. Prepare a branch:
    • Always fetch the latest base branch (main/master) first.
    • If the current branch is main/master, create a new branch off the freshly fetched base. Pick a short, descriptive branch name from the conversation context (e.g. resource-tags-docs). Move any uncommitted changes to the new branch.
    • Otherwise, rebase the current branch onto the freshly fetched base. If there are conflicts, stop and ask the user to resolve them.
  3. Handle uncommitted changes: If there are uncommitted changes on the (now non-master) branch, ask the user if they want to commit first. Do not proceed until the working tree is clean.
  4. Check for leaked references: Grep the diff and commit messages on this branch for references that the PR's audience cannot see: issues in a personal plan repo, internal issue trackers, or internal URLs. If found, warn the user and fix before proceeding.
  5. Push the branch: Push the current branch to remote with git push -u origin.
  6. Gather context: Read the git log for all commits on this branch since it diverged from the base branch. If a plan issue was referenced in this conversation, read it for additional context. Check for a PR template at .github/pull_request_template.md or .github/PULL_REQUEST_TEMPLATE.md in the repo. If one exists, use it as the structure for the PR description.
  7. Create the PR: Always use gh pr create --web --title <title> --body <body>. The --web flag is mandatory; it opens the browser so the user can review and edit before submitting. Do not use --edit (terminal editor, unreliable). Do not omit --web.
    • A concise title (under 70 characters)
    • Body: for trivial PRs (single commit, simple change), a few plain-text sentences covering what, why, and how it was tested. For non-trivial PRs (multi-commit, multi-file, or complex changes), use three sections: ## What, ## Why, ## Tested. Use bullet lists when listing multiple changes or test steps. Keep each section concise; reviewers read the diff for details.
      • Size the body to the change's consequence, not to the work behind it: a comment-only fix stays trivial however much investigation established it, while a one-line change to a widely-instantiated module is not.
      • Lead with what the change does for the reviewer rather than the method that found it, and leave evidence, log excerpts and ruled-out hypotheses in the plan issue.
      • Do not restate what the commit messages already say. The PR body adds the overarching why and how it was tested; the per-commit details are in the commits.
    • Link to the plan issue only if it is in the same repo as the PR. Never link to a plan issue in a personal or private repo from a PR in another repo. This applies to the PR description, comments, and commit messages.
    • For PRs to public repos: never reference internal issue trackers or internal URLs.
    • Do not set reviewers or labels.
    • Footer: Check for ~/.claude/skills/gh-create-pr/pr-footer.md. If it exists, append its content to the PR body, separated by ---. Replace {{model}} with the full model slug including version and variant (e.g. "Opus 4.8", "GPT-5.6 Sol"). For non-public repos only, append an HTML comment with session metadata after the footer text (invisible in rendered view): <!-- session: <name> | dir: <directory> | model: <model> | id: <session-id> -->. Never add this to PRs in open source repos.
  8. Post-creation: If creating PRs across multiple repos, cross-link them in each PR description (e.g. "Related: owner/other-repo#N"). Do NOT cross-link from a public repo to a non-public repo.

Rules:

  • Never create a PR without pushing the branch first.
  • Keep the description concise. No empty boilerplate sections.
  • Do not make unverified claims in the PR body or commit messages (e.g. "no functional change", "backward compatible"). Skip claims that don't add value.

Read the full file on GitHub · 34 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +3 lines e98e41cadcbd
  2. 1mo ago First seen · 31 lines · 37 tokens per session scan A b8eddb3ee216

Subscribe to this mod's changes

gh-create-pr is a skill published in the GitHub repository gjoranv/claude-plan-skills (5 stars, last pushed 19d ago), licensed MIT. It adds 37 tokens to every session and 1,038 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.