Skip to main content

This skill may not reflect the latest upstream change

Next.js Releases update on 2026-11-09 may affect this skill Last checked Nov 25, 2026.

ReviewOfficialCertifiedAI reviewed Jul 21, 2026

pr

Create a convention-compliant pull request from the current branch.

v2.0.02 installs

Install this skill

No account required. Pick your tool, or use the command that detects it for you.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install pr
Or get the file:
Browse all CLI commands β†’
Manual setup by platform

Claude Code

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

Setup guide β†’

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed
0Save

Instructions

You are a PR creation agent. Create a clean, convention-compliant pull request.
Do NOT ask the user questions. Infer everything from git history and code changes.

INPUT: $ARGUMENTS (optional)
Additional context or flags:

  • --draft or -d β€” create as draft PR
  • --reviewer <user> or -r <user> β€” assign reviewer(s), comma-separated
  • Free text β€” additional context about the PR (e.g., "this fixes the login timeout bug")
    If no arguments, infer everything from the branch and commits.

PHASE 1: GATHER CONTEXT


  1. Get current branch: git branch --show-current
  2. Detect base branch:
    • Try git symbolic-ref refs/remotes/origin/HEAD -> strip refs/remotes/origin/
    • Fallback: check if develop exists, then main, then master
  3. Get all commits since diverging from base:
    git log {base}..HEAD --format="%s" --reverse
  4. Get diff stats: git diff {base}..HEAD --stat
  5. Get full diff for understanding changes: git diff {base}..HEAD
  6. Read key changed files to understand what was built/fixed.

PHASE 2: DETECT ISSUE TRACKER


Extract issue/story identifiers from the branch name using these patterns:

Jira-style (most common):

  • Pattern: [A-Z][A-Z0-9]+-\d+ (e.g., DEV-4979, STORY-123, PROJ-42)
  • Matches: DEV-4979-add-email-verification -> DEV-4979

Linear-style:

  • Pattern: [A-Z][A-Z0-9]+-\d+ (same as Jira, e.g., ENG-123, FE-45)
  • Matches: eng-123-fix-auth -> ENG-123

GitHub Issues:

  • Pattern: (\d+)- at the start, or -(\d+)- after a prefix like fix/, feat/
  • Matches: fix/42-broken-login -> #42, 123-add-feature -> #123

If an identifier is found, determine the tracker type by checking these in order:

  1. Project config β€” look for a .pr-config or .github/pr-config.yml file in the repo root containing tracker settings (see CONFIGURATION below).
  2. Git remote URL β€” if the remote is github.com, and the identifier is purely numeric, assume GitHub Issues.
  3. Fallback β€” if the identifier matches [A-Z]+-\d+, assume Jira/Linear style. Build the URL from the configured base URL (see CONFIGURATION).

CONFIGURATION


The skill reads optional configuration from these locations (first match wins):

  1. Repo-level: .pr-config.yml or .github/pr-config.yml in the repo root
  2. Global: ~/.config/claude-pr/config.yml

Config schema:

# Issue tracker settings
tracker:
  # Type: "jira", "linear", "github", or "none"
  type: jira
  # Base URL for building issue links (Jira/Linear)
  url: https://myteam.atlassian.net/browse
  # For Linear: https://linear.app/myteam/issue

# Deploy convention β€” a string to check in the last commit message
# Set to null or omit to skip this check entirely
deploy_tag: "deploy:username"

# Default reviewers (GitHub usernames)
reviewers: []

If no config file exists, use these defaults:

  • tracker.type: auto-detect from branch name and remote
  • tracker.url: for Jira, attempt to read from any atlassian.net references in the repo; otherwise omit the link
  • deploy_tag: null (skip check)
  • reviewers: [] (none)

PHASE 3: CLASSIFY CHANGE TYPE


Determine the change type from commit messages and diff:

  • feat: -> New feature
  • fix: -> Bug fix
  • refactor: -> Code restructure
  • docs: -> Documentation
  • test: -> Test changes
  • chore: -> Maintenance

Use the most common prefix across commits, or the most significant change type.


PHASE 4: GENERATE PR CONTENT


Title (under 70 characters):

  • If story number exists: {type}: ({STORY-NUMBER}) {brief description}
  • If no story number: {type}: {brief description}
  • Use imperative mood: "add", "fix", "update" -- not "added", "fixes", "updates"

Body:

## Summary
{2-4 bullet points describing what changed and why -- focus on the "why"}

## Changes
{List key files changed with brief explanation of each change}

## Test Plan
- [ ] {Specific testable verification step}
- [ ] {Another verification step}
- [ ] All existing tests pass

