Skill Title
【免费下载链接】agentic-awesome-skillsAAS Core is the local, agent-first control plane for complete catalog discovery, agent-owned selection, stack validation, and planning, backed by 2,115+ agentic skills. Includes CLI, local MCP, catalog, plugins, and Workbench.项目地址: https://gitcode.com/gh_mirrors/an/agentic-awesome-skills
标题应清晰、有描述性,通常与技能名一致或在其基础上扩展。 ### 2. Overview(概述) 2~4 句话说明"这个技能做什么、为什么存在"。模板要求:如果技能改编自外部 GitHub 仓库,在此处同时声明 `source_repo` 与 `source_type`;原创技能则使用 `source: self` 与 `source_type: self`。 ### 3. When to Use This Skill(触发时机) 这是**质量门槛强制要求**的章节——机器并不检查正文里的其他章节,但"必须有明确触发时机说明"是硬性门槛(见 [docs/contributors/quality-bar.md](https://link.gitcode.com/i/c988f867ecdeed0d2b3e0005090033a1) 第 2 条)。验收的标题包括 `## When to Use`、`## Use this skill when`、`## When to Use This Skill` 三种写法。 ```markdown ## When to Use This Skill - Use when you need to [scenario 1] - Use when working with [scenario 2] - Use when the user asks about [scenario 3]好的写法:"当用户要求调试 React 组件时使用";差的写法:"这个技能帮你处理代码"。
4. How It Works(核心指令)
## How It Works ### Step 1: [Action] Detailed instructions... ### Step 2: [Action] More instructions...这是技能的心脏,必须是清晰、可执行的分步指令。技能解剖文档 docs/contributors/skill-anatomy.md 给出三条写作铁律:
- 用直接语言:不要写 "You might want to consider possibly checking if the user has authentication",直接写 "Check if the user is authenticated before proceeding.";
- 用祈使动词:写 "Create the file...",而不是 "The file should be created...";
- 具体到命令:不要写 "Set up the database properly",而是列出一、二、三步(建库、
npm run migrate、npm run seed)。
5. Examples(示例)
## Examples ### Example 1: [Use Case] ```javascript // Example code质量门槛要求至少包含一个**可复制粘贴**的代码块或交互示例(用户或 Agent 拿到即可用)。示例向 Agent 展示"好的输出长什么样"。 ### 6. Best Practices(最佳实践) 用 ✅ / ❌ 清单呈现做与不做: ```markdown ## Best Practices - ✅ Do this - ✅ Also do this - ❌ Don't do this - ❌ Avoid this7. Limitations(限制)
列出已知边界与技能不能做的事。质量门槛将其列为独立质量项:"A list of known edge cases or things the skillcannotdo",示例:"Does not work on Windows without WSL."。模板还额外强调:当必需的输入、权限或安全边界缺失时,应停下来向用户澄清,而不是强行执行。
8. Security & Safety Notes(安全与操作注记)
凡技能包含 shell 命令或命令式示例、网络拉取、token/能力字符串、或直接的变更引导,都必须显式写出前置条件与警示。模板给出了一个关键的允许清单注释机制:
<!-- security-allowlist: approved for documented workflow X -->对于有意保留的高风险示例(如curl ... | bash、wget ... | sh、凭据示例),需要给出评审可见的理由并加上上述 allowlist 注释。质量门槛文档说明npm run security:docs(实现于 tools/scripts/tests/docs_security_content.test.js)会在仓库范围内扫描三类内容:curl ... | bash类管道、内联 token/密钥式命令示例、以及通过 allowlist 注释放行的刻意高风险命令。能够修改文件/系统或执行危险操作的技能,还要写明确认门(confirmation gate)与环境预期(如local-only、authorized test environment)。
9. Common Pitfalls(常见坑)
## Common Pitfalls - **Problem:** Description **Solution:** How to fix it10. Related Skills(相关技能)
## Related Skills - `@other-skill` - When to use this instead - `@complementary-skill` - How this works together这组@引用让 Agent 能在相关技能之间做交叉调度。例如技能解剖文档给出的工作流编排示例:先用@brainstorming做设计,再用@writing-plans制定计划,最后用@test-driven-development实现。
进攻性技能的硬性红线
如果新技能属于risk: offensive类别,除了模板中的常规章节外,还受 docs/contributors/security-guardrails.md 的三重约束:
- 必须原样包含授权声明,且校验器会按正则强制匹配(见 validate_skills.py):
> **⚠️ AUTHORIZED USE ONLY** > This skill is for educational purposes or authorized security assessments only. > You must have explicit, written permission from the system owner before using this tool. > Misuse of this tool is illegal and strictly prohibited.禁止全自动执行:每次针对目标的探测、利用、变更、持久化、数据提取或凭据访问命令前,Agent 必须收集确切目标、书面授权确认与允许范围,展示确切命令与预期影响,并在当前对话中等待用户明确确认——校验器同样用正则检查 "Mandatory confirmation gate"、"exact target URL, IP, account, or resource"、"Wait for explicit confirmation in the current conversation" 等关键句(见 validate_skills.py)。未获确认前,技能必须保持只读并仅提供防御性指导。
安全设计:不包含可用作武器的载荷(恶意软件、勒索软件、非教育用途的漏洞利用),并建议在隔离环境(Docker/VM)中运行。
即使是防御性技能(safe/critical),也不得在未经用户明确同意的情况下向第三方服务器上传数据,审计类操作默认只读。
配套资源目录的使用规范
当技能需要脚本、示例、模板或参考文档时,按固定目录组织并在 SKILL.md 中引用:
scripts/:辅助脚本(如setup.sh、validate.py、generate.js),在正文中给出运行命令,例如bash scripts/setup.sh;examples/:真实可用示例(basic-usage.js、advanced-pattern.ts),支持带config.json的完整实现子目录;templates/:可复用代码模板,可用{{#include templates/component.tsx}}语法内联到 SKILL.md;references/:外部文档或 API 参考(api-docs.md、troubleshooting.md)。
篇幅分级:从最小可行到全面型
模板虽未直接分级,但技能解剖文档给出了三种规模参考,便于按内容复杂度取舍:
| 级别 | Frontmatter | 内容篇幅 | 必备章节 |
|---|---|---|---|
| 最小可行技能 | name/description/category/risk/source/date_added | 100–200 词 | Overview + Instructions |
| 标准技能 | 同上 | 300–800 词 | Overview + When to Use + Instructions + Examples |
| 全面型技能 | 标准字段 +source_repo/source_type及可选字段 | 800–2000 词 | 全部推荐章节,可带 scripts/examples/templates |
经验法则:从小开始,依据反馈迭代。npm run fix:missing-sections(对应 tools/scripts/fix_missing_skill_sections.py)这类修复脚本可以辅助补齐缺失章节,但人工校验仍是最终保障。
写作技巧与触发优化
- 先写 "When to Use":它最能厘清技能定位;
- 先写示例再写说明:示例能帮你发现自己真正在教什么;
- 交给 AI 实测:提交前用你的 Agent 实际运行一次,验证触发与执行效果;
- 用渐进披露:
## Basic Usage放常规用法,## Advanced Usage放进阶模式; - 用条件逻辑:例如 "If the user is working with React: ... / If the user is working with Vue: ...",让一个技能在不同技术栈下给出差异化指令;
- 跨技能编排:在 "Related Skills" 中用
@引用串联工作流。
技能解剖文档还给出了一个真实案例分析(skills/brainstorming/SKILL.md):强描述性("You MUST use this before any creative work...")、清晰标题、分阶段步骤,是值得模仿的范本。仓库内可参照的其他范例包括skills/git-pushing/SKILL.md(简单聚焦)、skills/copywriting/SKILL.md(示例优秀)、skills/systematic-debugging/SKILL.md(综合全面)、skills/loki-mode/SKILL.md(复杂工作流)。
提交前的验证命令全流程
模板文档指向的验证体系在 package.json 中暴露为 npm scripts。完整的提交前验证序列如下:
npm run validate npm run audit:skills npm run validate:references npm test npm run security:docs【免费下载链接】agentic-awesome-skillsAAS Core is the local, agent-first control plane for complete catalog discovery, agent-owned selection, stack validation, and planning, backed by 2,115+ agentic skills. Includes CLI, local MCP, catalog, plugins, and Workbench.项目地址: https://gitcode.com/gh_mirrors/an/agentic-awesome-skills
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考