pr-description
- Repo stars 0
- Author updated Live
- Author repo skills-registry
- Domain
- Engineering
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @tomevault-io · no license declared
- Token usage
- Lean
- Setup complexity
- Plug-and-play
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Write / modify
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: pr-description
description: | Use when this capability is needed. git diff + branch context → 结构化 PR 描述 → 可选通过 gh CLI 创建 PR。…
category: engineering
runtime: no special runtime
---
# pr-description output preview
## PART A: Task fit
- Use case: | Use when this capability is needed. git diff + branch context → 结构化 PR 描述 → 可选通过 gh CLI 创建 PR。 获取 diff → 分析变更 → 生成结构化描述 → 输出/创建 PR git rev-parse --abbrev-ref HEAD git diff origin/main...HEAD --stat runs entirely locally. Works with Claude Code, Cursor, Cline and 23 more..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “工作流程 / Step 1: 获取变更信息 / Step 2: 分析变更” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “| Use when this capability is needed. git diff + branch context → 结构化 PR 描述 → 可选通过 gh CLI 创建 PR。 获取 diff → 分析变更 → 生成结构化描述 → 输出/创建 PR git rev-parse --abbrev-ref HEAD git diff origin/main...HEAD --stat runs entirely locally. Works with Claude Code, Cursor, Cline and 23 more.”.
- **02** When the source has headings, the agent prioritizes “工作流程 / Step 1: 获取变更信息 / Step 2: 分析变更” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files.
Start with a small task and check whether the result follows “工作流程 / Step 1: 获取变更信息 / Step 2: 分析变更”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: pr-description
description: | Use when this capability is needed. git diff + branch context → 结构化 PR 描述 → 可选通过 gh CLI 创建 PR。…
category: engineering
source: tomevault-io/skills-registry
---
# pr-description
## When to use
- | Use when this capability is needed. git diff + branch context → 结构化 PR 描述 → 可选通过 gh CLI 创建 PR。 获取 diff → 分析变更 → 生成结构…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “工作流程 / Step 1: 获取变更信息 / Step 2: 分析变更” and keep inference separate from source facts.
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "pr-description" {
input -> user goal + target files + boundaries + acceptance criteria
context -> 工作流程 / Step 1: 获取变更信息 / Step 2: 分析变更
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, write/modify files | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} PR Description — Pull Request 描述生成 Agent
git diff + branch context → 结构化 PR 描述 → 可选通过 gh CLI 创建 PR。
工作流程
获取 diff → 分析变更 → 生成结构化描述 → 输出/创建 PR
Step 1: 获取变更信息
# 获取当前分支名
git rev-parse --abbrev-ref HEAD
# 获取与目标分支的 diff(自动检测 main/master)
git diff origin/main...HEAD --stat
git diff origin/main...HEAD
# 如果 main 不存在则用 master
git diff origin/master...HEAD --stat
git diff origin/master...HEAD
# 获取近期提交信息
git log origin/main...HEAD --oneline
如果参数中提供了特定分支:用指定分支替代自动检测。
如果不在 git 仓库或没有远程分支:提示用户提供 diff 文本。
Step 2: 分析变更
按以下维度分析:
变更分类
| 类型 | 特征 |
|---|---|
| 新功能 | 新增文件、新模块、新 API |
| Bug 修复 | 修复边界条件、异常处理、逻辑修正 |
| 重构 | 重命名、提取函数、调整结构 |
| 依赖更新 | package.json、requirements.txt 等 |
| 配置变更 | 配置文件、环境变量 |
| 文档/测试 | .md 文件、测试用例 |
变更影响分析
- 影响范围:修改了哪些模块、API 接口是否变化
- 破坏性变更:是否改接口签名、删字段、改配置格式
- 数据变更:是否涉及数据库 schema、缓存 key 等
Step 3: 生成 PR 描述
按以下模板输出:
## Summary
<用 2-3 句话概括 PR 目的和变更要点>
## Changes
### <模块/功能 1>
- <具体变更,每点一行>
- ...
### <模块/功能 2>
- <具体变更>
- ...
## Breaking Changes
<如果有破坏性变更,列出迁移说明;如果没有则写 "None">
## Test Plan
- [ ] <验证步骤 1>
- [ ] <验证步骤 2>
- [ ] 现有测试通过:`<测试命令>`
编写规则
DO:
- ✅ 摘要简明扼要,让 reviewer 30 秒内理解 PR 目的
- ✅ Changes 按模块分组,而非按文件分组
- ✅ Test Plan 可执行,包含具体命令
- ✅ 标注 Breaking Change 及其迁移路径
- ✅ 如果 diff 有相关 issue 号,在 footer 引用
DON'T:
- ❌ 逐文件罗列(Changes 已按模块归组)
- ❌ 写 "fix bug" 这类模糊描述
- ❌ 遗漏 Test Plan
- ❌ 隐藏 Breaking Change
Step 4: 创建 PR(可选)
如果用户确认且安装了 gh CLI:
# 先检查 gh CLI 和认证状态
gh --version && gh auth status
# 确保分支已推送到远程
git push -u origin HEAD
# 创建 PR
gh pr create --title "<短标题>" --body "<pr-body>"
注意:git push 必须在 gh pr create 之前执行,否则 GitHub 无法为不存在的远程分支创建 PR。
提示用户确认后再执行创建操作。
Edge Cases
空 diff / 没有变更
当前分支相对目标分支没有变更。
请确保已提交更改并推送到远程。
首次提交 / 无目标分支
没有检测到 main/master 分支。是首次提交还是用的其他默认分支?
请指定目标分支。
超大 diff(>1000 行)
diff 较大,建议:
1. 考虑拆分为多个 PR 分别处理
2. 只生成 summary 和 changes 概览,不逐行描述
没有安装 gh CLI
提示用户安装或手动复制 PR 描述到 GitHub。
gh CLI 未认证
gh auth login
# 认证完成后重新执行创建操作
Source: afine907/skills — distributed by TomeVault.
Decide Fit First
Design Intent
How To Use It
Boundaries And Review