draft-pr

Create draft PRs for JJ or Git repositories using gh CLI.

1|2|Updated Jan 13, 2026
One-click install
npx skills add https://github.com/jorgeavaldez/pi-config --skill draft-pr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: draft-pr
Source: https://github.com/jorgeavaldez/pi-config/tree/main/skills/draft-pr
Command: npx skills add https://github.com/jorgeavaldez/pi-config --skill draft-pr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Draft PRs across JJ/Jujutsu and Git repositories enable early feedback and consistent review, but they can be error-prone when head/base conventions differ or when workflows aren’t enforced.

Core Features & Use Cases

  • Detect repository type: JJ (Jujutsu) vs Git and apply the correct --head rule for each.
  • Base branch selection: Automatically determine base branch (main or master) with a safe fallback.
  • Draft PR creation: Create the draft PR using gh pr create --draft --head and --base, and report the PR URL.
  • Use Case: When you want to open a draft PR from the current branch or bookmark to gather early feedback.

Quick Start

Open a draft PR for the current JJ bookmark or Git branch using the correct head and base settings.

Frequently Asked Questions about draft-pr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I open a draft pull request from a Jujutsu bookmark or git branch?

To open a draft pull request, the skill detects whether your repository uses Jujutsu or git, selects the correct base branch, and runs gh pr create --draft --head to generate the PR URL.

What is the best way to create a draft PR across different version control systems?

Creating a draft PR across different VCS environments is handled by detecting the system type, applying the correct --head rule, and ensuring the branch is synchronized with the remote before opening the PR.

Do I need the GitHub CLI installed to automate draft pull request creation?

Yes, you need the GitHub CLI installed and authenticated, as the skill requires gh CLI to execute gh pr create --draft --head and synchronize the branch with the remote.

How does base branch selection work when opening a draft PR on main or master?

Base branch selection works by automatically determining whether main or master is the appropriate base, applying a safe fallback to ensure the draft PR targets the correct branch.

Why does my draft PR creation fail when the local branch is not synchronized?

Draft PR creation requires the branch to be synchronized with the remote; the skill ensures this synchronization occurs before opening the PR to prevent head/base convention errors.