/jj:jj-create-prfrom jj
Creates GitHub pull requests from Jujutsu changes with AI-generated descriptions. Useful for pushing changes for review or opening a PR from jj.
Ships in jj. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill enables creating GitHub pull requests from jj changes with automatically generated PR descriptions based on the diff.
CRITICAL: This workflow requires jj and gh CLI access with authentication. Always use:
required_permissions: ["all"]
When the user asks to create a PR (e.g., "create a PR", "push for review", "open PR for @-"):
Default to @- (parent of working copy) unless the user specifies a different change.
# Get the change ID being pushed
jj log -r <change> --no-graph -T 'change_id ++ "\n"' | head -1
Extract the first line of the change's description:
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:
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.jj diff -r <change> to understand what changedjj describe -r <change> -m "type: concise description" (or use --stdin if preserving an existing body — see jj-workflow protocol)Get the diff to understand what changed:
jj diff -r <change>
Based on the diff, write a concise PR description:
Example format:
## 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
First check if the change already has a named bookmark:
jj log -r <change> -T 'bookmarks' --no-graph
If no bookmark exists, create one by slugifying the change description (e.g. "feat: add auth" → feat-add-auth):
jj bookmark create <slug> -r <change>
jj git push --bookmark <slug>
Fallback — let jj auto-create a push-<hash> bookmark:
jj git push -c <change>
Parse the branch name from output. Look for patterns:
Creating bookmark <branch> or Add bookmark <branch>Move sideways bookmark <branch> fromgh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
Fallback to main if unavailable.
gh pr create \
--base <default_branch> \
--head <branch_name> \
--title "<pr_title>" \
--body "<generated_description>" \
--assignee @me
User: "Create a PR for @-"
# 1. Get title (generates one from diff if description is empty — see Step 2)
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
# 2. Get diff
jj diff -r @-
# (analyze the output)
# 3. Check for existing bookmark, create one if missing
jj log -r @- -T 'bookmarks' --no-graph
# Output: (empty — no bookmark yet)
jj bookmark create feat-add-user-authentication -r @-
jj git push --bookmark feat-add-user-authentication
# Output: "Add bookmark feat-add-user-authentication..."
# 4. Get default branch
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
# Output: "main"
# 5. Create PR with generated description
gh pr create \
--base main \
--head feat-add-user-authentication \
--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" \
--assignee @me
When generating the description:
gh pr view to see existing PRWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub hotthoughts/jj-skills --plugin jj5 skills in this plugin
/jj-cleanupRemoves the local jj bookmarks, revisions, and workspaces left behind by merged or closed GitHub pull requests, using the jj-cleanup binary through the `jj cleanup` / `jj cl` aliases. Use after a PR or stack merges or closes, when pruning stale bookmarks or workspaces, when `jj log` is cluttered with finished work, or when asked what is safe to delete locally. Also use to install jj-cleanup and its aliases when they are missing./jj-gh-stackManages GitHub stacked PRs from a Jujutsu (jj) repository with the gh stack CLI. Use when creating, growing, updating, unstacking, or merging a stack of pull requests in a jj repo, when a jj bookmark backs a stacked PR layer, or when gh-stack's git-oriented workflow (init/add/checkout/up/down/rebase/sync) would touch a jj repo. Replaces the local-tracking loop in the gh-stack skill with jj bookmarks plus jj git push plus gh stack link./jj-update-prUpdates 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./jj-workflowGuides Claude on using Jujutsu (jj) version control system. Use when working with jj repositories, making commits, syncing changes, or managing version control workflows.Other plugins' skills for the same job