Skip to content
Back to skills

Pr

ASecurity

Create a draft or ready pull request with gh for a jj revision — pushes the bookmark, reviews the full changeset, and drafts a title and body explaining why the change was made. Use when asked to open a PR.

  • 10 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 1, 2026
code-qualitygobashrefactoringgit

Works with

  • claude code
  • cli

Security analysis

A100/100

Scanned October 1, 2026

npx -y skills add martinemde/dotfiles --skill pr --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pr?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pr
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/martinemde-dotfiles/badge)](https://www.skillsdirectory.com/skills/martinemde-dotfiles)

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

Download with Pro
SKILL.md
---
name: pr
description: Create a draft or ready pull request with gh for a jj revision — pushes the bookmark, reviews the full changeset, and drafts a title and body explaining why the change was made. Use when asked to open a PR.
argument-hint: '[revision] [ready]'
---

# Create Pull Request

- `/pr` — draft PR for the current diff from trunk
- `/pr [revision]` — draft PR for that revision
- `/pr [revision] ready` — ready for review rather than draft

## Push and get the bookmark

The command depends on what the revision already has:

```bash
jj git push --bookmark <name>                                     # remote-tracked bookmark
jj bookmark track <name>@origin && jj git push --bookmark <name>  # local-only bookmark
jj git push -c <revision>                                         # no bookmark: creates one
```

Take the bookmark name from the output.

## Review the whole changeset

```bash
jj log -r 'trunk()..<bookmark>'                 # commits going in
jj diff --from trunk() --to <bookmark> --stat    # everything changing
```

A PR is easier to review as several focused commits than one large one. If the changeset is mixed,
reorganize with `jj split` or `jj squash` before opening it.

Check `.github/` for a PR template and follow it if one exists.

## Draft the title and body

The title summarizes the whole changeset, not just the most recent commit.

The body explains why the change was made and what it affects — context and motivation, not
implementation. Don't restate what the diff already shows: "added function X" and "modified file
Y" earn their place only when the reasoning behind them isn't obvious. Cover user-facing impact,
architectural decisions, and trade-offs, following whatever conventions the repository already
uses.

Two skills help here when they're available in the session. Invoke
`elements-of-style:writing-clearly-and-concisely` before drafting prose. Search
`episodic-memory:search` for conversations touching the changed files, looking for design
decisions and their rationale, alternatives that were considered and rejected, trade-offs, and
constraints that shaped the solution — surface what you find as a "Design Decisions" section.

Attribution gets an "Assisted-by" footer, not a "Generated with Claude Code" one.

## Self-review before opening

Read the changes as a reviewer would: code smells, missing tests for new behavior, repetition that
wants refactoring, modules that grew too long or too undocumented. Report what you find and
address it before opening the PR rather than after.

## Open it

```bash
gh pr create --head <bookmark-name> --title "<title>"   # body via heredoc; --draft unless `ready`
```

If the workspace name or bookmark contains a Jira key (`PROJ-123`, e.g. `LDE-488`), move the card:
`acli jira workitem transition --key <KEY> --status "In Review"`. No key, no step — skip it
silently.

Return the PR URL.

Attribution

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

Loading comments…