PR skill

Use when writing a PR body.

by mattpocock·MIT license·★ 267,278 Stars on the repo·GitHub ↗

Use now

Files of PR

mattpocock/main1 file shown
SKILL.md
Show the full text171 lines
pr/SKILL.md171 lines · 4.1 KB

Use this template for writing the PR body:

## 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:
on(save)
  if content is unchanged
    return cached result
  write new content
  return fresh result
  • Show runtime control flow as a call tree:
submitForm
  createSession
    persistPrompt
    launchAgent
  navigateToSession
  • Show UI structure as a component tree, including state and module boundaries that matter:
<SessionPage> (apps/example/src/routes/session.tsx)
  useSessionEvents()
  <SessionToolbar>
    <RunSkillButton> (packages/ui)
  • Show file responsibility or a broad refactor as a shallow file tree:
src/
├── commands/       # parses user actions
├── sessions/       # owns session state
└── transport/      # sends API requests
  • Show component interaction, control flow, or data flow with 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:

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

For a file-layout change:

 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:

 submitForm
   createSession
     persistPrompt
+    expandSkillMention
     launchAgent
-  navigateToSession
+  navigateToSession
+    subscribeToEvents

For a state or control-flow change:

 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:
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.

1---
2name: pr
3description: "Use when writing a PR body."
4metadata:
5 credits:
6 skill: show-me
7 author: Dex Horthy
8 organisation: Humanlayer
9 url: "https://github.com/humanlayer/skills/blob/main/plugins/show-me/skills/show-me/SKILL.md"
10---
11 
12Use this template for writing the PR body:
13 
14```markdown
15## Summary
16 
17<diagram, diff-sketch, or tree>
18 
19## Evidence
20 
21- **Before:** <screenshot/output/failing test run>
22 **After:** <screenshot/output/passing test run>
23 
24## Merge Danger
25 
26**Door:** <one-way or two-way>
27 
28<optional: description>
29 
30**Blast Radius:** <one-word description>
31 
32<optional: potential ramifications of merge>
33```
34 
35## Sections
36 
37Skip all preambles and keep prose brief. Use the user's domain language from `GLOSSARY.md`.
38 
39### Summary
40 
41Pick the smallest view that makes the key point clear.
42 
43- Show logic or an algorithm as pseudocode:
44 
45```text
46on(save)
47 if content is unchanged
48 return cached result
49 write new content
50 return fresh result
51```
52 
53- Show runtime control flow as a call tree:
54 
55```text
56submitForm
57 createSession
58 persistPrompt
59 launchAgent
60 navigateToSession
61```
62 
63- Show UI structure as a component tree, including state and module boundaries that matter:
64 
65```text
66<SessionPage> (apps/example/src/routes/session.tsx)
67 useSessionEvents()
68 <SessionToolbar>
69 <RunSkillButton> (packages/ui)
70```
71 
72- Show file responsibility or a broad refactor as a shallow file tree:
73 
74```text
75src/
76├── commands/ # parses user actions
77├── sessions/ # owns session state
78└── transport/ # sends API requests
79```
80 
81- Show component interaction, control flow, or data flow with Mermaid:
82 
83```mermaid
84sequenceDiagram
85 participant User
86 participant UI
87 participant Daemon
88 User->>UI: choose command
89 UI->>Daemon: send expanded prompt
90 Daemon-->>UI: stream result
91```
92 
93- Use `diff` when the point is what changes and the surrounding shape already exists. Match the diff shape to the topic.
94 
95For a component change:
96 
97```diff
98 <SessionPage>
99 useSessionEvents()
100 <SessionToolbar>
101+ <RunSkillButton />
102 <SessionTimeline>
103+ <SkillResultCard />
104```
105 
106For a file-layout change:
107 
108```diff
109 src/
110 ├── commands/
111+│ └── show-me.ts # expands the slash command
112 ├── sessions/
113-└── transport.ts
114+└── transport/
115+ ├── client.ts
116+ └── stream.ts
117```
118 
119For a call-tree or call-stack change:
120 
121```diff
122 submitForm
123 createSession
124 persistPrompt
125+ expandSkillMention
126 launchAgent
127- navigateToSession
128+ navigateToSession
129+ subscribeToEvents
130```
131 
132For a state or control-flow change:
133 
134```diff
135 on(save)
136- write content
137+ if content is unchanged
138+ return cached result
139+ write new content
140+ invalidate cache
141```
142 
143- 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:
144 
145```ts
146function expandSkill(command: string): string {
147 const skillName = command.slice(1);
148 return `use the ${skillName} skill`;
149}
150```
151 
152#### Guidance
153 
154Place 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.
155 
156You 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.
157 
158### Evidence
159 
160Concrete evidence that the change works. Show a before and after.
161 
162Screenshots are S-tier - when the environment is set up for it and the change is visual.
163 
164Execution-based evidence is A-tier. Test results, console output. Show the exact test that now fails and passes, using pseudocode.
165 
166### Merge Danger
167 
168Describe 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.
169 
170The 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.
171 

Discussion