dev-pr
БесплатноБез исполняемых скриптовНе проверен开发者准备创建 Pull Request 时触发。当用户说"建 PR"、"PR description"、 "写 PR body"、"create pull request"、"PR 文案"、"生成 PR 描述"时使用本 skill。 基于真实 git diff 填充项目 PR 模板;标题与正文须用…
от pdl-openair★ 16 звёзд на GitHubОб этом скилле
Dev: PR Description Generation
When to use
开发者准备创建 PR,需要基于 diff 生成 PR description。
本地门禁提示:pre-commit 钩子经
python scripts/gates/run_local.py运行,依赖 PATHpython装有 ruff/mypy——缺失时钩子降级为警告放行,CI 兜底强制(见CONTRIBUTING.md第 8 节)。
Step 1: Read diff and extract changes
- Run
git log <base>..HEAD --onelineto see all commits - Run
git diff <base>...HEADto see full diff - From the diff, extract:
- What changed
- What did NOT change
Step 2: Link GitHub Issues (conditional: required when gh CLI is available)
Generate the diff summary, then match open Issues in the repo to fill the「关联任务」section.
Gate 0 — Tool check: run gh --version. If it fails, skip this entire step and append a note to the PR description:
💡 未检测到
ghCLI,无法自动关联 Issue。安装方式:https://cli.github.com ,安装后可用gh issue list查看 Issue。 If it succeeds, must complete all sub-steps below before proceeding.
Steps
- Fetch open Issues (tool already confirmed at Gate 0):
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8 gh issue list --repo <owner/repo> --state open --limit 50 --json number,title,labels --output /tmp/gh_issues.jsonPowerShell 编码问题:JSON 输出中文可能乱码,需要
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8,或用--json写文件后读取。 - Semantic matching: compare PR diff summary with each Issue's title / labels:
- Branch name or commit message contains Issue number → direct link
- Issue title semantically matches PR changes → link
- Multiple matches → list all, let user confirm
- Determine Ref / Closes:
- PR fully resolves all requirements in the Issue →
Closes #xx - PR is partial or related but not closing →
Ref #xx - When unsure, default to
Ref #xxand remind user to decide
- PR fully resolves all requirements in the Issue →
- Write into「关联任务」section of the PR description
Example output
## 关联任务
Closes #12
Ref #13
Gate: Issue linking confirmation
- gh CLI availability has been checked (Gate 0)
- Open Issues have been fetched and matched
- Ref / Closes judgment has been made for each match
Only after confirming all items, proceed to Step 3.
Step 3: Link Feishu tasks (conditional: required when lark-cli is available)
Match PR changes against Feishu Bitable tasks and prompt user about completion status and next actions.
Gate 0 — Tool check: run lark-cli --version. If it fails, skip this entire step and append a note to the PR description:
💡 未检测到
lark-cli,无法自动关联飞书任务。安装方式:https://www.feishu.cn/feishu-cli ,安装后可读取飞书多维表格任务。 If it succeeds, must complete all sub-steps below before proceeding.
Steps
- Locate target Bitable (tool already confirmed at Gate 0):
- Prefer project config (e.g. Feishu links referenced in
docs/task_specs/) - User can provide Feishu Bitable URL directly
- No clear target → skip and remind user to link manually
- Prefer project config (e.g. Feishu links referenced in
- Parse Wiki link and read table:
# Wiki token → Base token lark-cli wiki spaces get_node --params "@./tmp_params.json" --as user # Read field structure lark-cli base +field-list --base-token "<obj_token>" --table-id "<tbl...>" --as user # Read records lark-cli base +record-list --base-token "<obj_token>" --table-id "<tbl...>" --view-id "<vew...>" --as user --limit 200PowerShell 注意事项:中文需设
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8;--params用文件传参避免转义问题;字段名含空格时用字段 ID。 - Semantic matching: compare PR diff summary with Feishu subtasks (subtask number + name + description).
- Output match results, including:
- Matched Feishu task rows (main task number, subtask number, subtask name, current status, assignee, acceptance criteria)
- Completion check: verify each acceptance criterion against the PR changes
- Next action suggestions:
- Status「未开始」→ suggest updating to「进行中」
- Status「进行中」and all acceptance criteria met → suggest updating to「待核查」
- Acceptance criteria partially met → list remaining items
- How to update status: prompt user to modify in Feishu, or provide
lark-cli base +record-upsertcommand for confirmation
Example output
## 飞书任务关联
匹配到飞书任务:
| 子任务编号 | 子任务名称 | 当前状态 | 负责人 |
|-----------|-----------|---------|-------|
| S01-02-01 | 确定首批联调样例范围 | 待核查 | xxx |
| S01-02-02 | 准备正常流程样例 | 待核查 | xxx |
验收标准检查:
- [ ] S01-02-02: 正常流程样例数据尚未提交(fixtures/recorded_runs/ 下无新增)
建议:S01-02-02 完成后,在飞书表格中将状态从「待核查」更新为「已完成」。
Gate: Feishu task linking confirmation
- lark-cli availability has been checked (Gate 0)
- Target Bitable has been located and records fetched
- Matching results and completion status have been reported
Only after confirming all items, proceed to Step 4.
Step 4: Generate PR description
Rules source
Read before generating:
spec/workflows/pr-workflow.md-- how to read diff, output format.github/pull_request_template.md-- the actual template to fill
PR 证据合同要点(会咬人的硬事实,权威见 pr-wo
Установить dev-pr в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл dev-pr?
开发者准备创建 Pull Request 时触发。当用户说"建 PR"、"PR description"、 "写 PR body"、"create pull request"、"PR 文案"、"生成 PR 描述"时使用本 skill。 基于真实 git diff 填充项目 PR 模板;标题与正文须用 reviewer 可读的能力描述, 禁止以 P07/P08/P2.6b 等内部代号作主语。不自动创建 PR,除非用户明确要求。
Как установить скилл dev-pr?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dev-pr запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic