code-ownership-impact — the per-PR packet in English + generic; this skill is the 中文 + 企业 CI variant.
cross-team-rfc-draft — the long-form RFC; this skill is the per-PR counterpart.
goal-driven-development — orchestrates the spec-to-code flow; this skill is the PR-prep counterpart.
Examples
Each bad-* doc has a matching good-* in examples/ showing the minimum PR body. Read them side by side to calibrate depth. examples/pr-output.md is the canonical "what the agent should emit" sample.
1---2name: pr-authoring3description: PR Authoring4---56# PR Authoring78为企业的仓库准备一个 pull request:把 PR body 组织成 reviewer 一眼能看懂的格式,附上 verification 证据,列出 CODEOWNERS 解析后的 reviewer 名单,把关联的 issue / RFC / 设计文档链接到 org 用的格式上。910## Required Loading1112Always load:1314- `prompts/pr-body.md` — the 8-section PR body template; the per-section checklist; the 中文 + 企业 CI 兼容的 formatting rules.1516## When To Run1718- 当你本地有 1+ 个 commit 准备开 PR。19- 当 reviewer 在 PR 上留言让你重新组织 PR body。20- 当你接手别人的 PR 想让它符合 org 的 PR 模板。21- 当一个 PR 跨越多个仓库(monorepo 或 federated repos),需要把每个仓库的引用都列出来。2223## Discovery Order24251. 看 `git log` 找出 PR 范围内的 commits。262. 看 `git diff --stat main..HEAD` 找出改了哪些文件 / 多少行。273. 解析 `CODEOWNERS` 找出每个改动的 path 对应的 team + named approver。284. 找出关联的 issue / RFC / 设计文档(从 commit message、PR template、或 org 的 `gh issue list --search`)。295. 收集 verification 证据(`make test`、`npm test`、CI 链接、manual smoke test 截图、metrics 截图)。306. 按 org 的 PR 模板填入 8 个 section。3132## Output Contract3334PR body 是一个 Markdown 文档,8 个 section 按固定顺序:35361. **Summary** — 1-3 段。这个 PR 改什么、为什么改、影响范围。372. **Type of change** — checkbox list(按 org 的 PR 模板)。383. **Commits** — `git log --oneline main..HEAD` 的输出。394. **Files changed** — `git diff --stat main..HEAD` 的输出 + 关键文件的链接。405. **Reviewers** — 从 CODEOWNERS 解析出的 per-team reviewer 名单,附 `@` ping。416. **Verification evidence** — unit / integration / e2e / manual / metrics,每类至少一项。427. **Linked docs** — issue / RFC / 设计文档的链接,按 org 格式。438. **Risk + rollback** — 这个 PR 的风险点 + 回滚路径。4445每个 section 都要有内容。一个 PR body 缺任何一个 section 是 `PR-INCOMPLETE` finding。4647## 中文 + 企业 CI 兼容的 formatting4849- **Code blocks** 用 ` ``` ` 围起来;行内 code 用 `` ` ``。50- **路径** 用 `` `path/to/file.java:42` `` 的格式。51- **PR description 的 checkbox** 用 `- [ ]`,跟 GitHub 渲染兼容。52- **Reviewer 名单** 用 `@handle` 格式,GitHub 会自动解析。53- **Commit message** 用 conventional commits(`feat:`, `fix:`, `docs:` 等)。54- **不要用 emoji** 替代文字(CI 的 grep 会断)。5556## Tools5758- **`codegraph_impact`** — blast radius。59- **`codegraph_files`** — path → team map(与 `code-ownership-impact` 共用)。60- **`git log` / `git diff`** — 改动列表。61- **GitHub CLI** — `gh pr create --body-file` 直接从文件读 PR body。62- **Fallback** — 手动 `git log` + `git diff` + 手动解析 CODEOWNERS。6364## Fallback6566If CodeGraph is unavailable, the fallback is manual `git log` + manual CODEOWNERS parsing. The final report must include the line:6768```text69CodeGraph unavailable; pr body gathered by rg/git inspection.70```7172## Related Skills7374- **`spec-doc-linter`** — keeps `DevAgent.md` / `CONTEXT.md` honest.75- **`code-ownership-impact`** — the per-PR packet in English + generic; this skill is the 中文 + 企业 CI variant.76- **`cross-team-rfc-draft`** — the long-form RFC; this skill is the per-PR counterpart.77- **`goal-driven-development`** — orchestrates the spec-to-code flow; this skill is the PR-prep counterpart.7879## Examples8081Each `bad-*` doc has a matching `good-*` in `examples/` showing the minimum PR body. Read them side by side to calibrate depth. `examples/pr-output.md` is the canonical "what the agent should emit" sample.
Run npx skillmds@latest add liyown/pr-authoring in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
PR Authoring It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
liyown (@liyown) published this skill. Their other Agent Skills are listed on their SkillMD profile.