Agent skill

Draft Pull Request

by jellydn in jellydn/my-ai-tools

Draft pull requests with structured descriptions using gh CLI

MITAuto-check passedDevelopment

Install Draft Pull Request

skills CLI
$ npx skills add jellydn/my-ai-tools --skill draft-pull-request -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jellydn/my-ai-tools draft-pull-request --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jellydn/my-ai-tools.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/draft-pull-request .claude/skills/draft-pull-request && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
draft-pull-request
GitHub stars
123
Token cost
~1.4k tokens
SKILL.md length
466 words
Files
3 (incl. references)
Skills in repo
35
Repo updated
First seen
Licence
MIT

At a glance

Draft pull requests with structured descriptions using gh CLI

  • Works in 5 steps: Preflight: find or prepare the PR → Gather only the context you need → Write the description → …
  • Tasks that involve Pull requests
  • SKILL.md covers Usage, Bundled References, Process and Guidelines, plus 1 more section
  • Calls gh and git

What it does

Draft Pull Request is an agent skill from jellydn/my-ai-tools. Draft pull requests with structured descriptions using gh CLI

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/change-outline.md` and `references/pr-body-template.md`). Compatibility notes: cline, claude, opencode, amp, codex, gemini, cursor, pi

It sits in Development, covering Pull requests. The repository describes itself as: Comprehensive configuration management for AI coding tools - Replicate my complete setup for Claude Code, OpenCode, Amp, Li, Codex and Claude Code Switch with custom… The licence is MIT.

When your agent uses it

  • Tasks that involve Pull requests

Example prompts

  • “/draft-pull-request”

Requirements

  • Compatibility (from SKILL.md): cline, claude, opencode, amp, codex, gemini, cursor, pi

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Preflight: find or prepare the PR
  2. Gather only the context you need
  3. Write the description
  4. Publish
  5. Confirm and report

What it can do on your machine

Read from SKILL.md and the folder at commit 163951e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    cline, claude, opencode, amp, codex, gemini, cursor, pi

    From compatibility in the SKILL.md frontmatter.

Context cost

Draft Pull Request loads about 1.4k tokens when it runs, and up to ~2.7k if it reads all its reference files. Until then it costs about 20 tokens; SKILL.md has 466 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~20
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jellydn/my-ai-tools at commit 163951e, republished under its MIT licence (© jellydn). 466 words, ~1,441 tokens.

Download SKILL.mdSave it as .claude/skills/draft-pull-request/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
draft-pull-request
description
Draft pull requests with structured descriptions using gh CLI
compatibility
cline, claude, opencode, amp, codex, gemini, cursor, pi
license
MIT
hint
Use when creating or updating a draft pull request with a structured description using gh CLI
user-invocable
true
disable-model-invocation
true
metadata.audience
all
metadata.workflow
git

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

FileRead when
$SKILL_PATH/references/pr-body-template.mdAlways, before you write the PR body
$SKILL_PATH/references/change-outline.mdThe 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.
Show full SKILL.md (176 more words)Show less
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

## What

Add a refresh-token endpoint and automatic token renewal in the API client.

## Why

Users are logged out when the 1-hour access token expires, which interrupts long sessions.

## How

- `POST /auth/refresh` validates the HttpOnly refresh cookie and issues a new access token.
- The API client retries a `401` response once, after a refresh, before it shows an error.

```diff
 request(url)
   send with access token
+  if status is 401 and not retried
+    refreshToken()
+    retry once
   return response
