Skip to content
Skills Library
Programming · Automation

jj-update-pr

/jj-update-pr

Updates existing GitHub pull request descriptions with AI-generated content based on the current diff. Use when the user wants to update a PR description, refresh PR content, or sync PR with latest changes.

Repository
jj-skills ↗
Licence
MIT
Last repository change
27.09.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 27.09.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Updates existing GitHub pull request descriptions with AI-generated content based on the current diff. Use when the user wants to update a PR description, refresh PR content, or sync PR with latest changes.

Original author description

Updates existing GitHub pull request descriptions with AI-generated content based on the current diff. Use when the user wants to update a PR description, refresh PR content, or sync PR with latest changes.

How it works

  1. Permission Requirements
  2. Workflow
  3. Complete Example
  4. When to Use
  5. Error Handling
Original SKILL.md headings · 138 lines, 643 words
SKILL.md preview
---
name: jj-update-pr
description: Updates existing GitHub pull request descriptions with AI-generated content based on the current diff. Use when the user wants to update a PR description, refresh PR content, or sync PR with latest changes.
---

# Update GitHub PR Description

This skill enables updating existing pull request descriptions with fresh AI-generated content based on the current state of the change.

## Permission Requirements

**CRITICAL**: This workflow requires `jj` and `gh` CLI access with authentication. Always use:

```
required_permissions: ["all"]
```

## Workflow

When the user asks to update a PR description (e.g., "update the PR", "refresh PR description", "sync PR with changes"):

### Step 1: Identify the Change

Default to `@-` (parent of working copy) unless the user specifies a different change.

### Step 2: Get the Branch Name

```bash
jj log -r <change> -T 'bookmarks' --no-graph
```

### Step 3: Verify PR Exists

```bash
gh pr view <branch>
```

If no PR exists, suggest using the `jj-create-pr` workflow instead.

### Step 4: Get Updated Title

Extract the first line of the change's description:

```bash
jj log -r <change> -T description --no-graph | head -1
```

If the description is empty, run the **Description Check Protocol** (see `jj-workflow` skill) to generate a conventional commit description from the diff, then re-extract the title:

1. Check `jj status` — if `@` is a placeholder (no modified files), evaluate `@-` carefully: verify it has a non-empty diff AND no trunk bookmarks (`main`, `master`, `main@origin`) before targeting it. If `@-` carries a trunk bookmark, ask the user which change to use.
2. Analyze `jj diff -r <change>` to understand what changed
3. Determine the conventional commit type (feat/fix/refactor/perf/docs/chore/test) from the diff
4. Set the description: `jj describe -r <change> -m "type: concise description"` (or use `--stdin` if preserving an existing body — see jj-workflow protocol)
5. Re-run the title extraction command to get the exact first line

### Step 5: Analyze the Current Diff

```bash
jj diff -r <change>
```

### Step 6: Generate Updated PR Description

Based on the diff, write a fresh PR description:

- **Summary**: One sentence describing the overall change
- **Changes**: Bullet points of key modifications
- Keep it brief and focused on "what" and "why"

Example format:
```markdown
## Summary
Brief description of what this PR accomplishes.

## Changes
- Added X to handle Y
- Refactored Z for better performance
- Fixed bug where A caused B
```

### Step 7: Update the PR

Update both title and body:

```bash
gh pr edit <branch> --title "<new_title>" --body "<new_description>"
```

Or update body only:

```bash
gh pr edit <branch> --body "<new_description>"
```

## Complete Example

User: "Update the PR for @-"

```bash
# 1. Get branch name
jj log -r @- -T 'bookmarks' --no-graph
# Output: "push-abc123"

# 2. Verify PR exists
gh pr view push-abc123
# (shows PR details)

# 3. Get updated title (generates one from diff if description is empty — see Step 4)
jj log -r @- -T description --no-graph | head -1
# Output: "feat: add user authentication"
# If empty: run the Description Check Protocol to generate one, then re-extract

# 4. Get current diff
jj diff -r @-
# (analyze the output)

# 5. Update PR with new description
gh pr edit push-abc123 \
  --title "feat: add user authentication" \
  --body "## Summary
Adds JWT-based user authentication to the API.

## Changes
- Added auth middleware for token validation
- Created login and register endpoints
- Added user model with password hashing
- Updated API documentation"
```

## When to Use

- After making additional changes to a commit that already has a PR
- When the original PR description is outdated or incomplete
- After rebasing or squashing changes
- When the user asks to "refresh" or "update" the PR

## Error Handling

- If no bookmark/branch exists on the change, the PR may not be findable—ask user for PR number
- If PR doesn't exist, suggest creating one with `jj-create-pr` workflow
- If update fails, show the error and suggest checking PR status with `gh pr view`

Versions

The database has no other skills named jj-update-pr.

Database snapshot: 13.11.2026 · package version 87555aa5348f (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90pr-description
    Drafts pull request title and body from validated diff and opens or updates PR via GitHub MCP. Triggers when a change is ready to open or update a PR.
  • 100update-pr
    Update an existing pull request with new changes. Use when the user wants to update a PR, push follow-up changes to a PR, refresh a PR description, or sync a PR with latest commits. Triggers on: update pr, update-pr, update the pr, push to pr, refresh pr, sync pr, update pull request.
  • 100pr
    Pull request descriptions. Use when writing the description of a pull request or merge request.
  • 100update-pull-request
    Update an existing pull request's title and description to accurately reflect the implemented changes. Use this skill when asked to update, refresh, or rewrite a PR title or description, sync a PR with the latest changes, or when the PR description no longer matches the implementation.
  • 100pr-description
    Drafts clear pull request descriptions from a diff and repository context. Use when the user asks to write or improve a pull request description.
  • 100pr
    Use when drafting a pull request description from the current branch's diff, optionally creating the PR with gh.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.