pr-creator

pr-creator

Creates a pull request from current changes, monitors GitHub CI, and debugs any failures until CI passes. Use this when the user says "create pr", "make a pr", "open pull request", "submit pr", or "pr for these changes". Does NOT merge - stops when CI passes and provides the PR link.

0
0포크
업데이트됨 1/17/2026
SKILL.md
readonlyread-only
name
pr-creator
description

Creates a pull request from current changes, monitors GitHub CI, and debugs any failures until CI passes. Use this when the user says "create pr", "make a pr", "open pull request", "submit pr", or "pr for these changes". Does NOT merge - stops when CI passes and provides the PR link.

PR Creator Skill

You are a developer preparing changes for review. Your job is to commit changes, create a PR, monitor CI, fix any failures, and notify the user when the PR is ready for merge.

Process

Step 1: Check Git Status

Run these commands to understand the current state:

git status
git diff --stat
git log --oneline -5

Verify before proceeding:

  • There are changes to commit (staged or unstaged)
  • You're on a feature branch (not main/master) OR need to create one
  • The branch is not already ahead with unpushed commits that have a PR

If no changes exist:

  • Inform the user: "No changes detected. Nothing to commit."
  • Stop here.

Step 2: Create Branch (if needed)

If currently on main/master:

git checkout -b <descriptive-branch-name>

Branch naming convention:

  • feat/short-description for features
  • fix/short-description for bug fixes
  • refactor/short-description for refactoring
  • docs/short-description for documentation

Step 3: Stage and Commit Changes

# Stage all changes
git add -A

# Review what's staged
git diff --cached --stat

# Create commit with descriptive message
git commit -m "$(cat <<'EOF'
<type>: <short summary>

<optional longer description>
EOF
)"

Commit message guidelines:

  • Use conventional commits: feat:, fix:, refactor:, docs:, test:, chore:
  • First line: 50 chars max, imperative mood
  • Body: wrap at 72 chars, explain what and why

Step 4: Push Branch

git push -u origin <branch-name>

Step 5: Create Pull Request

gh pr create --title "<title>" --body "$(cat <<'EOF'
## Summary
<1-3 bullet points describing what this PR does>

## Changes
<list of key changes>

## Test Plan
<how to verify this works>
EOF
)"

Capture the PR URL from the output - you'll need it later.

Step 6: Monitor CI

Wait for CI to start, then monitor:

# List workflow runs for this PR
gh run list --branch <branch-name> --limit 5

# Watch a specific run (blocking)
gh run watch <run-id>

# Or check status without blocking
gh run view <run-id>

Poll every 30-60 seconds until CI completes.

Step 7: Handle CI Results

If CI Passes:

  • STOP HERE - do not merge
  • Report to user:
    ✅ PR is ready for review!
    
    **PR:** <url>
    **Branch:** <branch-name>
    **CI Status:** All checks passed
    
    The PR is ready to be reviewed and merged.
    

If CI Fails:

  1. Get failure details:

    gh run view <run-id> --log-failed
    
  2. Analyze the failure:

    • Identify which job/step failed
    • Read the error message
    • Determine the fix
  3. Fix the issue:

    • Make necessary code changes
    • Stage and commit the fix:
      git add -A
      git commit -m "fix: <what was fixed>"
      git push
      
  4. Return to Step 6 - monitor the new CI run

Repeat until CI passes.

Step 8: Final Report

When CI passes, provide a summary:

## PR Ready for Review

**PR:** [#<number> <title>](<url>)
**Branch:** `<branch-name>` → `main`
**Commits:** <count>
**CI Status:** ✅ All checks passed

### Changes Included
- <change 1>
- <change 2>

### CI Runs
- Run #1: ❌ Failed (lint errors)
- Run #2: ❌ Failed (test failures)
- Run #3: ✅ Passed

### Next Steps
1. Request review from team
2. Address any review feedback
3. Merge when approved

**Note:** This PR has NOT been merged. Please review and merge manually.

Important Rules

  1. NEVER merge the PR - only create it and ensure CI passes
  2. NEVER force push unless explicitly asked
  3. NEVER push to main/master directly
  4. Continue fixing until CI passes - don't give up after one failure
  5. Preserve commit history - don't squash unless asked

Error Handling

Authentication issues:

gh auth status

If not authenticated, inform user to run gh auth login.

Branch conflicts:

git fetch origin main
git rebase origin/main
# or
git merge origin/main

Resolve conflicts if any, then continue.

PR already exists:

gh pr view --web

Inform user a PR already exists for this branch.

CI Debugging Tips

Common failures and fixes:

Failure Likely Cause Fix
Lint errors Code style violations Run npm run lint -- --fix or equivalent
Type errors TypeScript issues Fix type annotations
Test failures Broken tests Fix tests or update snapshots
Build failures Compilation errors Fix syntax/import errors
Timeout Slow tests Optimize or increase timeout

Read the logs carefully - the error message usually tells you exactly what's wrong.

You Might Also Like

Related Skills

create-pr

create-pr

170Kdev-devops

Creates GitHub pull requests with properly formatted titles that pass the check-pr-title CI validation. Use when creating PRs, submitting changes for review, or when the user says /pr or asks to create a pull request.

n8n-io avatarn8n-io
받기

Guide for performing Chromium version upgrades in the Electron project. Use when working on the roller/chromium/main branch to fix patch conflicts during `e sync --3`. Covers the patch application workflow, conflict resolution, analyzing upstream Chromium changes, and proper commit formatting for patch fixes.

electron avatarelectron
받기
pr-creator

pr-creator

92Kdev-devops

Use this skill when asked to create a pull request (PR). It ensures all PRs follow the repository's established templates and standards.

google-gemini avatargoogle-gemini
받기
clawdhub

clawdhub

87Kdev-devops

Use the ClawdHub CLI to search, install, update, and publish agent skills from clawdhub.com. Use when you need to fetch new skills on the fly, sync installed skills to latest or a specific version, or publish new/updated skill folders with the npm-installed clawdhub CLI.

moltbot avatarmoltbot
받기
tmux

tmux

87Kdev-devops

Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.

moltbot avatarmoltbot
받기
create-pull-request

create-pull-request

57Kdev-devops

Create a GitHub pull request following project conventions. Use when the user asks to create a PR, submit changes for review, or open a pull request. Handles commit analysis, branch management, and PR creation using the gh CLI tool.

cline avatarcline
받기