Claude
Skills
Sign in
Back

pr-desc

Included with Lifetime
$97 forever

Update PR description from current branch context

Generalscripts

What this skill does


# Update PR Description

## Script Location

**Scripts live next to this SKILL.md, not in the user's project.** Before
running any script, determine the directory containing this SKILL.md file. Use
that absolute path as `{SKILL_DIR}` when constructing script paths below.

!read references/usage.md

## Arguments

This skill accepts an optional argument with additional instructions for the
description.

**Example:** `/flow:pr-desc include a ## Usage section showing how to use each skill`

If provided, incorporate these instructions into the description format below.

## Gather Context

Run the gather script, passing the user's project directory with `-C`:

```bash
python {SKILL_DIR}/scripts/gather_context.py -C <user-project-directory>
```

## Preconditions

Check these in the JSON output BEFORE proceeding:

1. **PR must exist**: If `pr_number` is null, STOP and say: "Error: No PR exists
   for this branch. Use /flow:pr-create to create one first."

## Execution

Update the PR body:

```bash
python {SKILL_DIR}/scripts/update_description.py -C <user-project-directory> --body "<new body>"
```

## Body Format

Use this structure as a base:

```
## Summary

- <bullet 1: main change, start with verb>
- <bullet 2: supporting change or context>
- <optional bullet 3-4 if needed>
```

**If user provided additional instructions**, add the requested sections
after ## Summary.

Rules:

- 2-4 bullets only
- Each bullet starts with a verb (Add, Fix, Update, Remove, etc.)
- Focus on WHAT and WHY, not HOW
- No file paths unless the file itself is the feature
- No implementation details
- Derive content from commits and diff, not the old body
- If user requested additional sections, add them after Summary
- User instructions override the default format when they conflict
- Do not include any watermark, attribution, or "Generated by" text

## Output

After updating, output:

```
Updated PR #<number> description
<url>
```
Files: 4
Size: 7.6 KB
Complexity: 41/100
Category: General

Related in General