Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guides Claude in creating well-structured SKILL.md files following best practices. Provides clear guidelines for naming, structure, and content organization to make skills easy to discover and execute.
.claude/skills/microck-create-skill-file/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 81% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 158% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 214% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 72% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 210% | 0% |
> 如何创建高质量的 SKILL.md 文件
第1步: 创建目录
bashmkdir -p .claude/skill/your-skill-name cd .claude/skill/your-skill-name
第2步: 创建 SKILL.md
markdown--- name: your-skill-name description: Brief description with trigger keywords and scenarios --- # Your Skill Title ## When to Use This Skill - User asks to [specific scenario] - User mentions "[keyword]" ## How It Works 1. Step 1: [Action] 2. Step 2: [Action] ## Examples **Input**: User request **Output**: Expected result
第3步: 测试
只添加 Claude 不知道的新知识:
示例对比:
markdown# ❌ 过度详细 1. 创建 Python 文件 2. 导入必要的库 3. 定义函数 4. 编写主程序逻辑 # ✅ 简洁有效 使用 `scripts/api_client.py` 调用内部 API。 请求头必须包含 `X-Internal-Token`(从环境变量 `INTERNAL_API_KEY` 获取)。
| 自由度 | 适用场景 | 编写方式 | |--------|---------|---------| | 高 | 需要创造性、多种解决方案 | 提供指导原则,不限定具体步骤 | | 中 | 有推荐模式但允许变化 | 提供参数化示例和默认流程 | | 低 | 容易出错、需严格执行 | 提供详细的分步指令或脚本 |
判断标准:
将复杂内容分层组织:
SKILL.md (主文档, 200-500行)
├── reference.md (详细文档)
├── examples.md (完整示例)
└── scripts/ (可执行脚本)规则:
yaml--- name: skill-name-here description: Clear description of what this skill does and when to activate it ---
字段规范:
| 字段 | 要求 | 说明 | |------|------|------| | name | 小写字母、数字、短横线,≤64字符 | 必须与目录名一致 | | description | 纯文本,≤1024字符 | 用于检索和激活 |
命名禁忌:
anthropic, claude)helper, utility, manager)-)Description 技巧:
yaml# ❌ 过于泛化 description: Helps with code tasks # ✅ 具体且包含关键词 description: Processes CSV files and generates Excel reports with charts. Use when user asks to convert data formats or create visual reports. # ✅ 说明触发场景 description: Analyzes Python code for security vulnerabilities using bandit. Activates when user mentions "security audit" or "vulnerability scan".
基础结构(简单 Skill):
skill-name/
└── SKILL.md标准结构(推荐):
skill-name/
├── SKILL.md
├── templates/
│ └── template.md
└── scripts/
└── script.py推荐格式: 动名词形式 (verb-ing + noun)
✅ 好的命名:
- processing-csv-files
- generating-api-docs
- managing-database-migrations
❌ 不好的命名:
- csv (过于简短)
- data_processor (使用下划线)
- helper (过于模糊)必须使用第三人称:
yaml# ❌ 错误 description: I help you process PDFs # ✅ 正确 description: Processes PDF documents and extracts structured data
4C 原则:
明确说明触发场景:
markdown## When to Use This Skill - User asks to analyze Python code for type errors - User mentions "mypy" or "type checking" - User is working in a Python project with type hints - User needs to add type annotations
模式:
简单线性流程:
markdown## How It Works 1. Scan the project for all `.py` files 2. Run `mypy --strict` on each file 3. Parse error output and categorize by severity 4. Generate summary report with fix suggestions
条件分支流程:
markdown## Workflow 1. **Check project type** - If Django → Use `django-stubs` config - If Flask → Use `flask-stubs` config - Otherwise → Use default mypy config 2. **Run type checking** - If errors found → Proceed to step 3 - If no errors → Report success and exit
Checklist 模式(验证型任务):
markdown## Pre-deployment Checklist Execute in order. Stop if any step fails. - [ ] Run tests: `npm test` (must pass) - [ ] Build: `npm run build` (no errors) - [ ] Check deps: `npm audit` (no critical vulnerabilities)
输入-输出示例:
markdown## Examples ### Example 1: Basic Check **User Request**: "Check my code for type errors" **Action**: 1. Scan for `.py` files 2. Run `mypy` on all files **Output**: Found 3 type errors in 2 files: src/main.py:15: error: Missing return type src/utils.py:42: error: Incompatible types
何时使用脚本:
脚本编写规范:
python#!/usr/bin/env python3 """ Brief description of what this script does. Usage: python script.py <arg> [--option value] """ import argparse DEFAULT_VALUE = 80 # Use constants, not magic numbers def main(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("directory", help="Directory to process") parser.add_argument("--threshold", type=int, default=DEFAULT_VALUE) args = parser.parse_args() # Validate inputs if not Path(args.directory).is_dir(): print(f"Error: {args.directory} not found") return 1 # Execute result = process(args.directory, args.threshold) # Report print(f"Processed {result['count']} files") return 0 if __name__ == "__main__": exit(main())
关键规范:
Do:
Don't:
name 符合命名规范(小写、短横线、≤64字符)description 包含触发关键词和场景(≤1024字符)/Q: Skill 多长才合适?
Q: 如何让 Skill 更容易激活?
description 中使用用户会说的关键词Q: 多个 Skill 功能重叠怎么办?
description 区分Q: Skill 需要维护吗?
yaml--- name: skill-name description: Brief description with trigger keywords ---
markdown# Skill Title ## When to Use This Skill - Scenario 1 - Scenario 2 ## How It Works 1. Step 1 2. Step 2 ## Examples ### Example 1 ... ## References - [Link](url)
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 16,699 | 15,066 | -10% | 1 | 1 | 0% | 3,018 | 5,455 | +81% | 0 | 0 | — |
case-02 | fail→pass | 9,061 | 5,808 | -36% | 1 | 1 | 0% | 1,506 | 3,882 | +158% | 0 | 0 | — |
case-03 | fail→pass | 7,367 | 5,220 | -29% | 1 | 1 | 0% | 1,194 | 3,746 | +214% | 0 | 0 | — |
case-04 | pass→pass | 7,543 | 6,253 | -17% | 1 | 1 | 0% | 1,146 | 3,957 | +245% | 0 | 0 | — |
case-05 | pass→pass | 13,021 | 3,856 | -70% | 1 | 1 | 0% | 2,113 | 3,549 | +68% | 0 | 0 | — |
case-06 | pass→pass | 14,759 | 9,074 | -39% | 1 | 1 | 0% | 2,118 | 4,296 | +103% | 0 | 0 | — |
case-07 | pass→pass | 11,894 | 9,537 | -20% | 1 | 1 | 0% | 1,743 | 4,383 | +151% | 0 | 0 | — |
case-08 | pass→pass | 14,556 | 11,161 | -23% | 1 | 1 | 0% | 2,240 | 4,891 | +118% | 0 | 0 | — |
case-09 | fail→pass | 14,003 | 3,998 | -71% | 1 | 1 | 0% | 2,095 | 3,599 | +72% | 0 | 0 | — |
case-10 | pass→pass | 12,308 | 6,555 | -47% | 1 | 1 | 0% | 1,901 | 3,868 | +103% | 0 | 0 | — |
case-11 | fail→fail | 7,793 | 7,163 | -8% | 1 | 1 | 0% | 1,223 | 4,020 | +229% | 0 | 0 | — |
case-12 | fail→pass | 7,057 | 3,703 | -48% | 1 | 1 | 0% | 1,144 | 3,547 | +210% | 0 | 0 | — |
case-13 | pass→pass | 11,042 | 9,759 | -12% | 1 | 1 | 0% | 1,725 | 4,566 | +165% | 0 | 0 | — |
case-14 | pass→pass | 4,489 | 1,808 | -60% | 1 | 1 | 0% | 640 | 3,151 | +392% | 0 | 0 | — |
case-15 | pass→pass | 8,502 | 6,510 | -23% | 1 | 1 | 0% | 1,353 | 4,029 | +198% | 0 | 0 | — |
case-16 | pass→pass | 11,872 | 5,930 | -50% | 1 | 1 | 0% | 2,004 | 3,963 | +98% | 0 | 0 | — |
case-17 | fail→pass | 13,299 | 11,450 | -14% | 1 | 1 | 0% | 2,344 | 5,039 | +115% | 0 | 0 | — |
case-18 | pass→pass | 13,026 | 11,504 | -12% | 1 | 1 | 0% | 2,651 | 5,178 | +95% | 0 | 0 | — |
case-19 | pass→pass | 13,504 | 16,058 | +19% | 1 | 1 | 0% | 2,188 | 5,571 | +155% | 0 | 0 | — |
case-20 | pass→pass | 14,769 | 12,816 | -13% | 1 | 1 | 0% | 2,753 | 5,623 | +104% | 0 | 0 | — |
case-21 | fail→pass | 12,521 | 4,030 | -68% | 1 | 1 | 0% | 2,044 | 3,613 | +77% | 0 | 0 | — |
case-22 | pass→pass | 2,910 | 2,491 | -14% | 1 | 1 | 0% | 457 | 3,214 | +603% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +32 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.