update-pr-description

Rewrites GitHub PR descriptions and supplemental comments to match the final branch diff.

Updated Dec 25, 2021
One-click install
npx skills add https://github.com/kotahashihama/dotfiles --skill update-pr-description-kotahashihama
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-pr-description
Source: https://github.com/kotahashihama/dotfiles/tree/main/home/.claude/skills/update-pr-description
Command: npx skills add https://github.com/kotahashihama/dotfiles --skill update-pr-description-kotahashihama

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Pull request descriptions drift out of sync with the actual code as commits accumulate during review, leaving reviewers with stale summaries, outdated supplemental comments, and titles that no longer reflect the final diff. This Skill rewrites the PR body and your own informational comments so they accurately snapshot the final state relative to the base branch. ## Core Features & Use Cases - Diff-driven body rewrite: Computes the diff against the base branch, reads the PR template from the base branch, and rebuilds the description around purpose, chosen approach, resolution, and measurable results. - Supplemental comment maintenance: Finds your own informational comments (API contracts, data models, investigation logs) via the GitHub API, checks them against the latest diff, and patches stale ones while preserving footer notes. - Attachment and consistency safeguards: Counts existing images and videos before editing to avoid deleting others' content, verifies numbers and identifiers against the actual diff in three review passes, and optionally captures screenshots or videos when flagged. - Use Case: After addressing review feedback across several commits, ask the Skill to update the PR; it rewrites the body as a clean final-state snapshot, updates a stale schema comment, and reports exactly what changed. ## Quick Start Update the PR description for my current branch so the body and my supplemental comments match the final diff against the base branch.

Frequently Asked Questions about update-pr-description

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I update a GitHub PR description after review changes?

Run the Skill on the PR's branch; it computes the diff against the base branch with git, rebuilds the body from the base branch's PR template, and pushes the result with gh pr edit. It writes a final-state snapshot rather than a commit-by-commit history.

How do I keep PR comments in sync with code changes?

The Skill lists your own issue comments via gh api, filters to informational ones like API contracts and investigation logs, and checks each against the latest diff. Stale comments are patched in place while preserving their footer note blocks.

Does it work with stacked or multi-branch pull requests?

Yes, because all verification uses explicit git refs like git show and git diff base...HEAD instead of the working tree. This avoids reading the wrong branch when several PRs are stacked in the same repository.

Can it add screenshots or videos to a PR description?

Only when you pass the --screenshot or --video flags, since capturing requires logging into real environments. It verifies rendering stability by comparing two captures and attaches media by uploading first, then embedding the returned URL.

Will editing the PR body delete images others added?

The Skill counts existing attachments such as images and videos before editing and re-fetches the body right before posting. If anything new appeared during editing, it aborts and merges the additions instead of overwriting them.

What are the limitations of automated PR description rewriting?

It only edits PRs and comments authored by you, and it refuses to guess missing Backlog ticket URLs. It also cannot capture screenshots when no capture script or suitable environment access exists, in which case it reports instead of substituting mock imagery.