Agent skill

Process PR

by aaddrick in aaddrick/claude-pipeline

Process PR based on code review - if approved, create follow-up issues, merge, close; if changes requested, re-run implement-issue

MITAuto-check passedDevelopment

Install Process PR

skills CLI
$ npx skills add aaddrick/claude-pipeline --skill process-pr -a claude-code

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

GitHub CLI
$ gh skill install aaddrick/claude-pipeline process-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/aaddrick/claude-pipeline.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/process-pr .claude/skills/process-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
process-pr
GitHub stars
130
Token cost
~2.7k tokens
SKILL.md length
639 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Process PR based on code review - if approved, create follow-up issues, merge, close; if changes requested, re-run implement-issue

  • Works in 4 steps: Validate Inputs → Fetch PR & Comments → Parse Review Status from Comments → …
  • Development work in your project
  • SKILL.md covers Process, If Approved: Merge Path, If Changes Requested:… and Output, plus 4 more sections
  • Calls gh, git and claude

What it does

Process PR is an agent skill from aaddrick/claude-pipeline. Process PR based on code review - if approved, create follow-up issues, merge, close; if changes requested, re-run implement-issue

Its SKILL.md is about 2.7k 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. The repository describes itself as: Portable Claude Code multi-agent pipeline - skills, agents, hooks, orchestration scripts, and quality gates. The licence is MIT.

When your agent uses it

  • Development work in your project

Example prompts

  • “/process-pr”

Workflow steps

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

  1. Validate Inputs
  2. Fetch PR & Comments
  3. Parse Review Status from Comments
  4. Re-run implement-issue

What it can do on your machine

Read from SKILL.md and the folder at commit 402eac7. 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:

    • gh
    • git
    • claude

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

  • Network

    No URLs in SKILL.md. Its commands use gh and git, 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

Process PR loads about 2.7k tokens when it runs. Until then it costs about 35 tokens; SKILL.md has 639 words of instructions outside code blocks.

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

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 passed

The automated check found no risky patterns in SKILL.md.

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 aaddrick/claude-pipeline at commit 402eac7, republished under its MIT licence (© aaddrick). 639 words, ~2,739 tokens.

