create-pr

A pull-request creation workflow for submitting the current branch's code changes for review.

In plain words
What is it for?
Use it to inspect commits and changes, write a title and summary with a test plan, push the branch, and create the pull request.
Why use it?
It gathers the full branch history and differences so the pull request describes all relevant work, not just the latest commit.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/huzaifa525/claude-code-optimizer/create-pr
Any agent
npx skills add huzaifa525/claude-code-optimizer --skill create-pr
Clone the repo
git clone --depth 1 https://github.com/huzaifa525/claude-code-optimizer

Made for: Claude Code, Codex.

Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 344 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00024 $0.00344
Opus 5 $0.00012 $0.00172
Sonnet 5 $0.00005 $0.00069
Haiku 4.5 $0.00002 $0.00034

Measured 2d ago against content hash 2ea4446f7cc9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 2d 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.

templates/.claude/skills/create-pr/SKILL.md · 59 lines

What it actually says

Create a pull request for the current branch.

Steps

  1. Gather context

    git branch --show-current
    git log main..HEAD --oneline
    git diff main..HEAD --stat
    git diff main..HEAD
    
  2. Analyze ALL commits on this branch (not just the latest)

  3. Generate PR

    • Title: Under 70 characters, describes the change
    • Body: Summary bullets + test plan
  4. Push and create PR

    git push -u origin $(git branch --show-current)
    

    Then create PR:

    gh pr create --title "title" --body "$(cat <<'EOF'
    ## Summary
    - Bullet point 1
    - Bullet point 2
    - Bullet point 3
    
    ## Changes
    - [file] — [what changed and why]
    
    ## Test Plan
    - [ ] Test step 1
    - [ ] Test step 2
    - [ ] Test step 3
    EOF
    )"
    
  5. Return the PR URL

If $ARGUMENTS is provided

Use it as the base branch instead of main.

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. 2d ago First seen · 59 lines · 24 tokens per session scan A 2ea4446f7cc9

Subscribe to this mod's changes

create-pr is a skill published in the GitHub repository huzaifa525/claude-code-optimizer (9 stars, last pushed 5mo ago), licensed MIT. It adds 24 tokens to every session and 344 once invoked, about $0.0001 per session on Opus 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.