Skip to main content
skill CX Codex

create-pr · fradser — Claude Code skill: what it does, how to install

The create-pr skill opens GitHub pull requests after quality and security checks, then hands them to CI monitoring and reviewer-comment triage.

MIT 109 installs ★ 597 updated 2026-10-09

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add FradSer/dotclaude --skill create-pr -a claude-code
Open on GitHub

What create-pr does

The skill inspects Git state, the active branch, recent commits, GitHub authentication, and changed files. It also looks for repository contribution rules and pull request templates. Before opening the PR, it runs project checks such as linting, tests, builds, and scans for sensitive files or hardcoded secrets.

It then prepares the PR title and body, links related issues with auto-closing keywords, applies labels based on changed files, and calls gh pr create. Once the PR exists, the skill passes its number to /github:review-pr, which monitors CI and handles reviewer comments. Use --no-monitor to skip that handoff; --auto-merge is forwarded for automatic merging after the review conditions pass.

GitHub authentication is required before the workflow starts. The Claude Code install places the skill at ~/.claude/skills/create-pr/SKILL.md.

What it helps with

  • open a pull request from the current branch
  • run quality checks before creating a PR
  • connect a PR to an issue for auto-closing
  • scan changed files for secrets
  • hand a PR off to CI and review monitoring

Example prompts for the agent

  • Create a pull request from the current branch, run the checks, and link it to issue #456.
  • Prepare the PR with labels based on the changed files, then hand it off for CI monitoring.
  • Create the pull request with --no-monitor and skip the follow-up watch.

How to install create-pr

1Skills CLI (Vercel)

npx skills add FradSer/dotclaude --skill create-pr -a claude-code

2Manually: put the files in place

~/.claude/skills/create-pr/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/create-pr/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about create-pr

How do I install create-pr in Claude Code?

Run npx skills add FradSer/dotclaude --skill create-pr -a claude-code, then use ~/.claude/skills/create-pr/SKILL.md.

What does create-pr do?

It checks repository state, validates quality and security, creates a GitHub pull request through gh pr create, and hands the PR to CI monitoring and reviewer-comment triage.

Can I skip monitoring or enable auto-merge?

Yes. Pass --no-monitor to skip the /github:review-pr handoff, or pass --auto-merge so the review workflow can merge after CI succeeds and comments are handled.

Source text

SKILL.md · MIT
---
name: create-pr
allowed-tools: Task, Bash(gh:*), Bash(git:*), Skill
description: Creates comprehensive GitHub pull requests with automated quality validation and security scanning, then hands off to /github:review-pr for CI monitoring and reviewer-comment triage. This skill should be used when the user asks to "create a PR", "submit a pull request", or needs to merge completed work with full compliance checks.
argument-hint: "[optional description or issue reference] [--no-monitor] [--auto-merge]"
user-invocable: true
---

# 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.

## Phase 4: Post-PR Handoff (default on)

**Trigger**: Default behavior — hand off unless `$ARGUMENTS` contains `--no-monitor` or the user opts out.

**Goal**: Delegate CI monitoring and reviewer-comment triage to the dedicated skill.