Download SKILL.mdSave it as .claude/skills/process-pr/SKILL.md (or your agent's skills folder).
name
process-pr
description
Process PR based on code review - if approved, create follow-up issues, merge, close; if changes requested, re-run implement-issue
argument-hint
<pr_number> <issue_number> <base_branch>

Process PR

Read PR review comments and act accordingly: if approved, create follow-up issues and merge; if changes requested, re-run implementation.

Announce at start: "Using process-pr to process PR #$1 for issue #$2"

Arguments:

  • $1 — PR number (required)
  • $2 — Issue number that the PR addresses (required)
  • $3 — Base branch for re-implementation if needed (required)

Examples:

  • /process-pr 142 130 aw-next
  • /process-pr 456 123 main

Process

dot
digraph process_pr {
    rankdir=TB;
    node [shape=box];

    validate [label="1. Validate inputs"];
    fetch [label="2. Fetch PR & review comments"];
    check [label="3. Check review status"];

    approved [label="Approved path"];
    changes [label="Changes requested path"];

    merge [label="4a. Squash merge PR"];
    comment [label="4b. Comment on issue"];
    close [label="4c. Close issue"];
    delete [label="4d. Delete branch"];
    parse [label="4e. Parse comments for follow-ups"];
    create_issues [label="4f. Create follow-up issues"];

    rerun [label="5. Re-run /implement-issue"];

    output_success [label="Output: Success summary"];
    output_rerun [label="Output: Re-implementation started"];

    validate -> fetch -> check;
    check -> approved [label="approved"];
    check -> changes [label="changes requested"];

    approved -> merge -> comment -> close -> delete -> parse -> create_issues -> output_success;
    changes -> rerun -> output_rerun;
}

Why merge first: Follow-up issues should only be created if the merge succeeds. Creating issues before merge can leave orphaned issues if merge fails (conflict, permissions, etc.). Merging first ensures we only create follow-ups for work that actually landed.

Step 1: Validate Inputs
bash
# Verify PR exists and is open
gh pr view $PR_NUMBER --json state,number,title,headRefName,reviews

# Verify issue exists and is open
gh issue view $ISSUE_NUMBER --json state,number,title

If validation fails: Stop and report error.

Step 2: Fetch PR & Comments
bash
# Get PR with comments
gh pr view $PR_NUMBER --json number,title,state,headRefName,comments

# Also get the full PR view with comments for parsing
gh pr view $PR_NUMBER --repo OWNER/REPO --comments

Extract:

  • All PR comments (for review status and follow-up issue extraction)
  • PR metadata (title, branch, state)
Step 3: Parse Review Status from Comments

IMPORTANT: Review status is embedded in PR comments by the implement-issue skill. Use this explicit algorithm:

Step 3a: Fetch all PR comments

bash
# Get comments as JSON array
COMMENTS=$(gh pr view $PR_NUMBER --json comments --jq '.comments[].body')

Step 3b: Extract status from comments (most recent wins)

bash
# Parse status using explicit algorithm
parse_review_status() {
    local comments="$1"
    local status=""

    # Process comments in order (last one wins)
    while IFS= read -r comment; do
        # Check for markdown bold format first (preferred)
        if echo "$comment" | grep -q '\*\*Status: APPROVED\*\*'; then
            status="APPROVED"
        elif echo "$comment" | grep -q '\*\*Status: CHANGES_REQUESTED\*\*'; then
            status="CHANGES_REQUESTED"
        # Fallback to plain text format
        elif echo "$comment" | grep -q 'Status: APPROVED'; then
            status="APPROVED"
        elif echo "$comment" | grep -q 'Status: CHANGES_REQUESTED'; then
            status="CHANGES_REQUESTED"
        fi
    done <<< "$comments"

    echo "$status"
}

REVIEW_STATUS=$(parse_review_status "$COMMENTS")

Step 3c: Validate status

bash
if [ -z "$REVIEW_STATUS" ]; then
    echo "ERROR: No review status found in PR #$PR_NUMBER comments"
    echo "Expected: Comment containing '**Status: APPROVED**' or '**Status: CHANGES_REQUESTED**'"
    exit 1
fi

echo "Review status: $REVIEW_STATUS"

Status priority:

  1. **Status: APPROVED** (markdown bold - preferred)
  2. **Status: CHANGES_REQUESTED** (markdown bold - preferred)
  3. Status: APPROVED (plain text - fallback)
  4. Status: CHANGES_REQUESTED (plain text - fallback)

Multiple reviews: The algorithm processes comments in chronological order. The LAST status found wins, representing the most recent review.


If Approved: Merge Path

Step 4a: Squash Merge PR
bash
gh pr merge $PR_NUMBER \
  --squash \
  --delete-branch

If merge fails:

  • Log error with reason
  • Stop - do not proceed to close issue or create follow-ups
  • Return failure status
Step 4b: Comment on Issue
bash
gh issue comment $ISSUE_NUMBER --body "$(cat <<'EOF'
## Completed

Resolved via PR #$PR_NUMBER (squash merged).

### Follow-up issues created:
- #XXX - Description
- #YYY - Description

(Or "No follow-up issues needed.")
EOF
)"
Step 4c: Close Issue
bash
gh issue close $ISSUE_NUMBER

Verify closure:

bash
gh issue view $ISSUE_NUMBER --json state
Step 4d: Delete Branch

The --delete-branch flag handles this. Verify:

bash
git ls-remote --heads origin $BRANCH_NAME

If still exists:

bash
git push origin --delete $BRANCH_NAME
Step 4e: Parse Comments for Follow-up Issues

Scan all review comments for indicators of follow-up work:

Trigger phrases:

  • "create issue for..."
  • "follow-up needed:"
  • "out of scope but should..."
  • "technical debt:"
  • "future improvement:"
  • "TODO:" (in comments, not code)
  • "nice to have:"
  • "consider adding:"

Extract for each:

  • Title (short description)
  • Body (full context from comment)
  • Labels (inferred: bug, enhancement, tech-debt)
Step 4f: Create Follow-up Issues

For each extracted issue:

