跳转到内容

pr

使用这个模板来撰写 PR 正文:

## Summary
<diagram, diff-sketch, or tree>
## Evidence
- **Before:** <screenshot/output/failing test run>
**After:** <screenshot/output/passing test run>
## Merge Danger
**Door:** <one-way or two-way>
<optional: description>
**Blast Radius:** <one-word description>
<optional: potential ramifications of merge>

跳过所有开场白,文字尽量简短。使用 GLOSSARY.md 里的领域用语。

选择最精简、又能清楚说明重点的视图。

  • 用伪代码展示逻辑或算法:
on(save)
if content is unchanged
return cached result
write new content
return fresh result
  • 用调用树展示运行时控制流程:
submitForm
createSession
persistPrompt
launchAgent
navigateToSession
  • 用组件树展示界面结构,包括重要的状态和模块边界:
<SessionPage> (apps/example/src/routes/session.tsx)
useSessionEvents()
<SessionToolbar>
<RunSkillButton> (packages/ui)
  • 用浅层文件树展示文件职责或大范围重构:
src/
├── commands/ # parses user actions
├── sessions/ # owns session state
└── transport/ # sends API requests
  • 用 Mermaid 展示组件交互、控制流程或数据流:
sequenceDiagram
participant User
participant UI
participant Daemon
User->>UI: choose command
UI->>Daemon: send expanded prompt
Daemon-->>UI: stream result
  • 如果重点是改动内容,且周边结构已经存在,就用 diff。让 diff 的形状贴合主题。

组件变更示例:

<SessionPage>
useSessionEvents()
<SessionToolbar>
<RunSkillButton />
<SessionTimeline>
<SkillResultCard />

文件布局变更示例:

src/
├── commands/
│ └── show-me.ts # expands the slash command
├── sessions/
└── transport.ts
└── transport/
├── client.ts
└── stream.ts

调用树或调用栈变更示例:

submitForm
createSession
persistPrompt
expandSkillMention
launchAgent
navigateToSession
navigateToSession
subscribeToEvents

状态或控制流程变更示例:

on(save)
write content
if content is unchanged
return cached result
write new content
invalidate cache
  • 如果大部分内容都是新增的、省略上下文会掩盖归属或顺序,或者用户需要一个可复制的目标结构,就展示整个代码块:
function expandSkill(command: string): string {
const skillName = command.slice(1);
return `use the ${skillName} skill`;
}

把每个图示放在它所支持的简短文字旁边。只保留回答用户当前问题或解决当前讨论点所需的调用、文件、属性、状态和边界。

可以使用其中一种,也可以使用几种;不太可能全部都用上。自行判断,避免让用户应接不暇。

展示改动生效的具体证据,包含前后对比。

如果环境支持截图,截图是最有力的证据。

基于执行的证据属于 A 级,例如测试结果或控制台输出。用伪代码展示现在哪项测试从失败变成通过,并写出确切的测试。

说明这是单向还是双向门。双向门可以折返,单向门则无法轻易撤销。容易回滚的 PR 风险较低。涉及破坏性操作或难以撤回的决策,属于单向门。

爆炸半径指这个 PR 带来的改动可能影响的范围。考虑各种可能性,例如布局偏移、消费者出错、移动端适配问题等。

读者可以点名用它,模型也可以自己调用它。它在 Claude Code 插件里。

介绍如何用简洁的 PR 正文展示改动摘要、证据和合并风险,并根据内容选择合适的图示。

Use when writing a PR body.
英文 SKILL.md
---
name: pr
description: "Use when writing a PR body."
metadata:
credits:
skill: show-me
author: Dex Horthy
organisation: Humanlayer
url: "https://github.com/humanlayer/skills/blob/main/plugins/show-me/skills/show-me/SKILL.md"
---
Use this template for writing the PR body:
```markdown
## Summary
<diagram, diff-sketch, or tree>
## Evidence
- **Before:** <screenshot/output/failing test run>
**After:** <screenshot/output/passing test run>
## Merge Danger
**Door:** <one-way or two-way>
<optional: description>
**Blast Radius:** <one-word description>
<optional: potential ramifications of merge>
```
## Sections
Skip all preambles and keep prose brief. Use the user's domain language from `GLOSSARY.md`.
### Summary
Pick the smallest view that makes the key point clear.
- Show logic or an algorithm as pseudocode:
```text
on(save)
if content is unchanged
return cached result
write new content
return fresh result
```
- Show runtime control flow as a call tree:
```text
submitForm
createSession
persistPrompt
launchAgent
navigateToSession
```
- Show UI structure as a component tree, including state and module boundaries that matter:
```text
<SessionPage> (apps/example/src/routes/session.tsx)
useSessionEvents()
<SessionToolbar>
<RunSkillButton> (packages/ui)
```
- Show file responsibility or a broad refactor as a shallow file tree:
```text
src/
├── commands/ # parses user actions
├── sessions/ # owns session state
└── transport/ # sends API requests
```
- Show component interaction, control flow, or data flow with Mermaid:
```mermaid
sequenceDiagram
participant User
participant UI
participant Daemon
User->>UI: choose command
UI->>Daemon: send expanded prompt
Daemon-->>UI: stream result
```
- Use `diff` when the point is what changes and the surrounding shape already exists. Match the diff shape to the topic.
For a component change:
```diff
<SessionPage>
useSessionEvents()
<SessionToolbar>
+ <RunSkillButton />
<SessionTimeline>
+ <SkillResultCard />
```
For a file-layout change:
```diff
src/
├── commands/
+│ └── show-me.ts # expands the slash command
├── sessions/
-└── transport.ts
+└── transport/
+ ├── client.ts
+ └── stream.ts
```
For a call-tree or call-stack change:
```diff
submitForm
createSession
persistPrompt
+ expandSkillMention
launchAgent
- navigateToSession
+ navigateToSession
+ subscribeToEvents
```
For a state or control-flow change:
```diff
on(save)
- write content
+ if content is unchanged
+ return cached result
+ write new content
+ invalidate cache
```
- Show the whole block when most of it is new, when omitted context would hide ownership or order, or when the user needs a copyable target shape:
```ts
function expandSkill(command: string): string {
const skillName = command.slice(1);
return `use the ${skillName} skill`;
}
```
#### Guidance
Place each visual next to the short text it supports. Keep only the calls, files, props, states, and boundaries needed to answer the user's current question or the options to resolve the current discussion point.
You may use one of these, you may use several, it is unlikely you will use all of them. Use your judgement and don't overwhelm the user.
### Evidence
Concrete evidence that the change works. Show a before and after.
Screenshots are S-tier - when the environment is set up for it and the change is visual.
Execution-based evidence is A-tier. Test results, console output. Show the exact test that now fails and passes, using pseudocode.
### Merge Danger
Describe whether it's a one-way or two-way door. You can walk back through two-way doors, but not one-way doors. A PR that is cheap to roll back is lower risk. Changes that involve destructive actions or hard-to-reverse decisions are one-way doors.
The blast radius is the potential impact or scope of the changes introduced by this PR. Consider all possibilities. Examples are layout shift, breakages for consumers, mobile responsiveness, etc.

非官方学习站,与 Matt Pocock 和 AI Hero 没有隶属关系。本站不提供可安装的中文技能包。

技能原文采用 MIT 许可。Copyright (c) 2026 Matt Pocock

鲁ICP备2025189036号