**Action**: After the PR is created, invoke `Skill("github:review-pr", "<PR#>")` to run the baseline review and launch the persistent CI + comment watch. The review-pr skill owns the Monitor script, the skeptical triage agent, the review → fix → commit+push → wait-for-review loop, through to the merge decision and the post-merge branch hygiene (remote + local head cleanup, `fetch --prune`, fast-forward `main`/`develop`). **Once CI is green and every comment is triaged, review-pr asks the user whether to merge via `AskUserQuestion` (merge commit/squash/rebase/don't) BEFORE its closeout ceremony** — the summary comment and body rewrite run only on a merge choice. The merge ask is enforced by the plugin's Stop hook: review-pr arms a closeout state the moment the stop conditions hold and one turn-end per user turn is blocked until the decision resolves — the handoff cannot silently skip the ask. See `references/pr-creation-handoff.md` for the handoff contract including post-merge hygiene. This skill does not duplicate that cleanup; it is the handoff target's responsibility.

**`--auto-merge` passthrough**: If `$ARGUMENTS` carried `--auto-merge`, pass it through to the review-pr invocation as `Skill("github:review-pr", "<PR#> --auto-merge")`. It instructs review-pr to skip the merge `AskUserQuestion` — the closeout ceremony (summary comment + body rewrite) still runs first — and auto-merge with `gh pr merge --merge` once CI is green and every non-escalate comment is triaged — see `references/pr-creation-handoff.md` for the contract and the escalate fallback. Pass it through **only** when the user explicitly set it; never infer it.

**CRITICAL: this skill is the plugin's only PR-creating path.** Other skills (e.g. `/github:resolve-issues`) delegate here instead of calling `gh pr create` themselves, precisely so no PR escapes the quality gate or this handoff. See `references/pr-creation-handoff.md` for the full contract. Do not add a bypass.

## References

- **Requirements**: `references/requirements.md` - Pre-creation checklist and commit standards
- **Repository Templates**: `references/repository-templates.md` - Contributing guidelines and PR templates
- **Quality Validation**: `references/quality-validation.md` - Node.js/Python validation commands
- **PR Structure**: `references/pr-structure.md` - Title guidelines, body template, labels
- **Auto-Closing Keywords**: `references/auto-closing-keywords.md` - Default-branch limitation and keyword table
- **PR Creation Handoff**: `references/pr-creation-handoff.md` - Only PR-creating path contract
- **Failure Resolution**: `references/failure-resolution.md` - Agent collaboration for fixing failures
- **Examples**: `references/examples.md` - Commit message examples

© FradSer · MIT · FradSer/dotclaude

Similar skills

All skills for Git and GitHub →

create-pr by other authors comes first.

create-pr NeoLabHQ create-pr opens draft pull requests through the GitHub CLI using repository templates. It checks for uncommitted changes and formats PR titles with emojis. CX Codex +1 1,200installs create-pr zhaono1 create-pr — a skill that walks the agent through opening a pull request and keeps the English and Chinese READMEs in sync. Useful when the skill catalog changes and the docs have to follow. CX Codex +1 678installs create-pr OrchestKit create-pr — a skill that opens a GitHub pull request after running tests, linter, types, and security checks. Triggers on explicit invocation; plain gh pr create stays a command. CX Codex +1 209installs create-pr marcelorodrigo create-pr prepares structured pull requests, generates conventional titles, and submits them via GitHub CLI. CX Codex +1 312installs create-pr Factory-AI create-pr — a skill that creates a pull request with a Conventional Commits title, templated body, and local verification before submission. CX Codex +1 115installs antfu-create-pr Anthony Fu antfu-create-pr is a Claude Code skill that creates a GitHub pull request with a Conventional Commits title, evidence, and UI screenshots. It runs when a PR is requested. CX Codex +1 919installs create-fix-pr launchdarkly create-fix-pr finds bug root causes and submits minimal GitHub pull requests from observability logs. Helps ship targeted fixes without unnecessary refactoring. CX Codex +1 702installs mcore-create-issue Philip Petrakian mcore-create-issue investigates failing GitHub Actions runs for NVIDIA/Megatron-LM, extracts the error cause, and files a structured bug report. CX Codex +1 1,800installs pr-create Garrick Aden-Buie (@gadenbuie) pr-create is a Claude Code skill that branches, commits changes, opens a GitHub PR, and monitors CI, pushing fixes until checks pass. CX Codex +1 807installs create-branch tartinerlabs create-branch creates git branches with naming validation and connects them to GitHub or GitLab issues automatically. Helps start new feature work cleanly. CX Codex +1 413installs create-pull-request davila7 create-pull-request — a Claude Code command that opens a pull request via GitHub CLI against the project's own PR template. It fires when a branch is ready and you need a draft PR with all template sections filled in. CX Codex +1 411installs

From the same set16

The whole set →
plugin-best-practices plugin-best-practices validates Claude Code plugin structure, manifests, and architecture against framework standards. Ensures your plugin meets requirements before marketplace submission. CX Codex +1 121installs commit This skill creates atomic conventional commits through git-agent. Use it when a short intent should become a focused Git commit. CX Codex +1 121installs optimize-plugin optimize-plugin validates Claude plugin structure, runs Python sanity checks, and fixes issues via a subagent. Useful when auditing or refactoring plugin manifests and components. CX Codex +1 117installs create-prd The create-prd skill turns product ideas into a structured PRD through a guided interview, then saves it as Markdown or creates a Feishu document. CX Codex +1 117installs create-issues create-issues automates GitHub issue creation with TDD principles, proper labeling, and auto-closing keywords. Detects repository templates, applies conventions, and links issues to epics or related tasks. CX Codex +1 116installs best-practices best-practices enforces language-specific standards and framework rules for TypeScript, Python, Go, Swift, and React. CX Codex +1 115installs refactor Runs automated code refactoring on specified files, directories, or recent git modifications. CX Codex +1 113installs resolve-issues resolve-issues — a skill for Claude Code handles GitHub issues with an isolated worktree and TDD. It then hands PR creation to the project’s quality and review workflow. CX Codex +1 112installs

Project sponsors

Companies that keep this analytics open