claude-skills
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseClaude Skills Meta-Skill
Claude Skills元技能
Turn scattered domain material into a Skill that is reusable, maintainable, and reliably activatable:
- as the entrypoint (triggers, constraints, patterns, examples)
SKILL.md - for long-form evidence and navigation
references/ - optional and
scripts/for scaffolding and templatesassets/
将零散的领域素材转换为可复用、可维护且能可靠激活的Skill:
- 作为入口文件(触发条件、约束、模式、示例)
SKILL.md - 用于存放长格式证据和导航内容
references/ - 可选的 和
scripts/用于脚手架和模板assets/
When to Use This Skill
何时使用此技能
Trigger this meta-skill when you need to:
- Create a new Skill from scratch from docs/specs/repos
- Refactor an existing Skill (too long, unclear, inconsistent, misfires)
- Design reliable activation (frontmatter + triggers + boundaries)
- Extract a clean Quick Reference from large material
- Split long content into navigable
references/ - Add a quality gate and a validator
当你需要以下操作时触发此元技能:
- 从文档/规范/代码库从零创建新Skill
- 重构现有Skill(过长、表述模糊、不一致、触发失效)
- 设计可靠的激活机制(前置元数据 + 触发条件 + 边界)
- 从大量素材中提取简洁的快速参考内容
- 将长内容拆分到可导航的 目录
references/ - 添加质量管控机制和验证器
Not For / Boundaries
不适用场景/边界
This meta-skill is NOT:
- A domain Skill by itself (it builds domain Skills)
- A license to invent external facts (if the material does not prove it, say so and add a verification path)
- A substitute for required inputs (if inputs are missing, ask 1-3 questions before proceeding)
此元技能不用于:
- 本身作为领域Skill(它用于构建领域Skill)
- 编造外部事实(如果素材无法证明,需说明并添加验证路径)
- 替代必要的输入(如果输入缺失,先提出1-3个问题再继续)
Quick Reference
快速参考
Deliverables (What You Must Produce)
交付成果(必须产出)
Your output MUST include:
- A concrete directory layout (typically )
skills/<skill-name>/ - An actionable with decidable triggers, boundaries, and reproducible examples
SKILL.md - Long-form docs moved to with a
references/references/index.md - A pre-delivery checklist (Quality Gate)
你的输出必须包含:
- 具体的目录结构(通常为 )
skills/<skill-name>/ - 可执行的 ,包含可判定的触发条件、边界和可复现的示例
SKILL.md - 长格式文档移至 目录,并附带
references/references/index.md - 交付前检查清单(质量管控)
Recommended Layout (Minimal -> Full)
推荐目录结构(最简 -> 完整)
skill-name/
|-- SKILL.md # Required: entrypoint with YAML frontmatter
|-- references/ # Optional: long-form docs/evidence/index
| `-- index.md # Recommended: navigation index
|-- scripts/ # Optional: helpers/automation
`-- assets/ # Optional: templates/configs/static assetsThe truly minimal version is just (you can add later).
SKILL.mdreferences/skill-name/
|-- SKILL.md # 必填:带YAML前置元数据的入口文件
|-- references/ # 可选:长格式文档/证据/索引
| `-- index.md # 推荐:导航索引
|-- scripts/ # 可选:辅助工具/自动化脚本
`-- assets/ # 可选:模板/配置/静态资源真正的最简版本仅包含 (可后续添加 )。
SKILL.mdreferences/YAML Frontmatter (Required)
YAML前置元数据(必填)
yaml
---
name: skill-name
description: "What it does + when to use (activation triggers)."
---Frontmatter rules:
- MUST match
nameand SHOULD match the directory name^[a-z][a-z0-9-]*$ - MUST be decidable (not "helps with X") and include concrete trigger keywords
description
yaml
---
name: skill-name
description: "What it does + when to use (activation triggers)."
---前置元数据规则:
- 必须匹配正则
name,且应与目录名一致^[a-z][a-z0-9-]*$ - 必须是可判定的(不能是“帮助处理X”),且包含具体的触发关键词
description
Minimal SKILL.md
Skeleton (Copy/Paste)
SKILL.md最简 SKILL.md
骨架(可复制粘贴)
SKILL.mdmarkdown
---
name: my-skill
description: "[Domain] capability: includes [capability 1], [capability 2]. Use when [decidable triggers]."
---markdown
---
name: my-skill
description: "[Domain] capability: includes [capability 1], [capability 2]. Use when [decidable triggers]."
---my-skill Skill
my-skill Skill
One sentence that states the boundary and the deliverable.
一句话说明边界和交付成果。
When to Use This Skill
何时使用此技能
Trigger when any of these applies:
- [Trigger 1: concrete task/keyword]
- [Trigger 2]
- [Trigger 3]
当以下任一情况适用时触发:
- [触发条件1:具体任务/关键词]
- [触发条件2]
- [触发条件3]
Not For / Boundaries
不适用场景/边界
- What this skill will not do (prevents misfires and over-promising)
- Required inputs; ask 1-3 questions if missing
- 此技能不会执行的操作(避免触发失效和过度承诺)
- 必要输入;如果缺失,提出1-3个问题
Quick Reference
快速参考
Common Patterns
常见模式
Pattern 1: one-line explanation
text
[command/snippet you can paste and run]模式1: 一行说明
text
[可复制运行的命令/代码片段]Examples
示例
Example 1
示例1
- Input:
- Steps:
- Expected output / acceptance:
- 输入:
- 步骤:
- 预期输出/验收标准:
Example 2
示例2
Example 3
示例3
References
参考资料
- : navigation
references/index.md - : long-form docs split by topic
references/...
- :导航
references/index.md - :按主题拆分的长格式文档
references/...
Maintenance
维护
- Sources: docs/repos/specs (do not invent)
- Last updated: YYYY-MM-DD
- Known limits: what is explicitly out of scope
undefined- 来源:文档/代码库/规范(不得编造)
- 最后更新:YYYY-MM-DD
- 已知限制:明确超出范围的内容
undefinedAuthoring Rules (Non-negotiable)
编写规则(不可协商)
- Quick Reference is for short, directly usable patterns
- Keep it <= 20 patterns when possible.
- Anything that needs paragraphs of explanation goes to .
references/
- Activation must be decidable
- Frontmatter should say "what + when" with concrete keywords.
description - "When to Use" must list specific tasks/inputs/goals, not vague help text.
- "Not For / Boundaries" is mandatory for reliability.
- Frontmatter
- No bluffing on external details
- If the material does not prove it, say so and include a verification path.
- 快速参考用于简短、可直接使用的模式
- 尽可能保持模式数量≤20个
- 任何需要段落解释的内容都应移至
references/
- 激活条件必须可判定
- 前置元数据 应说明“功能+适用场景”,并包含具体关键词
description - “何时使用”必须列出具体任务/输入/目标,而非模糊的帮助文本
- “不适用场景/边界”是确保可靠性的必填项
- 前置元数据
- 不得虚构外部细节
- 如果素材无法证明,需说明并添加验证路径
Workflow (Material -> Skill)
工作流程(素材 -> Skill)
Do not skip steps:
- Scope: write MUST/SHOULD/NEVER (three sentences total is fine)
- Extract patterns: pick 10-20 high-frequency patterns (commands/snippets/flows)
- Add examples: >= 3 end-to-end examples (input -> steps -> acceptance)
- Define boundaries: what is out-of-scope + required inputs
- Split references: move long text into + write
references/references/index.md - Apply the gate: run the checklist and the validator
不得跳过步骤:
- 范围定义:写出必须/应该/绝不做的内容(三句话即可)
- 提取模式:挑选10-20个高频模式(命令/代码片段/流程)
- 添加示例:≥3个端到端示例(输入->步骤->验收标准)
- 定义边界:明确超出范围的内容+必要输入
- 拆分参考资料:将长文本移至 并编写
references/references/index.md - 质量管控:运行检查清单和验证器
Quality Gate (Pre-delivery Checklist)
质量管控(交付前检查清单)
Minimum checks (see for the full version):
references/quality-checklist.md- matches
nameand matches the directory name^[a-z][a-z0-9-]*$ - states "what + when" with concrete trigger keywords
description - Has "When to Use This Skill" with decidable triggers
- Has "Not For / Boundaries" to reduce misfires
- Quick Reference is <= 20 patterns and each is directly usable
- Has >= 3 reproducible examples
- Long content is in and
references/is navigablereferences/index.md - Uncertain claims include a verification path (no bluffing)
- Reads like an operator's manual, not a documentation dump
Validate locally:
bash
undefined最低检查标准(完整版本见 ):
references/quality-checklist.md- 匹配正则
name且与目录名一致^[a-z][a-z0-9-]*$ - 说明“功能+适用场景”并包含具体触发关键词
description - 包含“何时使用此技能”且触发条件可判定
- 包含“不适用场景/边界”以减少触发失效
- 快速参考的模式数量≤20个,且每个模式均可直接使用
- 包含≥3个可复现的示例
- 长内容存放在 中,且
references/可导航references/index.md - 不确定的声明包含验证路径(不得虚构)
- 内容读起来像操作手册,而非文档堆砌
本地验证:
bash
undefinedFrom repo root (basic validation)
从仓库根目录(基础验证)
./skills/claude-skills/scripts/validate-skill.sh skills/<skill-name>
./skills/claude-skills/scripts/validate-skill.sh skills/<skill-name>
From repo root (strict validation)
从仓库根目录(严格验证)
./skills/claude-skills/scripts/validate-skill.sh skills/<skill-name> --strict
./skills/claude-skills/scripts/validate-skill.sh skills/<skill-name> --strict
From skills/claude-skills/ (basic validation)
从 skills/claude-skills/ 目录(基础验证)
./scripts/validate-skill.sh ../<skill-name>
./scripts/validate-skill.sh ../<skill-name>
From skills/claude-skills/ (strict validation)
从 skills/claude-skills/ 目录(严格验证)
./scripts/validate-skill.sh ../<skill-name> --strict
undefined./scripts/validate-skill.sh ../<skill-name> --strict
undefinedTools & Templates
工具与模板
Generate a new Skill skeleton:
bash
undefined生成新Skill骨架:
bash
undefinedFrom repo root (generate into ./skills/)
从仓库根目录(生成到 ./skills/)
./skills/claude-skills/scripts/create-skill.sh my-skill --full --output skills
./skills/claude-skills/scripts/create-skill.sh my-skill --full --output skills
From skills/claude-skills/ (generate into ../ i.e. ./skills/)
从 skills/claude-skills/ 目录(生成到 ../ 即 ./skills/)
./scripts/create-skill.sh my-skill --full --output ..
./scripts/create-skill.sh my-skill --full --output ..
Minimal skeleton
最简骨架
./skills/claude-skills/scripts/create-skill.sh my-skill --minimal --output skills
Templates:
- `assets/template-minimal.md`
- `assets/template-complete.md`./skills/claude-skills/scripts/create-skill.sh my-skill --minimal --output skills
模板:
- `assets/template-minimal.md`
- `assets/template-complete.md`Examples
示例
Example 1: Create a Skill from Docs
示例1:从文档创建Skill
- Input: an official doc/spec + 2-3 real code samples + common failure modes
- Steps:
- Run to scaffold
create-skill.shskills/<skill-name>/ - Write frontmatter as "what + when"
description - Extract 10-20 high-frequency patterns into Quick Reference
- Add >= 3 end-to-end examples with acceptance criteria
- Put long content into and wire
references/references/index.md - Run and iterate
validate-skill.sh --strict
- Run
- 输入:官方文档/规范 + 2-3个真实代码样本 + 常见失败模式
- 步骤:
- 运行 搭建
create-skill.sh目录结构skills/<skill-name>/ - 编写前置元数据 ,说明“功能+适用场景”
description - 提取10-20个高频模式到快速参考
- 添加≥3个端到端示例及验收标准
- 将长内容移至 并关联
references/references/index.md - 运行 并迭代优化
validate-skill.sh --strict
- 运行
Example 2: Refactor a "Doc Dump" Skill
示例2:重构“文档堆砌”型Skill
- Input: an existing with long pasted documentation
SKILL.md - Steps:
- Identify which parts are patterns vs. long-form explanation
- Move long-form text into (split by topic)
references/ - Rewrite Quick Reference as short copy/paste patterns
- Add or fix Examples until they are reproducible
- Add "Not For / Boundaries" to reduce misfires
- 输入:现有 ,包含大量粘贴的文档内容
SKILL.md - 步骤:
- 区分哪些是模式,哪些是长格式解释
- 将长格式文本移至 (按主题拆分)
references/ - 将快速参考重写为简短的可复制粘贴模式
- 添加或修复示例,确保其可复现
- 添加“不适用场景/边界”以减少触发失效
Example 3: Validate and Gate a Skill
示例3:验证并管控Skill质量
- Input:
skills/<skill-name>/ - Steps:
- Run (non-strict) to get warnings
validate-skill.sh - Fix frontmatter/name mismatches and missing sections
- Run to enforce the spec
validate-skill.sh --strict - Run the scoring rubric in before shipping
references/quality-checklist.md
- Run
- 输入:目录
skills/<skill-name>/ - 步骤:
- 运行 (非严格模式)获取警告
validate-skill.sh - 修复前置元数据/名称不匹配及缺失的章节
- 运行 以强制执行规范
validate-skill.sh --strict - 交付前运行 中的评分标准
references/quality-checklist.md
- 运行
References
参考资料
Local docs:
references/index.mdreferences/skill-spec.mdreferences/quality-checklist.mdreferences/anti-patterns.md- (upstream official reference)
references/README.md
External (official):
本地文档:
references/index.mdreferences/skill-spec.mdreferences/quality-checklist.mdreferences/anti-patterns.md- (上游官方参考)
references/README.md
外部(官方):
Maintenance
维护
- Sources: local spec files in + upstream official docs in
skills/claude-skills/references/references/README.md - Last updated: 2025-12-14
- Known limits: is heuristic; strict mode assumes the recommended section headings
validate-skill.sh
- 来源:中的本地规范文件 +
skills/claude-skills/references/中的上游官方文档references/README.md - 最后更新:2025-12-14
- 已知限制:基于启发式规则;严格模式假设使用推荐的章节标题
validate-skill.sh