draft-pull-request
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "draft-pull-request" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-23cc2ef7978b618e68011ff72ef44d79078bb8fbce61fbc2320b1deb92533e00. Verify the upstream source and version against https://github.com/jellydn/my-ai-tools before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Creates a draft pull request with a structured description using the gh CLI. Used to submit a draft PR from the command line that includes a structured description.
Introduction source: third_party · jellydn · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Draft pull requests with structured descriptions using gh CLI
- Audience
- Not specified in the source documentation.
- Inputs and outputs
- After creation, display the PR URL:
- Software, accounts and paid services
- Not specified in the source documentation.
- Limits and differences
- Not specified in the source documentation.
- Testing
- Not tested
Browse files
Frontmatter
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
hint: Use when creating a draft pull request with a structured description using gh CLI
user-invocable: true
disable-model-invocation: true
metadata:
audience: all
workflow: gitDraft Pull Request
Create a draft pull request using gh CLI with a structured What / Why / How description that communicates the purpose and approach of your changes clearly.
Usage
/draft-pull-request [title]
- If a title is provided via
$ARGUMENTS, use it as the PR title. - Otherwise, derive a concise title from the branch name and commit history.
Process
1. Gather context
# Detect the repository's default branch
BASE_BRANCH=$(gh repo view --json defaultBranchRef -q '.defaultBranchRef.name')
# Check current branch
git branch --show-current
# Review commit history since branching from base
git log "$BASE_BRANCH"..HEAD --oneline
# Review the full diff
git diff "$BASE_BRANCH"..HEAD --stat
git diff "$BASE_BRANCH"..HEAD
2. Compose the PR description
Write a structured description following the What / Why / How template:
## What
[Concise summary of the changes made. What was added, modified, or removed?]
## Why
[The motivation behind this change. What problem does it solve? What opportunity does it capture?]
## How
[Brief explanation of the approach taken. Key technical decisions, patterns used, or trade-offs made.]
## Checklist
- [ ] Tests added or updated
- [ ] Documentation updated
- [ ] No breaking changes (or breaking changes documented above)
3. Create the draft PR with gh CLI
gh pr create \
--draft \
--title "<PR title>" \
--body "<structured what/why/how description>"
Use --draft to signal the PR is not yet ready for review.
4. Output the PR URL
After creation, display the PR URL:
gh pr view --json url -q '.url'
Guidelines
- Title: Short, imperative, max 72 characters (e.g.,
feat: add user authentication flow) - What: Describe the surface area of changes — files, components, APIs affected
- Why: Explain the business or technical reason — avoid vague phrases like "to improve things"
- How: Highlight non-obvious implementation details or trade-offs, not every line changed
- Keep the description concise but complete — reviewers should understand the PR without reading all the code
Example
gh pr create \
--draft \
--title "feat(auth): add JWT refresh token support" \
--body "## What
Add a refresh token endpoint and client-side token renewal logic.
## Why
Users were being logged out after the 1-hour access token expiry,
causing friction for long-running sessions. Refresh tokens allow
seamless re-authentication without user interaction.
## How
- Added POST /auth/refresh endpoint that validates refresh tokens
stored in HttpOnly cookies and issues new access tokens
- Extended AuthService with refreshToken() and revokeToken() methods
- Updated the API client to automatically retry failed requests with
a refreshed token before surfacing errors to the UI
## Checklist
- [x] Tests added or updated
- [x] Documentation updated
- [ ] No breaking changes (or breaking changes documented above)"Current listing version
0.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决开发者高频刚需:创建结构化、信息完整的草稿 PR,显著提升代码审查效率
- 提供端到端完整流程,从上下文收集到 PR 创建,实用价值高
Highlights
- description 明确描述核心功能,hint 提供清晰触发提示
- 边界清晰,不易与其他 Skill 重叠
Highlights
- Phase 步骤清晰完整,包含端到端示例
- frontmatter 完整,文档结构规范
Highlights
- 工具来源明确(gh CLI),参数使用正确
- 覆盖主要异常场景,执行流程可靠
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Accounts, secrets or authorization
Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.
Mentioned in main document · lines 109
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Not specified in the source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.