draft-pull-request
Draft pull requests with structured descriptions using gh CLI
Skill by jellydn
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/jellydn-draft-pull-request
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/draft-pull-request
What's inside
- Skill name
draft-pull-request- Description
- Draft pull requests with structured descriptions using gh CLI
- License
- MIT
- Compatibility
- cline, claude, opencode, amp, codex, gemini, cursor, pi
- Metadata
- audience: all · workflow: git
- Instructions
- 150 lines in SKILL.md · view on GitHub
Files (3)
- SKILL.md
- change-outline.md · references/
- pr-body-template.md · references/
SKILL.md (first lines)
# Draft Pull Request
Create a draft pull request, or update the current branch's PR, with a **What / Why / How** description. The
description must let a reviewer understand why the change exists and the shape of the implementation without reading
every line of the diff.
## Usage
```bash
/draft-pull-request [title]
```
- If a title is provided via `$ARGUMENTS`, use it as the PR title.
- Otherwise, derive a concise Conventional Commit title from the branch name and commit history.
## Bundled References
| File | Read when |
| -------------------------------------------- | ---------------------------------------------------------- |
| `$SKILL_PATH/references/pr-body-template.md` | Always, before you write the PR body |
| `$SKILL_PATH/references/change-outline.md` | The **How** section needs a file tree, call tree, or shape |
## Process
### 1. Preflight: find or prepare the PR
```bash
BASE_BRANCH=$(gh repo view --json defaultBranchRef -q '.defaultBranchRef.name')
git branch --show-current
git status --short --branch
# Reuse an existing PR for this branch instead of opening a duplicate
gh pr view --json number,url,title,state,isDraft,baseRefName,body 2>/dev/null
```
- **Open PR exists** — set `BASE_BRANCH` to its `baseRefName`, which may differ from the default branch, and update
its body in step 4. Do not create a second PR or change its draft state.
- **On the default branch** — create a feature branch named after the change before you continue. Never open a PR
from the default branch.
- **Uncommitted task changes** — commit them first (use `commit-atomic` when it is available). Leave unrelated or
unfamiliar changes uncommitted and mention them in the final report.
- **No commits ahead of the base** — stop and report that there is nothing to open a PR for.
### 2. Gather only the context you need
```bash
git fetch origin "$BASE_BRANCH" --quiet
git log "origin/$BASE_BRANCH"..HEAD --oneline
git diff "origin/$BASE_BRANCH"...HEAD --stat
git diff "origin/$BASE_BRANCH"...HEAD
```
- For an existing PR, prefer GitHub's view: `gh pr diff <number>` and `gh pr view <number> --json commits,files`.
This stays correct when the branch lives in a fork and `origin` is not the base repository.
- Read the complete diff and enough surrounding code to understand behavior and ownership.
- Read the linked issue, plan, ADR, or handoff when one exists. Collect their links for the body.
- Note the validation you actually ran (tests, lint, typecheck, manual checks) and the results.
### 3. Write the description
1. Read `$SKILL_PATH/references/pr-body-template.md` and follow its rules.
2. If the repository has its own PR template (`.github/pull_request_template.md`, `.github/PULL_REQUEST_TEMPLATE/`,
or `docs/pull_request_template.md`), keep its headings and checklists, and put the What / Why / How content into
the matching sections.
3. When prose alone does not show the shape of the change, read `$SKILL_PATH/references/change-outline.md` and add
one to three small views to **How**.
4. Write the body to a temporary file, not to the repository:
```bash
BODY_FILE=$(mktemp "${TMPDIR:-/tmp}/pr-body.XXXXXX")
```
### 4. Publish
```bash
# Never force-push.
git push -u origin HEAD
# New PR
gh pr create --draft --base "$BASE_BRANCH" --title "<PR title>" --body-file "$BODY_FILE"
# Existing PR from step 1
gh pr edit <number> --body-file "$BODY_FILE"
```
Use `--body-file` instead of `--body` so that Markdown, backticks, and code fences survive shell quoting.
`gh pr edit --body-file` replaces the whole body. Before you edit an existing PR, carry over from its current `body`
anything the diff cannot tell you: links, reviewer notes, and checklist items that someone ticked and that still apply.
### 5. Confirm and report
```bash
gh pr view --json url,title,isDraft -q '"\(.url) draft=\(.isDraft) \(.title)"'
rm -f "$BODY_FILE"
```
Reply with:
```markdown
- PR: [#<number> <title>](<url>) (<draft or ready for review, from isDraft>)
- Summary: <2-3 sentences: what the PR does and the key decision>
- Validation: <commands run and their results, or "not run">
- Left out: <uncommitted or unrelated changes, or "none">
```
## Guidelines
- **Title**: Short, imperative, max 72 characters (e.g., `feat(auth): add JWT refresh token support`).
- **Body**: Section rules live in `references/pr-body-template.md`; do not restate them here.
- **Language**: Write as one person to another — plain, concise, no jargon or filler.
## Example
````markdown
Closes #142
## WhatFrom jellydn/my-ai-tools, MIT.
More from jellydn/my-ai-tools
- 0.722score
babysit-pr
jellydn
Use when monitoring an open GitHub PR for CI failures, review feedback, mergeability, and safe retries or fixes.
SkillAFreshness: A★ 123Claude Code +9 - 0.722score
visual-pr
jellydn
Posts a concise visual outline as a GitHub pull request comment.
SkillAFreshness: A★ 123Claude Code +9 - 0.716score
codemap
jellydn
Create a seven-document architecture map when the user asks to map a codebase.
SkillAFreshness: A★ 123Claude Code +9 - 0.714score
diagnosing-bugs
jellydn
Build a tight, red-capable feedback loop before diagnosing failures, then minimize, test ranked hypotheses, and lock the fix with a regression test.
SkillAFreshness: A★ 123Claude Code +9 - 0.713score
pr-review
jellydn
Fix PR review comments by implementing requested changes
SkillAFreshness: A★ 123Claude Code +9 - 0.711score
implement-spec
jellydn
Implement a complete spec from its ticket graph, using isolated workers and one integration branch.
SkillAFreshness: A★ 123Claude Code +9 - 0.711score
code-review
jellydn
Review a branch, PR, or worktree diff for repository conventions and stated intent.
SkillAFreshness: A★ 123Claude Code +9 - 0.711score
plannotator-setup-goal
jellydn
Turn ideas into executable goal packages with guided interviews and codebase analysis
SkillAFreshness: A★ 123Claude Code +9 - 0.711score
pr
jellydn
Write a fast-to-review pull request body with a visual summary, before/after evidence, and merge-risk analysis.
SkillAFreshness: A★ 123Claude Code +9 - 0.711score
portless-local
jellydn
Replace port numbers with stable named .localhost URLs for local development
SkillAFreshness: A★ 123Claude Code +9 - 0.711score
blindspot-pass
jellydn
Inspect history and architecture for hidden constraints before risky cross-cutting changes.
SkillAFreshness: A★ 123Claude Code +9 - 0.711score
implementation-logger
jellydn
Log implementation decisions — tracks deviations from plan and captures rationale
SkillAFreshness: A★ 123Claude Code +9
Signals
- Stars
- 123
- Forks
- 12
- Open issues
- 3
- Last commit (this folder)
- Oct 6, 2026 (22 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/jellydn/my-ai-tools
- Website
- ai-tools.itman.fyi/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from jellydn
- 0.722score
babysit-pr
jellydn
Use when monitoring an open GitHub PR for CI failures, review feedback, mergeability, and safe retries or fixes.
SkillAFreshness: A★ 123Claude Code +9 - 0.722score
visual-pr
jellydn
Posts a concise visual outline as a GitHub pull request comment.
SkillAFreshness: A★ 123Claude Code +9 - 0.716score
codemap
jellydn
Create a seven-document architecture map when the user asks to map a codebase.
SkillAFreshness: A★ 123Claude Code +9 - 0.714score
diagnosing-bugs
jellydn
Build a tight, red-capable feedback loop before diagnosing failures, then minimize, test ranked hypotheses, and lock the fix with a regression test.
SkillAFreshness: A★ 123Claude Code +9 - 0.713score
pr-review
jellydn
Fix PR review comments by implementing requested changes
SkillAFreshness: A★ 123Claude Code +9 - 0.711score
code-review
jellydn
Review a branch, PR, or worktree diff for repository conventions and stated intent.
SkillAFreshness: A★ 123Claude Code +9
Cite this page
draft-pull-request skill. Agent Mart. https://agentmart.dev/skills/jellydn-draft-pull-request (last updated 2026-10-24)