Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Update Pr Description

ASecurity

Update an existing PR description with the minimum changes needed to keep it accurate after new commits have been added.

10 stars
0 votes
0 copies
0 views
Added 10/6/2026
toolsgotestinggit

Works with

cli

Security Analysis

A100/100

Scanned 10/6/2026

$npx -y skills add tomzx/agents --skill update-pr-description --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Update Pr Description?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Update Pr Description
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tomzx-update-pr-description/badge)](https://www.skillsdirectory.com/skills/tomzx-update-pr-description)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: update-pr-description
description: Update an existing PR description with the minimum changes needed to keep it accurate after new commits have been added.
argument-hint: "[repository] [issue]"
---

# Update PR Description

Reads the current PR description, computes what has changed since it was written, and produces the smallest accurate update -- preserving all sections that are still correct and editing only what the new commits have changed or added.

## Prerequisites

- `gt` (Graphite CLI) installed and authenticated in a git repository
- `gh` CLI authenticated
- `ghx` CLI authenticated
- An open PR for the current branch with an existing description

### Skill attribution (GitHub)

Before returning the updated description, read [`github-post-attribution/SKILL.md`](../github-post-attribution/SKILL.md) and append the **Generated with** footer for `SKILL_DIR` = `update-pr-description`.

### Communication guidelines (outbound text)

Before composing any text posted or drafted on the user's behalf, apply [`communication-guidelines/SKILL.md`](../communication-guidelines/SKILL.md).

## Workflow

```
Fetch existing PR description (gh pr view)
        |
        v
Compute full diff (gt parent -> HEAD)
        |
        v
Identify new commits since description was last written
        |
        v
Issue provided? ($1 $2)
   /         \
 Yes           No
  |             |
  v             v
Fetch issue   Skip issue
details       lookup
  |             |
  v             |
Re-assess       |
acceptance      |
criteria        |
  |             |
  +------+------+
         |
         v
Diff description vs new reality -- find minimum changes
         |
         v
Produce updated PR description markdown
```

## Steps

1. Fetch the existing PR description:
   ```
   gh pr view --json body --jq '.body'
   ```

2. Compute the full diff of the branch:
   ```
   git diff $(gt parent)..HEAD
   ```

3. List commits on the branch to understand what is new relative to the existing description:
   ```
   git log $(gt parent)..HEAD --oneline
   ```

4. If `$1` (repository) and `$2` (issue number) are provided, fetch the issue:
   ```
   ghx issue view $2 --repo $1
   ```

5. Compare the existing description against the current diff and commit list. For each section of the existing description, decide:
   - **Keep as-is** -- the section is still accurate and complete.
   - **Edit minimally** -- only the parts that are now inaccurate or incomplete; do not rewrite prose that is still correct.
   - **Add** -- new information required by the new commits (e.g. a new "What" bullet, an additional test step).
   - **Remove** -- anything that described work that was reverted or superseded.

   Bias strongly toward keeping existing text. Only change what the new commits have made inaccurate or incomplete.

6. Resolve agents attribution per [`github-post-attribution/SKILL.md`](../github-post-attribution/SKILL.md): compute `SKILL_COMMIT`, `SKILL_SHORT_SHA`, `SKILL_FILE_URL`, and `{BASE}` for `SKILL_DIR` = `update-pr-description`.

7. Produce the updated description following the output format below, substituting the resolved `SKILL_FILE_URL` and `SKILL_SHORT_SHA` into the footer.

8. Return the result inside a markdown code block with each sentence on its own line. Do not line wrap the description; each paragraph/bullet should be a single long line.

## Output Format

The output must follow the same structure as the existing PR description. Do not add or remove sections unless the new commits require it.

```markdown
# What

<present-tense summary of changes; bullet points where appropriate>

# Why

<reason for the changes>

# How to test

<testing steps>

# Acceptance criteria covered

<which criteria from the issue are addressed>

# References

- https://github.com/$1/issues/$2

---
Updated with [update-pr-description](SKILL_FILE_URL) (`SKILL_SHORT_SHA`)
```

Substitute `SKILL_FILE_URL` and `SKILL_SHORT_SHA` per [`github-post-attribution/SKILL.md`](../github-post-attribution/SKILL.md).

If the existing description already has a `Generated with` or `Updated with` footer, replace it with the new `Updated with` line.

## Minimum-change principle

The goal is accuracy with the least disruption to the existing description:

- Do not rewrite sections that are still correct, even if you would phrase them differently.
- When adding a bullet, append it to the existing list rather than restructuring the list.
- When a test step changes, edit only that step.
- When acceptance criteria coverage changes, update only the affected items.
- If nothing has changed in a section, emit it verbatim.

## Example Usage

**Scenario 1: A few follow-up commits added**
```
/update-pr-description
```
Fetches the existing PR description, diffs it against the current branch state, adds the new bullet points to "What" and any new test steps to "How to test", leaves the rest unchanged.

**Scenario 2: PR linked to an issue with new criteria covered**
```
/update-pr-description owner/myrepo 42
```
Fetches issue #42 and re-assesses acceptance criteria. Adds newly covered items to "Acceptance criteria covered" without touching the rest of the section.

**Scenario 3: A commit reverted earlier work**
```
/update-pr-description
```
Removes the bullet in "What" that described the reverted change and drops the corresponding test step.

## Useful Commands Reference

| Command | Description |
|---|---|
| `gh pr view --json body --jq '.body'` | Fetch the current PR description |
| `git diff $(gt parent)..HEAD` | Diff current branch against its Graphite parent |
| `git log $(gt parent)..HEAD --oneline` | List commits on the branch |
| `ghx issue view <issue> --repo <owner/repo>` | Fetch issue details via ghx CLI |

Attribution

tomzxtomzx
View sourceSee grades on GitHubMore from tomzx →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

ucoz-landing-skill

Create and edit uCoz homepage landing pages via MCP: custom templates, hero sections, lead forms, navigation menus, SEO, and responsive layout. Includes a visual design system (style selection, layout/grid, section recipes, typography/spacing, color tokens, component states, icons, modern CSS/JS, motion, imagery, social proof, copy/voice, accessibility). Uses ucoz-mcp tools for templates, site file uploads, and site modules.

107 votes

Paperclip

Interact with the Paperclip control plane API for task coordination and governance. Use when checking assignments, updating issue status, posting comments, delegating work, managing routines, or calling Paperclip API endpoints.

953191 votes

Pptx

Presentation toolkit (.pptx). Create/edit slides, layouts, content, speaker notes, comments, for programmatic presentation creation and modification.

471861 votes

Daw Music

Digital Audio Workstation usage, music composition, interactive music systems, and game audio implementation for immersive soundscapes.

761 votes

Instantly Rdsthomas Mission Control

Instantly.ai cold email outreach API - manage campaigns, leads, accounts, and analytics. Use for cold email automation, lead management, campaign creation/monitoring, and email account warmup.

761 votes
View all in tools →