pr
在撰写 PR 正文时使用。
- License 许可
- MIT
- 所属仓库
- luestr/skills
- 最近更新
- 2026-11-14
- Stars
- ★ 94
- Forks
- 1
01 前言 Front Matter
- name
- pr
- metadata
- { "credits": { "url": "https://github.com/humanlayer/skills/blob/main/plugins/show-me/skills/show-me/SKILL.md", "skill": "show-me", "author": "Dex Horthy", "organisation": "Humanlayer" }, "language": "zh-CN" }
- description
- 在撰写 PR 正文时使用。
02 资源文件 2
- 参考文档agents/openai.yaml96 B
- 参考文档CREDITS.md539 B
03 SKILL.md 正文
撰写 PR 正文时使用这个模板:
## 概要
<图表、diff 草图或树>
## 证据
- **之前:** <截图/输出/失败的测试运行>
**之后:** <截图/输出/通过的测试运行>
## 合并风险
**门:** <单向门或双向门>
<可选:描述>
**影响半径:** <一个词的描述>
<可选:合并的潜在连锁影响>
小节
跳过所有前言,行文保持简短。使用 GLOSSARY.md 里用户的领域语言。
概要
挑选能让关键点清晰的最小视图。
- 把逻辑或算法展示为伪代码:
on(save)
if content is unchanged
return cached result
write new content
return fresh result
- 把运行时控制流展示为调用树:
submitForm
createSession
persistPrompt
launchAgent
navigateToSession
- 把 UI 结构展示为组件树,包含要紧的状态和模块边界:
<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`;
}
指引
把每个视觉元素放在它所支撑的简短文字旁边。只保留回答用户当前问题所需的调用、文件、props、状态和边界,或解决当前讨论点所需的选项。
你可以用其中之一,也可以用几个,但不太可能全都用上。用你的判断力,不要淹没用户。
证据
改动确实有效的具体证据。展示之前和之后。
截图是 S 级——前提是环境已经为它准备好,而且改动是视觉性的。
基于执行的证据是 A 级。测试结果、控制台输出。用伪代码展示那个现在先失败、随后通过的确切测试。
合并风险
描述这是单向门还是双向门。双向门可以走回去,单向门不行。回滚成本低的 PR 风险更低。涉及破坏性操作或难以逆转的决策的改动都是单向门。
影响半径是此 PR 引入的改动的潜在影响或波及范围。考虑所有可能性。例如布局偏移、使用方受损、移动端响应式等。
04 同仓库更多 Skills
write-ublock-origin-filters
完整的 uBlock Origin (uBO) 静态过滤语法参考。编写 uBlock Origin 自定义过滤规则时使用此技能,涵盖广告拦截、隐私保护或内容过滤。包含基础网络过滤模式(||、*、^、|)、所有网络过滤选项($domain、$third-party、$important、$redirect、$removeparam、$csp、$replace、$header、$method、$denyallow、$badfilter、$all 等)、内容类型选项($script、$image、$stylesheet、$font、$media、$xhr、$popup、$document、$frame 等)、元素隐藏规则(## 选择器、实体匹配、主机名正则)、过程式元素隐藏过滤器(:has、:has-text、:matches-css、:upward、:xpath、:matches-path、:watch-attr 等)、动作操作符(:remove、:style、:remove-attr、:remove-class)、HTML 过滤器(##^)、响应头过滤(##^responseheader)、脚本注入(##+js())以及预处理指令(!#include、!#if)。当用户提到 uBlock Origin 过滤规则、uBO 语法、广告拦截规则、元素隐藏规则、过程式选择器、脚本注入或希望编写/调试任何 uBO 兼容过滤列表时触发。即使用户只是在编写或调试 uBlock Origin 过滤规则、创建自定义过滤列表或从 AdBlock Plus/AdGuard 迁移过滤规则到 uBO,也应使用此技能。
write-ublock-origin-filters
Complete uBlock Origin (uBO) static filter reference. Use this skill when writing or debugging uBO custom filters or filter lists for ad blocking, privacy or content filtering, or when migrating filters from AdBlock Plus/AdGuard. Covers network patterns (||, *, ^, |) and options ($domain, $third-party, $important, $redirect, $removeparam, $csp, $replace, $header, $method, $badfilter, $all), content-type options ($script, $image, $stylesheet, $font, $media, $xhr, $popup, $document, $frame), cosmetic filters (##, CSS selectors, entity matching), procedural filters (:has, :has-text, :matches-css, :upward, :xpath, :matches-path, :watch-attr), action operators (:remove, :style, :remove-attr), HTML filters (##^), response-header filtering (##^responseheader), scriptlet injection (##+js()), and pre-parsing directives (!#include, !#if). Trigger whenever the user mentions uBO syntax, ad blocking rules, element hiding, procedural selectors, scriptlet injection, or a uBO-compatible filter list.
write-tampermonkey-scripts
引导 AI 代理规划、编写、调试、测试和维护 Tampermonkey 用户脚本。当用户请求用户脚本、浏览器页面自动化、DOM 增强、Tampermonkey 元数据、GM_* API、@match、@grant、@run-at、@connect、跨源请求、SPA 页面集成或脚本注入任务时使用此技能,即使用户没有明确提及 Tampermonkey。
write-tampermonkey-scripts
Guide an AI agent through planning, writing, debugging, testing, and maintaining Tampermonkey userscripts. Use this skill whenever a user asks for a userscript, browser-page automation, DOM enhancement, Tampermonkey metadata, GM_* API, @match, @grant, @run-at, @connect, cross-origin request, SPA page integration, or script injection task, even when Tampermonkey is not named explicitly.
write-adguard-filters
编写 AdGuard 自定义过滤规则时使用此技能。涵盖基本规则语法、所有修饰符($domain/$third-party/$important/$redirect/$replace/$removeparam/$cookie/$csp 等)、外观规则(元素隐藏/CSS/Extended CSS 选择器)、HTML 过滤、JavaScript/脚本片段规则、非基本规则修饰符、预处理器指令和调试技巧。当用户提及 AdGuard 过滤规则、广告拦截规则语法、过滤器列表编写、ABP 语法兼容、元素隐藏规则、Extended CSS 选择器(:has/:contains/:matches-css 等)时触发。即使用户只是在编写或调试任何类型的广告过滤规则,也应使用此技能。
write-adguard-filters
Complete AdGuard filtering rules syntax reference. Use this skill when writing AdGuard custom filters. Covers basic rule syntax, all modifiers ($domain/$third-party/$important/$redirect/$replace/$removeparam/$cookie/$csp etc.), cosmetic rules (element hiding/CSS/Extended CSS selectors), HTML filtering, JavaScript/scriptlet rules, non-basic rule modifiers, preprocessor directives, and debugging. Trigger when user mentions AdGuard filtering rules, ad blocking rule syntax, filter list authoring, ABP syntax compatibility, element hiding rules, Extended CSS selectors (:has/:contains/:matches-css etc.). Use this skill even when the user is just writing or debugging any type of ad filtering rules.