bash
gh issue create \
  --repo OWNER/REPO \
  --title "$ISSUE_TITLE" \
  --body "$(cat <<'EOF'
## Context
Created from code review of PR #$PR_NUMBER (Issue #$ISSUE_NUMBER)

## Description
$EXTRACTED_DESCRIPTION

## References
- Parent Issue: #$ISSUE_NUMBER
- PR: #$PR_NUMBER
- Reviewer: @$REVIEWER
EOF
)" \
  --label "$LABELS"

Log each: Created follow-up issue #XXX: "$TITLE"


If Changes Requested: Re-implementation Path

Step 5: Re-run implement-issue

When the code reviewer requests changes, spawn a new implementation session:

bash
claude --dangerously-skip-permissions \
  --print \
  "/implement-issue $ISSUE_NUMBER $BASE_BRANCH" \
  2>&1 | tee -a logs/process-pr-rerun-$(date +%Y%m%d-%H%M%S).log

Notes:

  • The implement-issue skill will:
    • Read the existing PR and review comments
    • Address the requested changes
    • Push to the same branch (updating the PR)
    • Run code review again
  • After implement-issue completes, call /process-pr again to check the new review

Log:

Changes requested on PR #$PR_NUMBER. Re-running implementation for issue #$ISSUE_NUMBER...

Show full SKILL.md (230 more words)Show less

Output

Success (Approved & Merged)
## Process PR Complete

**PR:** #$PR_NUMBER
**Issue:** #$ISSUE_NUMBER
**Status:** ✅ Merged

### Actions Taken
- [x] Review status: APPROVED
- [x] Created N follow-up issues
- [x] PR squash merged
- [x] Issue #$ISSUE_NUMBER closed
- [x] Branch deleted

### Follow-up Issues Created
| Issue | Title | Labels |
|-------|-------|--------|
| #XXX | Description | enhancement |
Re-implementation (Changes Requested)
## Process PR: Changes Requested

**PR:** #$PR_NUMBER
**Issue:** #$ISSUE_NUMBER
**Status:** 🔄 Re-implementing

### Review Feedback
$REVIEW_COMMENTS_SUMMARY

### Action
Re-running /implement-issue $ISSUE_NUMBER $BASE_BRANCH to address requested changes.

Error Handling

Failure PointAction
Validation failsStop, report error
No review status in commentsStop, report - need code review comment with Status line first
Issue creation failsLog warning, continue
Merge failsStop, return failure, do NOT close issue
Issue close failsLog warning (merge succeeded)
Branch delete failsLog warning (best-effort)
Re-implementation failsLog error, include in output

Integration

Called by:

  • handle-issues skill (after implement-issue creates PR)
  • User directly via /process-pr <pr> <issue> <branch>

Calls:

  • /implement-issue (when changes requested)

Requires:

  • gh CLI authenticated
  • PR must exist with a code review comment containing **Status: APPROVED** or **Status: CHANGES_REQUESTED**
  • Issue must exist and be open

Example Sessions

Approved PR
User: /process-pr 142 130 aw-next

Claude: Using process-pr to process PR #142 for issue #130

Validating... PR #142 open, Issue #130 open
Parsing comments... Status: APPROVED, 1 follow-up found
Creating issue #145: "Add rate limiting to auth endpoint"
Merging PR #142... Squash merge successful
Closing issue #130... done
Deleting branch issue-130-auth-redirect... done

## Process PR Complete
PR: #142 | Issue: #130 | Status: Merged
Follow-up: #145 - Add rate limiting to auth endpoint
Changes Requested
User: /process-pr 142 130 aw-next

Claude: Using process-pr to process PR #142 for issue #130

Validating... PR #142 open, Issue #130 open
Parsing comments... Status: CHANGES_REQUESTED
Feedback: "Need to handle edge case when session expires"

Re-running /implement-issue 130 aw-next...
[spawns headless session]

Machine-Readable Result Output

When invoked via batch-orchestrator.sh with --json-schema, this skill's output is parsed for structured data. To ensure reliable extraction, always end your execution with a clear result statement.

Final Result Output

At the very end of execution, output a clear status summary. This helps --json-schema reliably extract the structured output.

