create-pr

A workflow for creating a GitHub pull request, which asks others to review a set of code changes. It checks the repository, runs available quality and security checks, and sends the pull request to a review workflow.

In plain words
What is it for?
Use it to validate committed changes, check contribution rules and pull-request templates, link related issues, and open a properly prepared pull request.
Why use it?
It helps catch missing tests, build problems, security concerns, and repository requirements before asking for review.

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/fradser/dotclaude/create-pr
Any agent
npx skills add FradSer/dotclaude --skill create-pr
Clone the repo
git clone --depth 1 https://github.com/FradSer/dotclaude

Made for: Claude Code, Codex.

Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,789 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.00067 $0.01789
Opus 5 $0.00034 $0.00894
Sonnet 5 $0.00013 $0.00358
Haiku 4.5 $0.00007 $0.00179

Measured 2d ago against content hash 62010d93302d, 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.

github/skills/create-pr/SKILL.md · 97 lines

How it starts

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

Create GitHub Pull Request

Execute automated PR creation workflow with comprehensive quality validation and security scanning.

Context

  • Current git status: !git status
  • Current branch: !git branch --show-current
  • Unpushed commits: !git log --oneline -5
  • GitHub authentication: !gh auth status
  • Repository changes: !git diff --stat HEAD~1..HEAD

Requirements Summary

Ensure repository readiness with clean state and authentication. Complete all quality checks (lint, test, build, security) before PR creation. Link related issues with auto-closing keywords and apply accurate labels. See references/requirements.md for complete checklist.

Phase 1: Validation and Analysis

Goal: Validate repository state, analyze changes, detect templates, and identify blockers.

Actions:

  1. Verify GitHub authentication from context
  2. Check branch status and unpushed commits
  3. Analyze commit history for conventional commit compliance
  4. Identify changed files and determine PR scope
  5. Check for contributing guidelines (CONTRIBUTING.md) and follow its requirements
  6. Detect PR templates (.github/PULL_REQUEST_TEMPLATE.md or root/docs locations)
  7. Detect potential blockers (merge conflicts, missing tests, etc.)

See references/repository-templates.md for template detection and compliance details.

Phase 2: Quality and Security Checks

Goal: Execute comprehensive quality validation and security scanning.

Actions:

  1. Run project-specific quality checks (see references/quality-validation.md for commands)
  2. Execute security scanning for sensitive files and hardcoded secrets
  3. Validate commit message format against standards
  4. If checks fail: follow failure resolution process in references/failure-resolution.md
  5. Re-run all checks until passing

Phase 3: PR Assembly and Creation

Goal: Create pull request with proper structure, metadata, and links.

Actions:

  1. Consume $ARGUMENTS before deriving anything. It may carry, in any combination:
    • An issue reference (Closes #456, Fixes #12, or a bare #456) — use it verbatim as the auto-closing keyword in the PR body; do not re-derive or second-guess it. /github:resolve-issues delegates here and passes the issue it just resolved this way.
    • A free-text description — use it as the basis for the PR title and the What/Why section.
    • --draft — pass through to gh pr create in step 6.
    • --no-monitor — a Phase 4 opt-out only; never treat it as description text.
    • --auto-merge — pass through to /github:review-pr in Phase 4; turns on auto-merge on green in the review loop. Never treat it as description text. Strip the flags before using the remainder as description/issue text.
  2. Identify and link any further related issues using GitHub CLI (in addition to any reference from $ARGUMENTS)
  3. Generate PR title (≤70 chars, imperative, no emojis)
  4. Assemble PR body following template in references/pr-structure.md
  5. Apply automated labels based on file changes
  6. CRITICAL: auto-closing keywords only fire when the PR merges into the repository's default branch. If targeting a non-default branch (e.g. develop), explicitly warn the user that linked issues will NOT close automatically on merge and must be closed manually — see references/auto-closing-keywords.md for the full rule and keyword table.
  7. Create PR using gh pr create with all metadata
    • Use --draft if $ARGUMENTS requested it, or if the PR requires early feedback or is not fully complete
    • Set reviewers with --reviewer and assignees with --assignee when requested
    • Fill title/body automatically using --fill for simple changes
  8. Report final PR URL and status to user. Do NOT run a foreground gh pr checks --watch here — Phase 4 hands off to /github:review-pr, which owns the persistent CI watch; a blocking --watch would stall the turn and duplicate that watch.
  9. CRITICAL: Proceed to Phase 4. Creating the PR is not the end of this skill. Skip Phase 4 only if $ARGUMENTS contains --no-monitor or the user explicitly opts out — never because CI looks green, no reviewers are assigned, or the change looks trivial.

Read the full file on GitHub · 97 lines

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 · 97 lines · 67 tokens per session scan A 62010d93302d

Subscribe to this mod's changes

create-pr is a skill published in the GitHub repository FradSer/dotclaude (588 stars, last pushed 21d ago), licensed MIT. It adds 67 tokens to every session and 1,789 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

agent-host-chat-contributions

Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.

microsoft/vscode · 56 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens