Pr revise

From Takazudo/claude-resources · View interactive version

Pr revise is an AI agent skill from the GitHub repository Takazudo/claude-resources. Update an existing PR's title and description to match the full implementation. Use for 'revise pr', 'update pr description', or when later work made the PR text stale.

How to use this skill

Skill file

PR Revise

Update an existing PR's title and description to accurately reflect the full implementation, not just the original scope.

Prerequisites

Step 1: Gather PR and Branch Context

# Get current branch
BRANCH=$(git branch --show-current)

# Fetch latest
git fetch origin

# Get PR details
gh pr view "$BRANCH" --json number,title,body,baseRefName,headRefName

Record the PR number, current title, current body, and base branch.

Step 2: Analyze Full Implementation

Review ALL changes in the PR — not just recent commits:

BASE_BRANCH=<baseRefName from step 1>

# All commits in the PR
git log "origin/$BASE_BRANCH".."$BRANCH" --oneline

# Full diff stat
git diff "origin/$BASE_BRANCH"..."$BRANCH" --stat

# Full diff for understanding
git diff "origin/$BASE_BRANCH"..."$BRANCH"

Read the diff carefully. Understand:

Step 3: Draft New Title and Description

Based on the full diff analysis:

Title: Write a concise PR title (under 70 chars) that captures the overall scope. If the PR covers multiple concerns, summarize the primary theme.

Description: Write a comprehensive PR body using this format:

## Summary
<2-4 bullet points covering the main changes>

## Changes
<Detailed list of what was done, grouped by category if needed>

## Test Plan
<How to verify the changes work correctly>

If the original body contained issue references (e.g., Closes #123, Fixes #456), preserve them in the new body.

Step 4: Show the User What Will Change

Present the proposed updates clearly:

Current title: <old title>
New title:     <new title>

Current body:
<old body>

New body:
<new body>

Ask the user to confirm before applying.

Step 5: Apply Updates

PR_NUMBER=<number from step 1>

# Update title
gh pr edit "$PR_NUMBER" --title "<new title>"

# Update body
gh pr edit "$PR_NUMBER" --body "$(cat <<'EOF'
<new body content>
EOF
)"

Report the updated PR URL when done.

Important Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.