<!-- markdown css tag --><section id="nice" data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px; color: black; padding: 0 10px; line-height: 1.6; word-spacing: 0px; letter-spacing: 0px; word-break: break-word; word-wrap: break-word; text-align: left; font-family: PingFangSC-Light;"><p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">摘要</strong>:本文系统讲解 Agent Skill 的核心概念、基础结构、五种设计模式及工程化开发流程,提供中英文对照的代码审查 Skill 模板,帮助读者从零掌握 Skill 编写与团队落地方法。</p>
<h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 22px; text-align: left; margin: 20px 10px 0px 0px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-family: STHeitiSC-Light; font-size: 18px; font-weight: bolder; display: inline-block; padding-left: 10px; border-left: 5px solid rgb(248,57,41);">一、引言:从"一次性 Prompt"到"可复用 Skill"</span><span class="suffix"></span></h2>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">你是否遇到过这样的困境?</p>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">每次让 AI 帮助审查代码,都要重复说一遍"请检查安全性、可维护性、性能和代码风格"。每次让 AI 生成 API 文档,都要花时间解释文档的格式要求。每次让 AI 处理数据,都要叮嘱它不要修改原始数据、要保留处理日志。</p>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">这些重复的解释,本质上都是一次性 Prompt 的局限。</p>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">当我们把 AI 应用到真实工作中,会发现有些任务会反复出现,每次都要重新解释规则不仅耗时,还会导致输出不稳定——有时候 AI 审查得仔细,有时候又漏掉某些检查项。更糟糕的是,这些规则难以共享给团队成员,大家各自为战,风格不统一。</p>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">Agent Skill 正是为解决这些问题而生的。</p>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">Skill 不是单条 Prompt,而是一个可复用、可测试、可迭代的结构化能力包。它把任务相关的指令、流程、边界规则和输出标准封装在一起,让 AI 在需要时自动加载、按规范执行、产出稳定结果。</p>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">本文将带你从零理解 Skill 的核心概念,掌握编写高质量 Skill 的方法,并提供一个可直接复用的实战模板。读完本文,你将能够:</p>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">理解 Skill 与 Prompt、MCP、Rules 等相关概念的区别</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">掌握 Skill 的标准结构和编写规范</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">学会根据任务类型选择合适的设计模式</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">设计并测试一个最小可用的 Skill</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">在团队中落地 Skill 治理流程</section></li></ul>
<h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 22px; text-align: left; margin: 20px 10px 0px 0px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-family: STHeitiSC-Light; font-size: 18px; font-weight: bolder; display: inline-block; padding-left: 10px; border-left: 5px solid rgb(248,57,41);">二、Skill 到底是什么?</span><span class="suffix"></span></h2>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">2.1 一个更精确的定义</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">经过对多篇权威资料的分析,我们把 Agent Skill 定义为:</p>
<blockquote class="multiquote-1" data-tool="mdnice编辑器" style="border: none; font-style: normal; padding: 10px; position: relative; line-height: 1.8; border-radius: 0px 0px 10px 10px; background: #000; box-shadow: #84A1A8 0px 10px 15px; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAACVBMVEUAAAD///////9zeKVjAAAAA3RSTlP//wDXyg1BAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAzklEQVRYhe2XwQ7EIAhEZ2b9/19m01tXI2BJ42Hl0KSBeR3QGEuhFirqcQA4AAAtW2gACwArtmDXg88B5uRU1ENpPbftA3MNIOtgpoeKerSafAq4Nc77So6oD4OFZ7cPmACY43ggaFXfp7Wq7wvasj5uwY9+Zlo0wN2HKiOAve1gDKEY+juARQC+7QC2f4gWHChMIGoO0BH0AEAXwEWaHjgIAIwkLDpg5ABrU1D8DT+pTJGXUq5snmiTQrtLfl76SuUup9O7Ks9vHw4AdcAXwOgdm5XePf8AAAAASUVORK5CYII='); background-repeat: no-repeat; background-position-x: 1rem; background-position-y: 0.75rem; background-size: 3.4rem; display: block; font-size: 0.9em; overflow: auto; overflow-scrolling: touch; border-left: 3px solid rgba(0, 0, 0, 0.4); background-color: rgba(0, 0, 0, 0.05); color: #6a737d; padding-top: 10px; padding-bottom: 10px; padding-left: 20px; padding-right: 10px; margin-bottom: 20px; margin-top: 20px;"><span style="display: inline; color: transparent; font-size: 4em; font-family: Arial,serif; line-height: 1em; font-weight: 700;"> </span>
<p style="display: inline; padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">Skill 是一个可复用的、结构化的 Agent 行为包,用 SKILL.md 声明触发条件、执行流程、边界规则、输出标准,并可通过脚本、参考文档和资源文件增强确定性与复用性。</p>
<span style="float: right; display: inline; color: #FFF; font-size: 3em; line-height: 1em; font-weight: 500;">”</span></blockquote>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">这个定义有几个关键点:</p>
<section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table style="display: table; text-align: left;">
<thead>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">关键词</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">含义</th>
</tr>
</thead>
<tbody style="border: 0;">
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">可复用</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">一次编写,多次使用,不是每次都要重新解释</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">结构化</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">有固定格式、元数据、明确的组成部分</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">行为包</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">封装了"怎么做"的完整指导,而不仅仅是"做什么"</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">可测试</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">可以设计测试用例验证其有效性</td>
</tr>
</tbody>
</table>
</section><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">2.2 Skill 不是 Prompt</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">很多人容易把 Skill 和 Prompt 混为一谈,但它们有本质区别:</p>
<section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table style="display: table; text-align: left;">
<thead>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">维度</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">Prompt</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">Skill</th>
</tr>
</thead>
<tbody style="border: 0;">
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">使用方式</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">一次性输入</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">可复用能力包</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">可维护性</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">低,容易散落在对话中</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">高,文件化管理</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">可测试性</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">弱,难以系统验证</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">可设计测试集</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">可共享性</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">复制粘贴,容易走样</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">目录/包/Git 版本化管理</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">可扩展性</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">有限</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">可接脚本、资源、参考文档</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">适合场景</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">临时任务</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">高频、复杂、团队化任务</td>
</tr>
</tbody>
</table>
</section><p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">举一个形象的例子:</p>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">Prompt</strong> 像是点餐时口头告诉服务员"我要一份不加辣的宫保鸡丁,少放花生,多加点葱"</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">Skill</strong> 像是把这道菜的完整菜谱写下来,以后任何服务员都能按照菜谱做出标准口味</section></li></ul>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">2.3 Skill 的本质</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">Skill 的核心不是"写更好的提示词",而是围绕<strong style="font-weight: border; color: rgb(248,57,41);">任务</strong>、<strong style="font-weight: border; color: rgb(248,57,41);">工具</strong>、<strong style="font-weight: border; color: rgb(248,57,41);">流程</strong>、<strong style="font-weight: border; color: rgb(248,57,41);">资源</strong>和<strong style="font-weight: border; color: rgb(248,57,41);">输出边界</strong>设计结构化行为单元。</p>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">这意味着一个好的 Skill 需要考虑:</p>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">任务边界</strong>:这个 Skill 负责什么、不负责什么</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">工具配合</strong>:需要调用哪些工具、脚本或外部系统</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">流程步骤</strong>:完成任务的标准步骤是什么</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">资源依赖</strong>:需要哪些参考文档、模板或数据</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">输出标准</strong>:结果应该长什么样、如何验证</section></li></ul>
<h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 22px; text-align: left; margin: 20px 10px 0px 0px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-family: STHeitiSC-Light; font-size: 18px; font-weight: bolder; display: inline-block; padding-left: 10px; border-left: 5px solid rgb(248,57,41);">三、Skill 的基础结构</span><span class="suffix"></span></h2>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">3.1 最小结构</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">一个 Skill 可以极其简单,只需要一个文件:</p>
<pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px;"><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; background: #282c34; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; -webkit-overflow-scrolling: touch;">skill-name/<br>└── SKILL.md<br></code></pre>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">SKILL.md 是 Skill 的核心入口,包含所有必要的指令和元数据。</p>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">3.2 完整目录结构</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">对于更复杂的 Skill,常见的完整结构是:</p>
<pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px;"><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; background: #282c34; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; -webkit-overflow-scrolling: touch;">skill-name/<br>├── SKILL.md <span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># 必需:YAML frontmatter + Markdown 指令</span><br>├── sc ripts/ <span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># 可选:可执行脚本(Python、Shell、Node 等)</span><br>├── references/ <span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># 可选:按需加载的参考文档</span><br>└── assets/ <span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># 可选:模板、资源文件</span><br></code></pre>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">各部分的职责分工:</p>
<section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table style="display: table; text-align: left;">
<thead>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">目录/文件</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">作用</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">适合放什么</th>
</tr>
</thead>
<tbody style="border: 0;">
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">SKILL.md</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">Skill 的入口和主要指令</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">元数据、触发说明、执行步骤、输出格式、边界条件</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">sc ripts/</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">确定性执行逻辑</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">验证器、转换器、自动化检查脚本</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">references/</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">详细知识,不默认塞入上下文</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">API 文档、规范、长清单、领域规则</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">assets/</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">资源文件</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">模板、图片、配置样例、样式文件</td>
</tr>
</tbody>
</table>
</section><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">3.3 SKILL.md 的格式规范</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">SKILL.md 由两部分组成:</p>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">YAML frontmatter</strong>:机器可读的元数据</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">Markdown body</strong>:给模型读的操作说明</section></li></ul>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">基础格式:</p>
<pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px;"><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; background: #282c34; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; -webkit-overflow-scrolling: touch;"><span class="hljs-me ta" style="color: #61aeee; line-height: 26px;">---</span><br><span class="hljs-attr" style="color: #d19a66; line-height: 26px;">name:</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">my-skill</span><br><span class="hljs-attr" style="color: #d19a66; line-height: 26px;">desc ription:</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Use</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">this</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">skill</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">when</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">the</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">user</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">needs</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">to</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">do</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">something...</span><br><span class="hljs-me ta" style="color: #61aeee; line-height: 26px;">---</span><br><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># My Skill</span><br><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">## Purpose</span><br><br><span class="hljs-string" style="color: #98c379; line-height: 26px;">This</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">skill</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">helps</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">the</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">agent</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">achieve</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">X.</span><br><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">## Steps</span><br><br><span class="hljs-number" style="color: #d19a66; line-height: 26px;">1</span><span class="hljs-string" style="color: #98c379; line-height: 26px;">.</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">First</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">step...</span><br><span class="hljs-number" style="color: #d19a66; line-height: 26px;">2</span><span class="hljs-string" style="color: #98c379; line-height: 26px;">.</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Second</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">step...</span><br></code></pre>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">3.4 必填字段与可选字段</span><span class="suffix" style="display: none;"></span></h3>
<section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table style="display: table; text-align: left;">
<thead>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">字段</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">是否必填</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">作用</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">关键要求</th>
</tr>
</thead>
<tbody style="border: 0;">
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">name</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">是</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">Skill 唯一标识</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">小写字母、数字、短横线;通常与目录名一致</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">desc ription</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">是</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">让模型判断什么时候用这个 Skill</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">要写"做什么"和"何时用"</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">license</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">否</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">许可证信息</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">如 MIT、Apache 2.0</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">compatibility</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">否</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">运行环境或依赖说明</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">平台相关信息</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">me tadata</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">否</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">作者、版本、分类、标签</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">便于治理和检索</td>
</tr>
</tbody>
</table>
</section><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">3.5 name 字段的写法规范</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">好例子</strong>:</p>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: rgb(271,93,108);">name: pdf-processing</code></section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: rgb(271,93,108);">name: code-review</code></section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: rgb(271,93,108);">name: data-analysis</code></section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: rgb(271,93,108);">name: api-design-check</code></section></li></ul>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">坏例子</strong>:</p>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: rgb(271,93,108);">name: PDF-Processing</code> # 不要大写</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: rgb(271,93,108);">name: -pdf</code> # 不要以短横线开头</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: rgb(271,93,108);">name: pdf--processing</code> # 不要连续短横线</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: rgb(271,93,108);">name: my cool skill</code> # 不要空格</section></li></ul>
<h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 22px; text-align: left; margin: 20px 10px 0px 0px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-family: STHeitiSC-Light; font-size: 18px; font-weight: bolder; display: inline-block; padding-left: 10px; border-left: 5px solid rgb(248,57,41);">四、触发机制:desc ription 怎么写?</span><span class="suffix"></span></h2>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">4.1 作用原理</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">Skill 的触发不是靠硬编码关键词,而是让模型根据 desc ription 判断任务是否匹配。</p>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">这意味着:</p>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">用户说"帮我看看这段代码"可能被 Skill 识别为代码审查请求</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">用户说"检查一下 API 设计合不合理"也可能触发代码审查 Skill</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">但"帮我写一首诗"不应该触发代码审查</section></li></ul>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">desc ription 写得好不好,直接决定 Skill 能否被正确触发。</p>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">4.2 好 desc ription 的组成</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">一个有效的 desc ription 应该包含:</p>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">这个 Skill 做什么</strong>:简明扼要描述核心能力</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">用户什么时候会需要它</strong>:真实使用场景</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">用户可能怎么表达</strong>:包含触发短语和关键词</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">哪些情况不应该触发它</strong>:负面案例(可选但推荐)</section></li></ul>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">好例子</strong>:</p>
<pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px;"><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; background: #282c34; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; -webkit-overflow-scrolling: touch;"><span class="hljs-attr" style="color: #d19a66; line-height: 26px;">desc ription:</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">|<br> Analyze CSV, TSV, Excel, and tabular data files. Use this skill when the<br> user wants to clean, summarize, transform, compare, visualize, or derive<br> insights from structured data, even if they do not explicitly say "data analysis".<br> Do not use for real-time streaming data or binary file formats.<br></span></code></pre>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">坏例子</strong>:</p>
<pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px;"><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; background: #282c34; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; -webkit-overflow-scrolling: touch;"><span class="hljs-attr" style="color: #d19a66; line-height: 26px;">desc ription:</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Helps</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">with</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">data.</span><br></code></pre>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">4.3 写作原则</span><span class="suffix" style="display: none;"></span></h3>
<section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table style="display: table; text-align: left;">
<thead>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">原则</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">说明</th>
</tr>
</thead>
<tbody style="border: 0;">
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">使用用户会说的话</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">而不仅仅是内部术语</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">说明任务意图</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">而不是复述内部步骤</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">包含触发词但不要堆砌</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">适度覆盖,过多反而降低准确性</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">加上"不适用场景"</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">对容易误触发的 Skill 尤为重要</td>
</tr>
</tbody>
</table>
</section><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">4.4 常见描述模板</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">数据分析类</strong>:</p>
<pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px;"><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; background: #282c34; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; -webkit-overflow-scrolling: touch;"><span class="hljs-attr" style="color: #d19a66; line-height: 26px;">desc ription:</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">|<br> Analyze CSV, TSV, Excel, and tabular data files. Use when the user wants<br> to clean, summarize, transform, compare, visualize, or derive insights<br> from structured data, even if they do not explicitly say "data analysis".<br></span></code></pre>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">代码审查类</strong>:</p>
<pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px;"><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; background: #282c34; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; -webkit-overflow-scrolling: touch;"><span class="hljs-attr" style="color: #d19a66; line-height: 26px;">desc ription:</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">|<br> Review code changes, pull requests, diffs, or snippets for correctness,<br> security, maintainability, performance, and style. Use when the user asks<br> to review, check, audit, inspect, or give feedback on code.<br></span></code></pre>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">API 规范类</strong>:</p>
<pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px;"><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; background: #282c34; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; -webkit-overflow-scrolling: touch;"><span class="hljs-attr" style="color: #d19a66; line-height: 26px;">desc ription:</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">|<br> Enforce API development standards when adding, modifying, or deleting API<br> endpoints. Use when the user mentions OpenAPI, endpoint changes, backward<br> compatibility, API documentation, contract tests, or unit test generation.<br></span></code></pre>
<h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 22px; text-align: left; margin: 20px 10px 0px 0px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-family: STHeitiSC-Light; font-size: 18px; font-weight: bolder; display: inline-block; padding-left: 10px; border-left: 5px solid rgb(248,57,41);">五、渐进式加载:解决上下文膨胀</span><span class="suffix"></span></h2>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">5.1 问题背景</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">如果我们把所有 Skill 的完整内容都塞进 AI 的上下文,会发生什么?</p>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">上下文急剧膨胀,处理速度变慢</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">不同 Skill 的规则相互干扰</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">大量低频信息占用宝贵 token 预算</section></li></ul>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">5.2 三层加载机制</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">Skill 的核心机制是渐进式加载(Progressive Disclosure),只在需要时加载对应层级的内容:</p>
<section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table style="display: table; text-align: left;">
<thead>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">层级</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">加载内容</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">加载时机</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">价值</th>
</tr>
</thead>
<tbody style="border: 0;">
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">L1 目录层</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">name + desc ription</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">会话开始或系统扫描时</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">让模型知道有哪些 Skill 可用</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">L2 指令层</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">完整 SKILL.md body</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">模型判断需要使用该 Skill 时</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">获得具体流程、边界和输出规则</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">L3 资源层</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">sc ripts/、references/、assets/</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">指令明确要求或任务需要时</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">按需读取长文档、脚本和模板</td>
</tr>
</tbody>
</table>
</section><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">5.3 这个机制的价值</span><span class="suffix" style="display: none;"></span></h3>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">不把所有规则塞进上下文:只加载当前任务需要的</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">只在需要时读取完整内容:节省 token</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">长文档拆到 references/ 后可按需加载:避免上下文爆炸</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">让大量 Skill 可以共存:一个 Agent 可以管理数十个 Skill</section></li></ul>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">5.4 知识组织的大小建议</span><span class="suffix" style="display: none;"></span></h3>
<section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table style="display: table; text-align: left;">
<thead>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">层级</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">建议大小</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">内容</th>
</tr>
</thead>
<tbody style="border: 0;">
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">Frontmatter</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">约 100 tokens</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">name + desc ription</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">主文件</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">2K - 5K tokens</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">核心流程、决策树、步骤</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">参考文档</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">单个 1K - 3K tokens</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">详细规则、示例、清单</td>
</tr>
</tbody>
</table>
</section><h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 22px; text-align: left; margin: 20px 10px 0px 0px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-family: STHeitiSC-Light; font-size: 18px; font-weight: bolder; display: inline-block; padding-left: 10px; border-left: 5px solid rgb(248,57,41);">六、五种核心设计模式</span><span class="suffix"></span></h2>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">根据实际任务类型,Skill 应该采用不同的内部结构。以下是五种最常用的设计模式。</p>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">6.1 线性流程(Linear Flow)</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">适用场景</strong>:部署、安装、导出、迁移等明确步骤的操作。</p>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">结构特点</strong>:按顺序执行,每步结果作为下一步输入。</p>
<pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px;"><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; background: #282c34; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; -webkit-overflow-scrolling: touch;"><span class="hljs-section" style="color: #e06c75; line-height: 26px;">## Workflow</span><br><br><span class="hljs-section" style="color: #e06c75; line-height: 26px;">### Step 1: 准备环境</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">- </span>检查依赖版本<br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">- </span>验证权限<br><br><span class="hljs-section" style="color: #e06c75; line-height: 26px;">### Step 2: 执行部署</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">- </span>执行部署脚本<br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">- </span>监控进度<br><br><span class="hljs-section" style="color: #e06c75; line-height: 26px;">### Step 3: 验证结果</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">- </span>运行健康检查<br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">- </span>确认服务可用<br></code></pre>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">6.2 决策树(Decision Tree)</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">适用场景</strong>:多产品选型、多路径诊断、需要根据条件分支的场景。</p>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">结构特点</strong>:条件分支 + 按需加载,每个分支处理一种情况。</p>
<pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px;"><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; background: #282c34; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; -webkit-overflow-scrolling: touch;"><span class="hljs-section" style="color: #e06c75; line-height: 26px;">## Decision Tree</span><br><br><span class="hljs-section" style="color: #e06c75; line-height: 26px;">### 用户的需求类型?</span><br><br>├─ 数据分析<br>│ └─ 进入数据分析流程<br>├─ 代码审查<br>│ └─ 进入代码审查流程<br>└─ 文档生成<br> └─ 进入文档生成流程<br></code></pre>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">6.3 循环迭代(Loop Iteration)</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">适用场景</strong>:写作、设计、代码改进等需要反复调整的任务。</p>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">结构特点</strong>:do → validate → refine → loop,直到满足质量标准或达到最大迭代次数。</p>
<pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px;"><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; background: #282c34; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; -webkit-overflow-scrolling: touch;"><span class="hljs-section" style="color: #e06c75; line-height: 26px;">## Workflow</span><br><br><span class="hljs-section" style="color: #e06c75; line-height: 26px;">### Iteration Loop</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;"><br>1. </span><span class="hljs-strong" style="font-weight: bold; line-height: 26px;">**Generate**</span>: 根据要求生成初稿<br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">2. </span><span class="hljs-strong" style="font-weight: bold; line-height: 26px;">**Validate**</span>: 运行验证脚本检查质量<br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">3. </span><span class="hljs-strong" style="font-weight: bold; line-height: 26px;">**Refine**</span>: 根据验证结果改进<br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">4. </span><span class="hljs-strong" style="font-weight: bold; line-height: 26px;">**Loop**</span>: 如果未通过验证且还有迭代次数,返回步骤 1<br><br><span class="hljs-section" style="color: #e06c75; line-height: 26px;">### Exit Conditions</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">- </span>验证通过<br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">- </span>达到最大迭代次数(默认 3 次)<br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">- </span>用户手动确认完成<br></code></pre>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">6.4 接力棒循环(Relay Loop)</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">适用场景</strong>:长期项目、跨 session 持续推进的任务。</p>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">结构特点</strong>:每次处理一小部分,保存状态,下一次从断点继续。</p>
<pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px;"><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; background: #282c34; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; -webkit-overflow-scrolling: touch;"><span class="hljs-section" style="color: #e06c75; line-height: 26px;">## Workflow</span><br><br><span class="hljs-section" style="color: #e06c75; line-height: 26px;">### Session Start</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">1. </span>读取项目状态文件<br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">2. </span>确定当前阶段和待办项<br><br><span class="hljs-section" style="color: #e06c75; line-height: 26px;">### Session Work</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">3. </span>处理当前阶段任务<br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">4. </span>更新状态文件<br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">5. </span>记录下次从哪里继续<br><br><span class="hljs-section" style="color: #e06c75; line-height: 26px;">### Session End</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">6. </span>保存上下文到状态文件<br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">7. </span>生成进度报告<br></code></pre>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">6.5 多阶段 + 检查点(Multi-Stage with Gates)</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">适用场景</strong>:咨询、研究、产品发现等有明确阶段和决策点的项目。</p>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">结构特点</strong>:阶段之间有门禁(Go/No-Go),只有满足条件才能进入下一阶段。</p>
<pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px;"><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; background: #282c34; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; -webkit-overflow-scrolling: touch;"><span class="hljs-section" style="color: #e06c75; line-height: 26px;">## Stages</span><br><br><span class="hljs-section" style="color: #e06c75; line-height: 26px;">### Stage 1: 需求理解</span><br><span class="hljs-strong" style="font-weight: bold; line-height: 26px;">**Gate**</span>: 是否有清晰的目标和约束?<br><br><span class="hljs-section" style="color: #e06c75; line-height: 26px;">### Stage 2: 方案设计</span><br><span class="hljs-strong" style="font-weight: bold; line-height: 26px;">**Gate**</span>: 方案是否覆盖所有关键需求?<br><br><span class="hljs-section" style="color: #e06c75; line-height: 26px;">### Stage 3: 实现规划</span><br><span class="hljs-strong" style="font-weight: bold; line-height: 26px;">**Gate**</span>: 实现计划是否可行?<br><br><span class="hljs-section" style="color: #e06c75; line-height: 26px;">### Stage 4: 执行与验证</span><br><span class="hljs-strong" style="font-weight: bold; line-height: 26px;">**Gate**</span>: 所有验收标准是否满足?<br></code></pre>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">6.6 模式选择决策树</span><span class="suffix" style="display: none;"></span></h3>
<pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px;"><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; background: #282c34; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; -webkit-overflow-scrolling: touch;">你的 Skill 需要做什么?<br>├─ 执行一个明确步骤的操作<br>│ └─ 线性流程<br>├─ 在大量选项中选正确方向<br>│ └─ 决策树 + 按需加载<br>├─ 在单次会话中反复做、验、改<br>│ └─ 循环迭代<br>├─ 跨多个 session 持续推进长期项目<br>│ └─ 接力棒循环<br>├─ 跨多天 / 多周,有阶段和 Go/No-Go 决策<br>│ └─ 多阶段 + 检查点<br>└─ 需要模型深度分析,而不是快速执行<br> └─ 思维框架(参考模式)<br></code></pre>
<h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 22px; text-align: left; margin: 20px 10px 0px 0px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-family: STHeitiSC-Light; font-size: 18px; font-weight: bolder; display: inline-block; padding-left: 10px; border-left: 5px solid rgb(248,57,41);">七、Skill 开发工程化流程</span><span class="suffix"></span></h2>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">7.1 为什么需要工程化</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">Skill 开发不是"写完 prompt 就完事了",而是一个需要测试、评估、迭代的工程过程。原因是:</p>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">泛化 vs 过拟合</strong>:不要为了某个测试样例写死规则,要提取可迁移的行为模式</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">解释为什么</strong>:现代模型更容易遵守有原因、有上下文的规则,而不是机械堆叠 ALWAYS / NEVER</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">脚本化重复逻辑</strong>:如果模型每次都要写同样的小脚本,就应该把它沉淀到 sc ripts/</section></li></ul>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">7.2 TDD 方法论:红绿重构</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">Skill 开发可以借鉴 TDD 的思路:</p>
<section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table style="display: table; text-align: left;">
<thead>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">阶段</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">行动</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">目标</th>
</tr>
</thead>
<tbody style="border: 0;">
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">RED</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">不带 Skill 运行,观察模型如何失败</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">理解当前问题所在</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">GREEN</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">写最小 Skill,让模型通过关键场景</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">快速验证假设</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">REFACTOR</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">添加反驳、边界、验证,堵住模型偷懒路径</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">提升鲁棒性</td>
</tr>
</tbody>
</table>
</section><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">7.3 测试设计</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">在开发 Skill 之前,需要准备测试用例:</p>
<section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table style="display: table; text-align: left;">
<thead>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">测试类型</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">数量</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">说明</th>
</tr>
</thead>
<tbody style="border: 0;">
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">应触发请求</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">10 个</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">应该激活这个 Skill 的真实用户请求</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">不应触发请求</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">5 个</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">不应该激活这个 Skill 的请求</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">边界请求</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">3 个</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">模糊的、可能触发也可能不触发的请求</td>
</tr>
</tbody>
</table>
</section><p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">验证清单:</p>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] 是否应该触发却没触发</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] 是否不该触发却触发了</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] desc ription 是否太宽或太窄</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] 是否包含用户真实表达方式</section></li></ul>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">7.4 三类子 Agent(可选)</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">对于高价值 Skill,可以引入三类子 Agent 进行系统化评估:</p>
<section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table style="display: table; text-align: left;">
<thead>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">角色</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">作用</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">关键价值</th>
</tr>
</thead>
<tbody style="border: 0;">
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">Grader</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">判断断言是否通过,并评估断言本身是否有价值</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">避免"弱断言带来的虚假信心"</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">Comparator</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">盲评 with_skill 与 without_skill 的输出</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">降低偏见,判断实际提升</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">Analyzer</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">分析为什么某个版本更好、哪里需要改</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">把反馈转成可执行迭代建议</td>
</tr>
</tbody>
</table>
</section><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">7.5 迭代原则</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">每次改进都问:</p>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">这是通用问题,还是个别案例?</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">能不能用一句原则解决?</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">能不能放 references?</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">能不能用脚本解决?</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">是否会增加误触发?</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">是否会增加主文件长度但收益很低?</section></li></ul>
<h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 22px; text-align: left; margin: 20px 10px 0px 0px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-family: STHeitiSC-Light; font-size: 18px; font-weight: bolder; display: inline-block; padding-left: 10px; border-left: 5px solid rgb(248,57,41);">八、Skill 与相关概念的区别</span><span class="suffix"></span></h2>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">在 Agent 生态中,Skill 不是孤立存在的,它与多个相关概念相互配合。</p>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">8.1 Skill vs MCP</span><span class="suffix" style="display: none;"></span></h3>
<section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table style="display: table; text-align: left;">
<thead>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">概念</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">作用</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">关系</th>
</tr>
</thead>
<tbody style="border: 0;">
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">MCP</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">解决"连接能力"</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">AI 能访问数据库、GitHub、Slack 等外部系统</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">Skill</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">解决"使用方法"</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">AI 应该按什么步骤、什么标准、什么边界去使用这些能力</td>
</tr>
</tbody>
</table>
</section><p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">最强组合</strong>:</p>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">MCP = 工具入口</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">Skill = 工作流说明书</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">sc ripts = 确定性执行器</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">references = 领域知识库</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">assets = 输出模板</section></li></ul>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">8.2 Skill vs Rules</span><span class="suffix" style="display: none;"></span></h3>
<section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table style="display: table; text-align: left;">
<thead>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">概念</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">作用</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">关系</th>
</tr>
</thead>
<tbody style="border: 0;">
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">Rules</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">全局约束</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">适用于所有任务的基本规则,如安全策略、伦理边界</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">Skill</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">任务特定指导</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">继承全局规则,并在特定任务范围内细化</td>
</tr>
</tbody>
</table>
</section><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">8.3 Skill vs Slash Command</span><span class="suffix" style="display: none;"></span></h3>
<section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table style="display: table; text-align: left;">
<thead>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">概念</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">作用</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">关系</th>
</tr>
</thead>
<tbody style="border: 0;">
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">Slash Command</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">固定快捷动作</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">显式调用的快捷入口,如 /review、/deploy</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">Skill</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">可复用能力包</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">可通过 desc ription 自动触发,也可显式调用</td>
</tr>
</tbody>
</table>
</section><p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">可以理解为:Slash Command 是 Skill 的显式入口之一。</p>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">8.4 各概念分工</span><span class="suffix" style="display: none;"></span></h3>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">Prompt</strong> 是一句话。</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">Skill</strong> 是一个可复用工作流。</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">MCP</strong> 是工具入口。</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">Rules</strong> 是全局约束。</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">Slash Command</strong> 是快捷动作。</section></li></ul>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">好的 Agent 系统,需要把它们分工清楚。</p>
<h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 22px; text-align: left; margin: 20px 10px 0px 0px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-family: STHeitiSC-Light; font-size: 18px; font-weight: bolder; display: inline-block; padding-left: 10px; border-left: 5px solid rgb(248,57,41);">九、好 Skill 的共同特征与质量检查</span><span class="suffix"></span></h2>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">9.1 好 Skill 的八大特征</span><span class="suffix" style="display: none;"></span></h3>
<section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table style="display: table; text-align: left;">
<thead>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">特征</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">说明</th>
</tr>
</thead>
<tbody style="border: 0;">
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">触发明确</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">desc ription 写得准,能正确判断何时使用</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">主体精简</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">只写必要步骤,不塞入低频信息</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">资源分层</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">长资料拆到 references/,按需加载</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">步骤可验证</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">关键环节有 checklist 或验证脚本</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">输出固定</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">结果结构可比较,格式稳定</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">边界清楚</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">知道何时不要用,有负面案例</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">可迭代</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">反馈能沉淀回文件,持续改进</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">可治理</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">团队能版本化和审查</td>
</tr>
</tbody>
</table>
</section><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">9.2 开发检查清单</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">开发前</strong>:</p>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] 是否明确了 2-3 个真实使用场景</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] 是否知道用户会怎么表达需求</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] 是否明确不适用场景</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] 是否选择了合适设计模式</section></li></ul>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">文件结构</strong>:</p>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] 目录名是 kebab-case</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] 主文件名严格为 SKILL.md</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] name 与目录名一致</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] desc ription 包含做什么和何时用</section></li></ul>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">指令质量</strong>:</p>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] 每一步只做一件事</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] 有明确输入要求</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] 缺输入时知道如何提问</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] 有明确输出格式</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] 高风险操作默认安全</section></li></ul>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">测试</strong>:</p>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] 10 个应触发请求</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] 5 个不应触发请求</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] 同一请求重复运行 3 次</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">[ ] 与无 Skill 输出对比</section></li></ul>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">9.3 推荐指标</span><span class="suffix" style="display: none;"></span></h3>
<section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table style="display: table; text-align: left;">
<thead>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">指标</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">说明</th>
</tr>
</thead>
<tbody style="border: 0;">
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">自动触发率</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">应触发请求中成功触发比例</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">误触发率</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">不应触发请求中错误触发比例</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">一次通过率</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">不经人工修正完成任务比例</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">验证通过率</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">脚本或 checklist 通过比例</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">输出一致性</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">同类任务输出是否稳定</td>
</tr>
</tbody>
</table>
</section><h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 22px; text-align: left; margin: 20px 10px 0px 0px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-family: STHeitiSC-Light; font-size: 18px; font-weight: bolder; display: inline-block; padding-left: 10px; border-left: 5px solid rgb(248,57,41);">十、实战模板:代码审查 Skill(中英文对照)</span><span class="suffix"></span></h2>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">10.1 英文模板</span><span class="suffix" style="display: none;"></span></h3>
<pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px;"><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; background: #282c34; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; -webkit-overflow-scrolling: touch;"><span class="hljs-me ta" style="color: #61aeee; line-height: 26px;">---</span><br><span class="hljs-attr" style="color: #d19a66; line-height: 26px;">name:</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">code-review</span><br><span class="hljs-attr" style="color: #d19a66; line-height: 26px;">desc ription:</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">|<br> Review code changes, pull requests, diffs, or snippets for correctness,<br> security, maintainability, performance, and style. Use when the user asks<br> to review, check, audit, inspect, or give feedback on code. Trigger phrases<br> include "review this code", "check for bugs", "look at my PR", "audit the<br> changes", or "what do you think of this implementation".<br> Do not use for style-only requests without substance.<br></span><span class="hljs-attr" style="color: #d19a66; line-height: 26px;">license:</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">MIT</span><br><span class="hljs-attr" style="color: #d19a66; line-height: 26px;">me tadata:</span><br> <span class="hljs-attr" style="color: #d19a66; line-height: 26px;">author:</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">your-team</span><br> <span class="hljs-attr" style="color: #d19a66; line-height: 26px;">version:</span> <span class="hljs-number" style="color: #d19a66; line-height: 26px;">0.1</span><span class="hljs-number" style="color: #d19a66; line-height: 26px;">.0</span><br><span class="hljs-me ta" style="color: #61aeee; line-height: 26px;">---</span><br><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;"># Code Review Skill</span><br><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">## Purpose</span><br><br><span class="hljs-string" style="color: #98c379; line-height: 26px;">This</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">skill</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">helps</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">the</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">agent</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">perform</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">thorough,</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">consistent</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">code</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">reviews</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">by</span><br><span class="hljs-string" style="color: #98c379; line-height: 26px;">following</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">a</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">structured</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">review</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">process</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">and</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">checklist.</span><br><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">## When to Use</span><br><br><span class="hljs-attr" style="color: #d19a66; line-height: 26px;">Use when:</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">User</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">asks</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">to</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">review</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">code,</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">PR,</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">or</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">diff</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">User</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">wants</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">feedback</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">on</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">implementation</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">quality</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">User</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">requests</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">bug</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">hunting</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">or</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">security</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">audit</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">User</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">asks</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">to</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">check</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">code</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">style</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">and</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">best</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">practices</span><br><br><span class="hljs-attr" style="color: #d19a66; line-height: 26px;">Do not use when:</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">User</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">asks</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">for</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">style-only</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">changes</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">without</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">substance</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">User</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">just</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">wants</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">auto-formatting</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">(not</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">review)</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Request</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">is</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">about</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">documentation</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">only</span><br><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">## Review Process</span><br><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">### Step 1: Understand Context</span><br><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Identify</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">the</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">programming</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">language</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">and</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">fr amework</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Note</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">the</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">purpose</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">of</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">the</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">changed</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">code</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Check</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">if</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">tests</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">are</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">included</span><br><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">### Step 2: Security Review</span><br><br><span class="hljs-attr" style="color: #d19a66; line-height: 26px;">Check for:</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">SQL</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">injection</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">vulnerabilities</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Command</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">injection</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">risks</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Sensitive</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">data</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">exposure</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Authentication/authorization</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">issues</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Input</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">validation</span><br><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">### Step 3: Correctness Review</span><br><br><span class="hljs-attr" style="color: #d19a66; line-height: 26px;">Check for:</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Logic</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">errors</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Off-by-one</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">errors</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-literal" style="color: #56b6c2; line-height: 26px;">Null</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">pointer</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">/</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">undefined</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">handling</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Race</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">conditions</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Resource</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">leaks</span><br><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">### Step 4: Performance Review</span><br><br><span class="hljs-attr" style="color: #d19a66; line-height: 26px;">Check for:</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">N+1</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">query</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">problems</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Unnecessary</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">iterations</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Missing</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">indexes</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Memory</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">inefficiencies</span><br><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">### Step 5: Maintainability Review</span><br><br><span class="hljs-attr" style="color: #d19a66; line-height: 26px;">Check for:</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Code</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">duplication</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Naming</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">clarity</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Function</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">complexity</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">(></span> <span class="hljs-number" style="color: #d19a66; line-height: 26px;">20</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">lines</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">=</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">red</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">flag)</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Missing</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">documentation</span><br><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">## Output Format</span><br><br><span class="hljs-attr" style="color: #d19a66; line-height: 26px;">Return review in this structure:</span><br><br><span class="hljs-string" style="color: #98c379; line-height: 26px;">```markdown</span><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">## Code Review Summary</span><br><br><span class="hljs-string" style="color: #98c379; line-height: 26px;">**Overall**:</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">[Pass</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">/</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Needs</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Work</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">/</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Needs</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Discussion]</span><br><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">## Issues Found</span><br><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">### Critical</span><br><span class="hljs-number" style="color: #d19a66; line-height: 26px;">1</span><span class="hljs-string" style="color: #98c379; line-height: 26px;">.</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">[Issue</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">desc ription]</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">(line</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">X)</span><br> <span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">[Why</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">it's</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">a</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">problem]</span><br> <span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">[Suggested</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">fix]</span><br><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">### Minor</span><br><span class="hljs-string" style="color: #98c379; line-height: 26px;">...</span><br><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">## Recommendations</span><br><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">[Optional</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">improvements</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">not</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">blocking</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">merge]</span><br><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">## Approvals Required</span><br><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">[</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">]</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Security</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">review</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">[</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">]</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Performance</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">review</span><br><span class="hljs-bullet" style="color: #61aeee; line-height: 26px;">-</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">[</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">]</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">Maintainability</span> <span class="hljs-string" style="color: #98c379; line-height: 26px;">review</span><br></code></pre>
<h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 22px; text-align: left; margin: 20px 10px 0px 0px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-family: STHeitiSC-Light; font-size: 18px; font-weight: bolder; display: inline-block; padding-left: 10px; border-left: 5px solid rgb(248,57,41);">Examples</span><span class="suffix"></span></h2>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">Good Trigger</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">User</strong>: “Can you review this PR? I’m concerned about the authentication flow.”</p>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">Assistant will</strong>: Load code-review skill and perform full security + correctness review.</p>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">Bad Trigger</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">User</strong>: “Format this code please.”</p>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;"><strong style="font-weight: border; color: rgb(248,57,41);">Assistant will</strong>: Decline and explain this is formatting, not review.</p>
<h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 22px; text-align: left; margin: 20px 10px 0px 0px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-family: STHeitiSC-Light; font-size: 18px; font-weight: bolder; display: inline-block; padding-left: 10px; border-left: 5px solid rgb(248,57,41);">Troubleshooting</span><span class="suffix"></span></h2>
<section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table style="display: table; text-align: left;">
<thead>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">Problem</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">Likely cause</th>
<th style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; font-size: 14px; min-width: 85px;">Fix</th>
</tr>
</thead>
<tbody style="border: 0;">
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">Skips security checks</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">Step not explicit enough</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">Add explicit security checklist</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">Varies in depth</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">No output format</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">Enforce structured output format</td>
</tr>
<tr style="border: 0; border-top: 1px solid #ccc; background-color: white;">
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">Misses common bugs</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">No test requirement</td>
<td style="border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-size: 14px; min-width: 85px;">Add “check if tests exist” to steps</td>
</tr>
</tbody>
</table>
</section><pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px;"><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; background: #282c34; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; -webkit-overflow-scrolling: touch;"><br><span class="hljs-comment" style="color: #5c6370; font-style: italic; line-height: 26px;">### 10.2 中文模板</span><br><br>```yaml<br>---<br>name: code-review<br>desc ription: |<br> 审查代码变更、Pull Request、diff 或代码片段的正确性、安全性、可维护性、<br> 性能和代码风格。当用户要求审查、检查、审计、检查代码或提供反馈时触发。<br> 触发短语包括<span class="hljs-string" style="color: #98c379; line-height: 26px;">"帮我审查代码"</span>、<span class="hljs-string" style="color: #98c379; line-height: 26px;">"检查一下bug"</span>、<span class="hljs-string" style="color: #98c379; line-height: 26px;">"看看我这个PR"</span>、<span class="hljs-string" style="color: #98c379; line-height: 26px;">"审计这些变更"</span>、<br> 或<span class="hljs-string" style="color: #98c379; line-height: 26px;">"你觉得这个实现怎么样"</span>。<br> 不适用于纯格式调整请求。<br>license: MIT<br>me tadata:<br> author: your-team<br> version: 0.1.0<br>---<br></code></pre>
<h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 22px; text-align: left; margin: 20px 10px 0px 0px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-family: STHeitiSC-Light; font-size: 18px; font-weight: bolder; display: inline-block; padding-left: 10px; border-left: 5px solid rgb(248,57,41);">十一、总结</span><span class="suffix"></span></h2>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">核心要点</span><span class="suffix" style="display: none;"></span></h3>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">Skill 不是 Prompt</strong>:Skill 是可复用、可测试、可迭代的结构化能力包</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">desc ription 决定触发</strong>:必须认真写,要覆盖真实用户表达方式</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">渐进式加载</strong>:主文件保持短,长资料拆到 references/</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">不同任务用不同模式</strong>:线性流程、决策树、循环迭代、接力棒、多阶段</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;"><strong style="font-weight: border; color: rgb(248,57,41);">Skill 要测试和迭代</strong>:写完不管只会越来越差</section></li></ul>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">快速检查清单</span><span class="suffix" style="display: none;"></span></h3>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">下次写 Skill 之前,先回答这 5 个问题:</p>
<ol data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: decimal; font-size: 14px;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">这个任务会不会重复出现?</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">用户通常怎么表达这个需求?</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">正确完成的标准是什么?</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">哪些步骤可以自动化验证?</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500; font-size: 13px;">需要哪些参考资料?</section></li></ol>
<p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; color: black; margin: 10px 10px; line-height: 1.75; letter-spacing: 0.2em; font-size: 14px; word-spacing: 0.1em;">如果 3 个以上是"是",就值得写成一个 Skill。</p>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">推荐学习书籍 《<strong style="font-weight: border; color: rgb(248,57,41);">CDA一级教材</strong>》适合CDA一级考生备考,也适合业务及数据分析岗位的从业者提升自我。完整电子版已上线CDA网校,累计已有10万+在读~ !</span><span class="suffix" style="display: none;"></span></h3>
<figure data-tool="mdnice编辑器" style="margin: 0; margin-top: 10px; margin-bottom: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center;"><img src="https://file.haoxueai.cn/haoxue/img/4502d41c-fb3a-43a8-bf50-9e14aedde094.png" alt style="max-width: 100%; border-radius: 0px 0px 5px 5px; display: block; margin: 20px auto; width: 85%; height: 100%; ob ject-fit: contain; box-shadow: #84A1A8 0px 10px 15px;"></figure>
<h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="font-size: 14px; color: rgb(165,213,93);">免费加入阅读:<a href="https://edu.cda.cn/goods/show/3151?targetId=5147&preview=0" style="text-decoration: none; word-wrap: break-word; font-weight: bold; color: rgb(248,57,41); border-bottom: 1px solid #ff3502; font-family: STHeitiSC-Light;">https://edu.cda.cn/goods/show/3151?targetId=5147&preview=0</a></span><span class="suffix" style="display: none;"></span></h3>
</section>


雷达卡








京公网安备 11010802022788号