On successful merge:

## Result

Status: merged
Follow-up issues: #145, #146

On merge with no follow-ups:

## Result

Status: merged
Follow-up issues: none

On changes requested:

## Result

Status: changes_requested

On error:

## Result

Status: error
Error: Merge failed - conflict with base branch

On rate limit:

## Result

Status: rate_limit
Error: GitHub API rate limit exceeded
Result Schema

The batch-orchestrator.sh uses this JSON schema to extract results:

json
{
  "type": "object",
  "properties": {
    "status": {"enum": ["merged", "changes_requested", "error", "rate_limit"]},
    "follow_up_issues": {"type": "array", "items": {"type": "integer"}},
    "error": {"type": "string"}
  },
  "required": ["status"]
}

Important: The final result section must be the last significant output. The --json-schema flag asks Claude to summarize the execution according to this schema, so ending with a clear status makes extraction reliable.

© aaddrick, MIT. 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 .claude/skills/process-pr of aaddrick/claude-pipeline.

Open the folder on GitHubat commit 402eac7

Compare with similar skills

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

Process PR compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Process PR this skillaaddrick/claude-pipeline130—~2.7kAutomated safety check: PassMIT
Vercel Composition Patternssupabase/supabase111k59 repos~726Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 59 repos~726 tokens
    DevelopmentAuto-check passed
  • 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
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed

More from aaddrick/claude-pipeline

All 12 skills in this repo
  • Writing Agents

    aaddrick/claude-pipeline

    A skill your agent uses when creating new agents, editing existing agents, or defining specialized subagent roles for the Task tool

    130 GitHub starsUsed in 1 repo~3.3k tokens
    Auto-check passed
  • Adapting Claude Pipeline

    aaddrick/claude-pipeline

    A skill your agent uses when adapting the generic .claude pipeline folder to a specific codebase - adjusting skills, agents, hooks, scripts, prompts, and settings for the target project's tech stack…

    130 GitHub stars~2.8k tokensUpdated 7 mo ago
    Auto-check passed
  • A skill your agent uses when asked to create user stories from a codebase, document existing features as stories, or reverse-engineer requirements from code

    130 GitHub stars~2.2k tokensUpdated 7 mo ago
    Auto-check passed
  • Review UI

    aaddrick/claude-pipeline

    Comprehensive UI/CSS review using parallel agents. An agent skill from aaddrick/claude-pipeline.

    130 GitHub stars~2.5k tokensUpdated 7 mo ago
    Auto-check passed
  • Using Git Worktrees

    aaddrick/claude-pipeline

    A skill your agent uses when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees in .worktrees/

    130 GitHub stars~1.3k tokensUpdated 7 mo ago
    Auto-check passed
  • Implement Issue

    aaddrick/claude-pipeline

    A skill your agent uses when given a GitHub issue number and base branch to implement end-to-end

    130 GitHub starsUsed in 1 repo~889 tokens
    Auto-check passed

Categories

Questions about Process PR

What does Process PR do?

Process PR based on code review - if approved, create follow-up issues, merge, close; if changes requested, re-run implement-issue. Process PR is an agent skill from aaddrick/claude-pipeline.

When should I use Process PR?

Process PR fits situations like: development work in your project.

How do I install Process PR in Claude Code?

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

How do I install Process PR in Codex?

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

Can I use Process 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 aaddrick/claude-pipeline --skill process-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/process-pr, .gemini/skills/process-pr, .github/skills/process-pr and .opencode/skills/process-pr in your project.

What does Process PR need to run?

Going by SKILL.md and its folder, Process PR needs the command-line tools its instructions call (gh, git and claude).

Does Process PR access the network?

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

Is Process PR safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Process PR use?

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

How many tokens does Process PR use?

About 2.7k tokens (SKILL.md is roughly 11k 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 Process PR?

Skills that share tags, products or a category with Process PR: Vercel Composition Patterns (supabase/supabase, 111k stars), Finishing a Development Branch (obra/superpowers, 296k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and PR Babysitter (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Process PR?

aaddrick (a GitHub user) maintains it in aaddrick/claude-pipeline, which has 130 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on February 25, 2026.

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