Skills

Create PR

Create high-quality pull requests via gh pr create.

Install

npx skills add ReflexioAI/claude-smart --skill create-pr -g -a claude-code -y
Category
Git and review
Updated
5d ago
License
Apache-2.0
Context cost
Lightabout 1,230 tokens
Runs scripts
No, instructions only

What it does

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:
    ruff check --fix <files> && ruff format <files>
    
    Re-stage any modified files.
  3. Commit, write a conventional commit message based on the staged diff:
    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

Read the whole SKILL.md on GitHub

More in Git and review