Agent skill

Create PR

by ReflexioAI in ReflexioAI/claude-smart

Create high-quality pull requests via gh pr create. An agent skill from ReflexioAI/claude-smart.

Apache-2.0Auto-check: notesDevelopment

Install Create PR

skills CLI
$ npx skills add ReflexioAI/claude-smart --skill create-pr -a claude-code

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

GitHub CLI
$ gh skill install ReflexioAI/claude-smart create-pr --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/ReflexioAI/claude-smart.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/create-pr .claude/skills/create-pr && 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-pr
GitHub stars
782
Token cost
~1.3k tokens
SKILL.md length
618 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
Apache-2.0

At a glance

Create high-quality pull requests via gh pr create. An agent skill from ReflexioAI/claude-smart.

  • Works in 8 steps: Pre-flight Checks → Commit Uncommitted Changes → Ensure Feature Branch → …
  • The user wants to create a PR
  • SKILL.md covers Workflow and Best Practices
  • Calls git, gh and ruff

What it does

Create PR is an agent skill from ReflexioAI/claude-smart. Create high-quality pull requests via gh pr create. Use when the user wants to create a PR, submit a PR, open a pull request, submit for review, or push changes for review. Triggers on: create a pr, create-pr, submit a pr, open a pull request, submit for review, make a pr, gh pr create.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Pull requests. It works with Git. The repository describes itself as: Turns corrections into Preferences, Project-specific skills, and Shared skills for Claude Code, Codex, and OpenCode. The licence is Apache-2.0.

When your agent uses it

  • The user wants to create a PR
  • Open a pull request
  • Submit for review
  • Push changes for review

Example prompts

  • “/create-pr”

Requirements

  • Python 3

Workflow steps

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

  1. Pre-flight Checks
  2. Commit Uncommitted Changes
  3. Ensure Feature Branch
  4. Sync with Base Branch
  5. Push
  6. Analyze Changes and Draft PR
  7. Create the PR
  8. Report

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh
    • ruff

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

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    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 PR loads about 1.3k tokens when it runs. Until then it costs about 74 tokens; SKILL.md has 618 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:27
    modified/untracked files. Do not stage `.env` or gitignored files.

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 ReflexioAI/claude-smart at commit 687360e, republished under its Apache-2.0 licence (© ReflexioAI). 618 words, ~1,312 tokens.