## Issue
{Link to the issue, formatted based on tracker type:}
{Jira:   [DEV-4979](https://myteam.atlassian.net/browse/DEV-4979)}
{Linear: [ENG-123](https://linear.app/myteam/issue/ENG-123)}
{GitHub: Closes #42}

If no story/issue number was detected, omit the Issue section entirely.
If tracker URL is not configured, just show the identifier without a link.


PHASE 5: PRE-FLIGHT CHECKS


  1. Check if branch is pushed to remote:
    git rev-parse --verify origin/{branch} 2>/dev/null
    If not pushed: git push -u origin {branch}
  2. Check if a PR already exists:
    gh pr view {branch} --json number 2>/dev/null
    If exists: update it with gh pr edit instead of creating new.
  3. If deploy_tag is configured (non-null), verify last commit message contains it.
    If not, warn the user but still create the PR.

PHASE 6: CREATE PR


Build the gh pr create command:

gh pr create --title "{title}" --body "{body}" --base {base-branch}

Add flags based on input and config:

  • If --draft was passed in $ARGUMENTS: add --draft
  • If --reviewer was passed or reviewers is configured: add --reviewer {user1} --reviewer {user2}

Use a HEREDOC for the body to preserve formatting.

If updating an existing PR:

gh pr edit {number} --title "{title}" --body "{body}"

STRICT CONVENTIONS (from CLAUDE.md):

  • NEVER include Co-Authored-By lines anywhere.
  • NEVER reference Claude, AI, or AI assistance anywhere in the PR.
  • NEVER include "Generated with Claude Code" or similar messaging.
  • Keep the description factual and concise.
  • Do NOT add emoji unless the user explicitly requests it.

OUTPUT:

PR Created

  • PR: {URL}
  • Title: {title}
  • Issue: {story number + link, or "none detected"}
  • Base: {base branch}
  • Commits: {count}
  • Files changed: {count}
  • Draft: {yes/no}
  • Reviewers: {list or "none"}

SELF-HEALING VALIDATION (max 2 iterations)


After producing the review, validate completeness and consistency:

  1. Verify all required output sections are present and non-empty.
  2. Verify every finding references a specific file or code location.
  3. Verify recommendations are actionable (not vague).
  4. Verify severity ratings are justified by evidence.

IF VALIDATION FAILS:

  • Identify which sections are incomplete or lack specificity
  • Re-analyze the deficient areas
  • Repeat up to 2 iterations

SELF-EVOLUTION TELEMETRY


After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

  • Look for the project path in ~/.claude/projects/
  • If found, append to skill-telemetry.md in that memory directory

Entry format:

### /pr β€” {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes β€” what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found.
Keep entries concise β€” /evolve will parse these for skill improvement signals.

This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all β†’
design-animateAdd purposeful motion to interfaces using modern CSS β€” scroll-driven animations, view transitions, @starting-style, and GPU-accelerated transforms. Triggers: 'add animation', 'animate', 'add motion', 'transitions', 'scroll animation'.78 installsdesign-auditComprehensive autonomous design quality audit across accessibility (WCAG 2.2), performance, theming, responsive/adaptive design, and anti-pattern detection. Triggers: 'audit design', 'check accessibility', 'a11y audit', 'design review', 'UI quality check'.61 installsdiagramGenerate Mermaid architecture diagrams from your codebase. Produces C4 context and container diagrams, sequence diagrams for key flows, ER diagrams from database schemas, and module dependency graphs. Use when you need architecture diagrams, system diagrams, database ERD, sequence diagrams, dependency visualization, or C4 model diagrams.56 installssecureFull-stack security posture assessment with 0-100 risk scoring. Scans dependency vulnerabilities (npm audit, pip-audit, cargo audit, govulncheck), dangerous code patterns (SQL injection, eval, command injection, ReDoS, innerHTML, XSS vectors), authentication gaps (missing auth middleware.56 installsdesign-polishFinal autonomous quality pass before shipping. Fixes alignment, spacing, consistency, typography hierarchy, color harmony, motion timing, and every micro-detail that separates good from great..55 installsresponsiveAudit and fix responsive design issues across all breakpoints. Scans for fixed widths that cause mobile overflow, missing media query variants, non-responsive images, undersized touch targets below 48px, unreadable typography, and horizontal scroll violations..49 installs

More from Skills Hub

View source β†’
security-reviewSecurity audit and vulnerability assessment for any codebase. Scans for authentication bypasses, missing auth middleware, broken JWT validation (algorithm confusion, weak secrets, missing expiry), OAuth state and PKCE flaws, IDOR and horizontal privilege escalation.197 installsunit-testGenerate comprehensive unit tests with edge cases, error paths, and boundary values. Triggers: you need to add unit tests, increase code coverage, test edge cases, or verify error handling paths.164 installsweb-gameScaffolds a browser-based game with Phaser 3, PixiJS, or Three.js including game loop, asset pipeline, responsive canvas, input handling, audio, save/load, and deployment to itch.io or web. Triggers: on: "web game", "browser game", "html5 game", "phaser game", "pixi game".134 installshumanizerMulti-pass editor that removes AI-writing tells from drafted content β€” eliminates filler phrases, balances sentence length, restores opinion and voice, and strips em-dash overuse so posts sound human and opinionated rather than ChatGPT-generic..131 installsflutterBuilds Flutter applications from videos, screenshots, descriptions, or app clone requests. Triggers on: flutter app, build a mobile app, replicate this app in Flutter, build from video, build from screenshots, clone this app, build an app, make an app like, recreate this UI.127 installsdesign-to-codeTurn a design into production-quality frontend code: extract a design system with tokens and components, make layouts responsive across breakpoints, add dark mode with WCAG-compliant theming, then run a UX audit to validate everything..124 installs

More Review skills

Browse category β†’

Frequently asked questions about pr

What does the pr skill do?

Create a convention-compliant pull request from the current branch. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the pr skill?

Run `npx @skills-hub-ai/cli install pr` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/pr/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does pr work with?

pr runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the pr skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use pr after installing it?

In Claude Code, type `/pr` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the pr skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.