```

## Reviewer notes

- Refresh tokens rotate on each use; a reused token revokes the whole session.

## Validation

- `bun test src/auth` — 24 passed
- Manual: session stays signed in after the access token expires

© jellydn, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/draft-pull-request of jellydn/my-ai-tools.

  • SKILL.md
  • references/change-outline.md
  • references/pr-body-template.md

Open the folder on GitHubat commit 163951e

Compare with similar skills

Draft Pull Request next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Draft Pull Request compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Draft Pull Request this skilljellydn/my-ai-tools123—~1.4kAutomated safety check: PassMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Check PRonyx-dot-app/onyx32k2 repos~2.3kAutomated safety check: PassMIT
Understand Diff AnalysisEgonex-AI/Understand-Anything85k1 repos~1.4kAutomated safety check: PassMIT
PR Design DocOpenHands/OpenHands90k—~2.4kAutomated safety check: PassMIT

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Check PR

    onyx-dot-app/onyx

    Checks a GitHub, GitLab, or Perforce (p4) pull request (or merge request, or shelved changelist) for unresolved review comments, failing status checks, and incomplete PR descriptions.

    32k GitHub starsUsed in 2 repos~2.3k tokens
    DevelopmentAuto-check passed
  • Understand Diff Analysis

    Egonex-AI/Understand-Anything

    Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.

    85k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • PR Design Doc

    OpenHands/OpenHands

    For a non-trivial pull request, write a self-contained HTML design doc under the temporary .pr/ directory and link a visibility-appropriate preview in the PR description, so maintainers grasp the…

    90k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed
  • WooCommerce Code Review

    woocommerce/woocommerce

    Reviews WooCommerce code changes against the project's standards, flagging backend PHP architecture, naming, documentation, data integrity and testing violations.

    11k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed

More from jellydn/my-ai-tools

All 35 skills in this repo
  • Babysit PR

    jellydn/my-ai-tools

    A skill your agent uses when monitoring an open GitHub PR for CI failures, review feedback, mergeability, and safe retries or fixes.

    123 GitHub stars~4.1k tokensUpdated yesterday
    Auto-check passed
  • Visual PR

    jellydn/my-ai-tools

    Posts a concise visual outline as a GitHub pull request comment.

    123 GitHub stars~764 tokensUpdated yesterday
    Auto-check passed
  • Qmd Knowledge

    jellydn/my-ai-tools

    Manage project knowledge with qmd — captures learnings, decisions, and conventions

    123 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • Prd

    jellydn/my-ai-tools

    Generate Product Requirements Documents from feature ideas — plans specs and requirements

    123 GitHub starsUsed in 4 repos~1.8k tokens
    Auto-check passed
  • Capability Experiments

    jellydn/my-ai-tools

    Build an interactive report or experiment when the user asks to explore model capabilities.

    123 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • PR Review

    jellydn/my-ai-tools

    Fix PR review comments by implementing requested changes. An agent skill from jellydn/my-ai-tools.

    123 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Draft Pull Request

What does Draft Pull Request do?

Draft pull requests with structured descriptions using gh CLI. Draft Pull Request is an agent skill from jellydn/my-ai-tools.

When should I use Draft Pull Request?

Draft Pull Request fits situations like: tasks that involve Pull requests.

How do I install Draft Pull Request in Claude Code?

Run `npx skills add jellydn/my-ai-tools --skill draft-pull-request -a claude-code`. Or copy the skill folder (skills/draft-pull-request in jellydn/my-ai-tools) into .claude/skills/draft-pull-request in your project. Claude Code loads it when a task matches its description.

How do I install Draft Pull Request in Codex?

Run `npx skills add jellydn/my-ai-tools --skill draft-pull-request -a codex`. Or copy the skill folder (skills/draft-pull-request in jellydn/my-ai-tools) into .agents/skills/draft-pull-request in your project. Codex loads it when a task matches its description.

Can I use Draft Pull Request in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jellydn/my-ai-tools --skill draft-pull-request -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/draft-pull-request, .gemini/skills/draft-pull-request, .github/skills/draft-pull-request and .opencode/skills/draft-pull-request in your project.

What does Draft Pull Request need to run?

Going by SKILL.md and its folder, Draft Pull Request needs the command-line tools its instructions call (gh and git). Compatibility (from SKILL.md): cline, claude, opencode, amp, codex, gemini, cursor, pi.

Does Draft Pull Request access the network?

SKILL.md contains no URLs. Its commands use gh and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Draft Pull Request safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Draft Pull Request use?

Draft Pull Request is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Draft Pull Request use?

About 1.4k tokens (SKILL.md is roughly 5.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.3k tokens, read only when the agent opens those files.

What are the alternatives to Draft Pull Request?

Skills that share tags, products or a category with Draft Pull Request: Finishing a Development Branch (obra/superpowers, 296k stars), PR Babysitter (openinterpreter/openinterpreter, 69k stars), Check PR (onyx-dot-app/onyx, 32k stars) and Understand Diff Analysis (Egonex-AI/Understand-Anything, 85k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Draft Pull Request?

jellydn (a GitHub user) maintains it in jellydn/my-ai-tools, which has 123 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on October 7, 2026.

Source: jellydn/my-ai-tools on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.