Download SKILL.mdSave it as .claude/skills/create-pr/SKILL.md (or your agent's skills folder).
name
create-pr
description
Create high-quality pull requests via gh pr create. Use when the user wants to create a PR, submit a PR, open a pull request, submit for review, or push changes for review. Triggers on: create a pr, create-pr, submit a pr, open a pull request, submit for review, make a pr, gh pr create.

PR Creator

Create well-structured, reviewer-friendly pull requests following best practices.

CRITICAL: This skill MUST always result in a PR being created. Do NOT stop early, do NOT ask the user to run another command first. Handle all prerequisites (committing, branching, pushing) inline and proceed to gh pr create.


Workflow

Step 1: Pre-flight Checks

Run these checks before anything else:

  1. Verify GitHub CLI authentication — run gh api user --jq '.login' to confirm the CLI is authenticated. If this fails, tell the user to run gh auth login first and stop.
  2. Determine the base branch — default to main. If the user specifies a different base, use that. Capture as $BASE_BRANCH.
Step 2: Commit Uncommitted Changes

Run git status to check for uncommitted changes. If there are uncommitted changes, commit them directly — do NOT delegate to another skill or tell the user to commit first.

  1. Stage changes — run git add <files> for relevant modified/untracked files. Do not stage .env or gitignored files.
  2. Lint and format — if Python files are staged, run:
    bash
    ruff check --fix <files> && ruff format <files>
    Re-stage any modified files.
  3. Commit — write a conventional commit message based on the staged diff:
    bash
    git commit -m "<type>: <description>"
    If precommit hooks modify files, re-stage with git add -u and retry (up to 3 times).
Step 3: Ensure Feature Branch
  1. Check current branch — run git branch --show-current.
  2. If on $BASE_BRANCH, create a feature branch:
    • Analyze the commits/changes to pick a descriptive name (e.g., feat/add-auth, fix/login-bug)
    • Run git checkout -b <branch-name>
  3. If on a different branch, check whether the branch has PR-worthy commits vs $BASE_BRANCH:
    • Run git log $BASE_BRANCH..HEAD --oneline
    • If there are commits, use the current branch as-is
    • If there are NO commits (branch is at same point as base), this means something went wrong — investigate and fix
Step 4: Sync with Base Branch
  1. Fetch latest — run git fetch origin $BASE_BRANCH
  2. Check for divergence — run git log HEAD..origin/$BASE_BRANCH --oneline
  3. Rebase if needed — if the base branch has new commits: a. Run git rebase origin/$BASE_BRANCH b. If conflicts arise, surface them to the user — show both sides and ask which to keep. Do not silently resolve. c. After resolving, git add <file> and git rebase --continue
Show full SKILL.md (258 more words)Show less
Step 5: Push

Push the branch to remote:

bash
git push -u origin HEAD

If the push is rejected (e.g., diverged history after rebase), use git push --force-with-lease -u origin HEAD.

Step 6: Analyze Changes and Draft PR
  1. Analyze — run these in parallel:
    • git log $BASE_BRANCH..HEAD --oneline — all commits
    • git diff $BASE_BRANCH...HEAD --stat — files changed summary
    • git diff $BASE_BRANCH...HEAD — full diff
  2. Check PR size — if >500 lines changed, warn the user but continue.
  3. Draft title — under 70 characters, conventional prefix (feat:, fix:, refactor:, docs:, chore:).
  4. Draft body using this template:
## Summary
<1-5 bullet points explaining what changed and WHY>

## Changes
<Categorized list of what was modified — group by area/concern>

## Diagrams
<OPTIONAL — include Mermaid diagrams when visual aids clarify workflow or architecture changes>

## Test Plan
<How the changes were verified — manual testing steps, automated tests run, curl commands, etc.>

Guidelines:

  • Explain why, not just what
  • For WIP PRs, use the --draft flag instead of [WIP] prefix
  • Include Mermaid diagrams when they clarify workflows or architecture
  • Do NOT include any "Generated with Claude Code" footer or bot attribution
  • Do NOT include Co-Authored-By lines
Step 7: Create the PR

Write body to a temp file and create the PR:

bash
cat > /tmp/pr_body.md <<'EOF'
## Summary
...

## Changes
...

## Test Plan
...
EOF
gh pr create --title "the pr title" --base $BASE_BRANCH --body-file /tmp/pr_body.md

Optional flags:

  • WIP/draft: add --draft
  • Reviewers: add --reviewer <handle>
  • Assignees: add --assignee <handle>

Do NOT add:

  • --author flag (gh uses the authenticated user automatically)
  • Any Co-Authored-By trailer
  • Any "Generated with Claude Code" footer
Step 8: Report
  • Return the PR URL so the user can review it
  • If gh pr create fails, diagnose the error and retry with fixes

Best Practices

Commit History: If the commit history is messy, suggest rebasing to clean it up before creating the PR.

Feedback Requests: If the user mentions wanting specific feedback, add a "Feedback Requested" section to the body.

Screenshots: For frontend changes, remind the user to add screenshots or recordings to the PR after creation.

© ReflexioAI, Apache-2.0. 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 .agents/skills/create-pr of ReflexioAI/claude-smart.

Open the folder on GitHubat commit 687360e

Compare with similar skills

Create PR 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 PR compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Create PR this skillReflexioAI/claude-smart782—~1.3kAutomated safety check: NotesApache-2.0
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Understand Diff AnalysisEgonex-AI/Understand-Anything85k1 repos~1.4kAutomated safety check: PassMIT
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Open Code Review CLIalibaba/open-code-review44k—~3.1kAutomated safety check: PassApache-2.0
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Understand Diff Analysis

    Egonex-AI/Understand-Anything

    Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.

    85k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • 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
  • Open Code Review CLI

    alibaba/open-code-review

    Runs the ocr command-line tool to review Git changes, a commit or a branch comparison with an AI model, returning line-level comments and optionally applying fixes.

    44k GitHub stars~3.1k tokensUpdated 2 days ago
    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

More from ReflexioAI/claude-smart

  • Update PR

    ReflexioAI/claude-smart

    Update an existing pull request with new changes. An agent skill from ReflexioAI/claude-smart.

    782 GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Claude Smart

    ReflexioAI/claude-smart

    Codex-only — use when the user asks to run claude-smart commands in Codex, including claude-smart show, learn, restart, dashboard, clear-all, or slash-like requests such as /claude-smart:learn.

    782 GitHub stars~439 tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Create PR

What does Create PR do?

Create high-quality pull requests via gh pr create. An agent skill from ReflexioAI/claude-smart. Create PR is an agent skill from ReflexioAI/claude-smart. Create high-quality pull requests via gh pr create.

When should I use Create PR?

Create PR fits situations like: the user wants to create a PR; open a pull request; submit for review; push changes for review.

How do I install Create PR in Claude Code?

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

How do I install Create PR in Codex?

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

Can I use Create PR 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 ReflexioAI/claude-smart --skill create-pr -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-pr, .gemini/skills/create-pr, .github/skills/create-pr and .opencode/skills/create-pr in your project.

What does Create PR need to run?

Going by SKILL.md and its folder, Create PR needs the command-line tools its instructions call (git, gh and ruff). Our summary lists: Python 3.

Does Create PR access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Create PR safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Create PR use?

Create PR is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Create PR use?

About 1.3k tokens (SKILL.md is roughly 5.2k 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 PR?

Skills that share tags, products or a category with Create PR: Finishing a Development Branch (obra/superpowers, 296k stars), Understand Diff Analysis (Egonex-AI/Understand-Anything, 85k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars) and Open Code Review CLI (alibaba/open-code-review, 44k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Create PR?

ReflexioAI (a GitHub organization) maintains it in ReflexioAI/claude-smart, which has 782 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 6, 2026.

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