draft-pull-request

使用 gh CLI 创建带有结构化描述的草稿拉取请求。用于通过命令行提交包含结构化说明的草稿 PR。

仓库最近推送
GitHub Stars
130
Forks
13
Issues / PRs
15

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "draft-pull-request":https://skillpi.com/zh/skills/deepskill-23cc2ef7978b618e68011ff72ef44d79078bb8fbce61fbc2320b1deb92533e00。安装前核对上游来源和版本:https://github.com/jellydn/my-ai-tools。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

使用 gh CLI 创建带有结构化描述的草稿拉取请求。用于通过命令行提交包含结构化说明的草稿 PR。

0 下载

介绍来源: third_party · jellydn · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
适合谁
来源文档未说明。
输入和输出
翻译待完成,请参阅来源文档。
软件、账号及付费要求
来源文档未说明。
限制与区别
来源文档未说明。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
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: git

Draft 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)"

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值92/100

亮点

  • 解决开发者高频刚需:创建结构化、信息完整的草稿 PR,显著提升代码审查效率
  • 提供端到端完整流程,从上下文收集到 PR 创建,实用价值高
触发精准95/100

亮点

  • description 明确描述核心功能,hint 提供清晰触发提示
  • 边界清晰,不易与其他 Skill 重叠
结构规范95/100

亮点

  • Phase 步骤清晰完整,包含端到端示例
  • frontmatter 完整,文档结构规范
执行可靠90/100

亮点

  • 工具来源明确(gh CLI),参数使用正确
  • 覆盖主要异常场景,执行流程可靠
证据可验 (前四项均值)93/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

  • 账号、密钥或授权

    使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。

    主文档提及 · 第 109 行

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

来源文档未说明。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。