Agent skill

Create Skill File

by YYH211 in YYH211/Claude-meta-skill

Guides Claude in creating well-structured SKILL.md files following best practices.

MITAuto-check passedAgent Workflows

Install Create Skill File

skills CLI
$ npx skills add YYH211/Claude-meta-skill --skill create-skill-file -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install YYH211/Claude-meta-skill create-skill-file --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/YYH211/Claude-meta-skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/create-skill-file .claude/skills/create-skill-file && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
create-skill-file
GitHub stars
282
Used in
2 other repos
Token cost
~1.9k tokens
SKILL.md length
304 words
Files
5
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

Guides Claude in creating well-structured SKILL.md files following best practices.

  • Works in 3 steps: 保持简洁 → 设定合适的自由度 → 渐进式披露
  • Tasks that involve Skill authoring
  • SKILL.md covers 目录, 快速开始, 核心原则 and 文件结构规范, plus 5 more sections
  • Needs INTERNAL_API_KEY

What it does

Create Skill File is an agent skill from YYH211/Claude-meta-skill. 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.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files (for example `examples/bad-example.md`, `examples/good-example.md` and `templates/basic-skill-template.md`).

It sits in Agent Workflows, covering Skill authoring. The repository describes itself as: A curated collection of reusable skills for Claude Code. Enhance Claude's capabilities with ready-to-use skill modules including comprehensive guides, templates, and best… The licence is MIT.

When your agent uses it

  • Tasks that involve Skill authoring

Example prompts

  • “Use the create-skill-file skill to guide Claude in creating well-structured SKILL.md files following best practices”
  • “/create-skill-file”

Requirements

  • Python 3
  • A credential in INTERNAL_API_KEY

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. 保持简洁
  2. 设定合适的自由度
  3. 渐进式披露

What it can do on your machine

Read from SKILL.md and the folder at commit ba6f50c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown, yaml, bash and python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.claude.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • INTERNAL_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Create Skill File loads about 1.9k tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 304 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~55
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from YYH211/Claude-meta-skill at commit ba6f50c, republished under its MIT licence (© YYH211). 304 words, ~1,890 tokens.

Download SKILL.mdSave it as .claude/skills/create-skill-file/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
create-skill-file
description
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 Agent Skill 编写规范

如何创建高质量的 SKILL.md 文件

目录


快速开始

3步创建 Skill

第1步: 创建目录

bash
mkdir -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步: 测试

  • 在对话中使用 description 中的关键词触发
  • 观察 Claude 是否正确执行
  • 根据效果调整

核心原则

1. 保持简洁

只添加 Claude 不知道的新知识:

  • ✅ 项目特定的工作流程
  • ✅ 特殊的命名规范或格式要求
  • ✅ 自定义工具和脚本的使用方法
  • ❌ 通用编程知识
  • ❌ 显而易见的步骤

示例对比:

markdown
# ❌ 过度详细
1. 创建 Python 文件
2. 导入必要的库
3. 定义函数
4. 编写主程序逻辑

# ✅ 简洁有效
使用 `scripts/api_client.py` 调用内部 API。
请求头必须包含 `X-Internal-Token`(从环境变量 `INTERNAL_API_KEY` 获取)。
2. 设定合适的自由度
自由度适用场景编写方式
高需要创造性、多种解决方案提供指导原则,不限定具体步骤
中有推荐模式但允许变化提供参数化示例和默认流程
低容易出错、需严格执行提供详细的分步指令或脚本

判断标准:

  • 任务是否有明确的"正确答案"? → 低自由度
  • 是否需要适应不同场景? → 高自由度
  • 错误的代价有多大? → 代价高则用低自由度
3. 渐进式披露

将复杂内容分层组织:

SKILL.md (主文档, 200-500行)
├── reference.md (详细文档)
├── examples.md (完整示例)
└── scripts/ (可执行脚本)

规则:

  • SKILL.md 超过 500行 → 拆分子文件
  • 子文件超过 100行 → 添加目录
  • 引用深度 ≤ 1层

文件结构规范

YAML Frontmatter
yaml
---
name: skill-name-here
description: Clear description of what this skill does and when to activate it
---

字段规范:

字段要求说明
name小写字母、数字、短横线,≤64字符必须与目录名一致
description纯文本,≤1024字符用于检索和激活

命名禁忌:

  • ❌ XML 标签、保留字(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

命名和描述规范

Skill 命名

推荐格式: 动名词形式 (verb-ing + noun)

✅ 好的命名:
- processing-csv-files
- generating-api-docs
- managing-database-migrations

❌ 不好的命名:
- csv (过于简短)
- data_processor (使用下划线)
- helper (过于模糊)
Description 编写

必须使用第三人称:

yaml
# ❌ 错误
description: I help you process PDFs

# ✅ 正确
description: Processes PDF documents and extracts structured data

4C 原则:

  • Clear (清晰): 避免术语和模糊词汇
  • Concise (简洁): 1-2句话说明核心功能
  • Contextual (上下文): 说明适用场景
  • Complete (完整): 功能 + 触发条件

内容编写指南

"When to Use" 章节

明确说明触发场景:

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

模式:

  • 直接请求: "User asks to X"
  • 关键词: "User mentions 'keyword'"
  • 上下文: "User is working with X"
  • 任务类型: "User needs to X"
工作流设计

简单线性流程:

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
   
脚本集成

何时使用脚本:

  • 简单命令 → 直接在 SKILL.md 中说明
  • 复杂流程 → 提供独立脚本

脚本编写规范:

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())

关键规范:

  • ✅ Shebang 行和 docstring
  • ✅ 类型注解和常量
  • ✅ 参数验证和错误处理
  • ✅ 清晰的返回值(0=成功, 1=失败)
最佳实践

Do:

  • ✅ 提供可执行的命令和脚本
  • ✅ 包含输入-输出示例
  • ✅ 说明验证标准和成功条件
  • ✅ 包含 Do/Don't 清单

Don't:

  • ❌ 包含 Claude 已知的通用知识
  • ❌ 使用抽象描述而非具体步骤
  • ❌ 遗漏错误处理指导
  • ❌ 示例使用伪代码而非真实代码

质量检查清单

核心质量
  • name 符合命名规范(小写、短横线、≤64字符)
  • description 包含触发关键词和场景(≤1024字符)
  • 名称与目录名一致
  • 只包含 Claude 不知道的信息
  • 没有冗余或重复内容
功能完整性
  • 有"When to Use"章节,列出 3-5 个触发场景
  • 有清晰的执行流程或步骤
  • 至少 2-3 个完整示例
  • 包含输入和预期输出
  • 错误处理有指导
结构规范
  • 章节组织清晰
  • 超过 200行有目录导航
  • 引用层级 ≤ 1层
  • 所有路径使用正斜杠 /
  • 术语使用一致
脚本和模板
  • 脚本包含使用说明和参数文档
  • 脚本有错误处理
  • 避免魔法数字,使用配置
  • 模板格式清晰易用
最终检查
  • 通读全文,确保流畅易读
  • 使用实际场景测试触发
  • 长度适中(200-500行,或已拆分)

常见问题

Q: Skill 多长才合适?

  • 最小: 50-100行
  • 理想: 200-500行
  • 最大: 500行(超过则拆分)

Q: 如何让 Skill 更容易激活?

  • 在 description 中使用用户会说的关键词
  • 说明具体场景("when user asks to X")
  • 提及相关工具名称

Q: 多个 Skill 功能重叠怎么办?

  • 使用更具体的 description 区分
  • 在"When to Use"中说明关系
  • 考虑合并为一个 Skill

Q: Skill 需要维护吗?

  • 每季度审查一次,更新过时信息
  • 根据使用反馈迭代
  • 工具或 API 变更时及时更新

快速参考

Frontmatter 模板
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)

相关资源


© YYH211, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files in create-skill-file of YYH211/Claude-meta-skill.

  • SKILL.md
  • examples/bad-example.md
  • examples/good-example.md
  • templates/basic-skill-template.md
  • templates/workflow-skill-template.md

Open the folder on GitHubat commit ba6f50c

Used in 2 other repositories

We found 16 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in YYH211/Claude-meta-skill, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Create Skill File next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Create Skill File compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Create Skill File this skillYYH211/Claude-meta-skill2822 repos~1.9kAutomated safety check: PassMIT
Skill CreatorAzure/azqr79589 repos~8.2kAutomated safety check: PassApache-2.0
Claude Code Skill Developer Guidediet103/claude-code-infrastructure-showcase10k11 repos~3.5kAutomated safety check: PassMIT
Darwin Skill Optimizeralchaincyf/darwin-skill6.2k1 repos~4.7kAutomated safety check: PassMIT
Claude Code Command Developmentanthropics/claude-plugins-official38k10 repos~4.8kAutomated safety check: PassApache-2.0
Claude Code Plugin Structureanthropics/claude-plugins-official38k10 repos~3.4kAutomated safety check: PassApache-2.0

Similar skills

  • Skill Creator

    Azure/azqr

    Official

    Create new skills, modify and improve existing skills, and measure skill performance.

    795 GitHub starsUsed in 89 repos~8.2k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Skill Developer Guide

    diet103/claude-code-infrastructure-showcase

    A guide to creating and managing Claude Code skills with auto-activation: skill-rules.json triggers, hooks, enforcement levels, YAML frontmatter and progressive disclosure.

    10k GitHub starsUsed in 11 repos~3.5k tokens
    Agent WorkflowsAuto-check passed
  • Darwin Skill Optimizer

    alchaincyf/darwin-skill

    Scores SKILL.md files on a nine-dimension rubric, then improves them in a keep-or-revert loop with independent judge agents, test prompts, git history and human checkpoints.

    6.2k GitHub starsUsed in 1 repo~4.7k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Command Development

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code slash commands: Markdown files with YAML frontmatter, arguments, file references, bash context and interactive prompts.

    38k GitHub starsUsed in 10 repos~4.8k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Plugin Structure

    anthropics/claude-plugins-official

    Official

    Explains the directory layout, plugin.json manifest and component organization of a Claude Code plugin, including auto-discovery and portable paths.

    38k GitHub starsUsed in 10 repos~3.4k tokens
    Agent WorkflowsAuto-check passed
  • Skill Release Gate

    rohitg00/ai-engineering-from-scratch

    Evaluates an Agent Skill bundle before release for structure, trigger quality, artifact improvement, script correctness, safety, installed-tree integrity and host portability.

    66k GitHub stars~1k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from YYH211/Claude-meta-skill

All 8 skills in this repo
  • Software Copyright Writer

    YYH211/Claude-meta-skill

    根据真实代码仓库、官网页面、运行界面、模块范围和目标软著数量,分析软件著作权(软著)申报方向,拆分可申报主题,检查 Logo、版权、备案、截图和源码等材料约束,生成 3w-4w 字正文、局部代码片段、源码原文、网页截图证据和 .docx 文档。Use when Claude needs to prepare or split legitimate software copyright…

    282 GitHub stars~2.6k tokensUpdated 4 mo ago
    Auto-check passed
  • Daily AI News

    YYH211/Claude-meta-skill

    Aggregates and summarizes the latest AI news from multiple sources including AI news websites and web search.

    282 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • Prompt Optimize

    YYH211/Claude-meta-skill

    Expert prompt engineering skill that transforms Claude into "Alpha-Prompt" - a master prompt engineer who collaboratively crafts high-quality prompts through flexible dialogue.

    282 GitHub starsUsed in 2 repos~1k tokens
    Auto-check passed
  • Fastgpt Workflow Generator

    YYH211/Claude-meta-skill

    Generates production-ready FastGPT workflow JSON from natural language requirements.

    282 GitHub stars~5.5k tokensUpdated 4 mo ago
    Auto-check passed
  • Dry Refactoring

    YYH211/Claude-meta-skill

    Guides systematic code refactoring following the DRY (Don't Repeat Yourself) principle.

    282 GitHub starsUsed in 1 repo~4.5k tokens
    Auto-check passed
  • Frontend Design

    YYH211/Claude-meta-skill

    Creates unique, production-grade frontend interfaces with exceptional design quality.

    282 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed

Categories

Questions about Create Skill File

What does Create Skill File do?

Guides Claude in creating well-structured SKILL.md files following best practices. Create Skill File is an agent skill from YYH211/Claude-meta-skill.md files following best practices.

When should I use Create Skill File?

Create Skill File fits situations like: tasks that involve Skill authoring.

How do I install Create Skill File in Claude Code?

Run `npx skills add YYH211/Claude-meta-skill --skill create-skill-file -a claude-code`. Or copy the skill folder (create-skill-file in YYH211/Claude-meta-skill) into .claude/skills/create-skill-file in your project. Claude Code loads it when a task matches its description.

How do I install Create Skill File in Codex?

Run `npx skills add YYH211/Claude-meta-skill --skill create-skill-file -a codex`. Or copy the skill folder (create-skill-file in YYH211/Claude-meta-skill) into .agents/skills/create-skill-file in your project. Codex loads it when a task matches its description.

Can I use Create Skill File in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add YYH211/Claude-meta-skill --skill create-skill-file -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/create-skill-file, .gemini/skills/create-skill-file, .github/skills/create-skill-file and .opencode/skills/create-skill-file in your project.

What does Create Skill File need to run?

Going by SKILL.md and its folder, Create Skill File needs credentials named INTERNAL_API_KEY. Our summary lists: Python 3; A credential in INTERNAL_API_KEY.

Does Create Skill File access the network?

SKILL.md names 1 domain. As links in the text: docs.claude.com. This is read from the text; nothing was executed.

Is Create Skill File safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Create Skill File use?

Create Skill File is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Create Skill File use?

About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Create Skill File?

Skills that share tags, products or a category with Create Skill File: Skill Creator (Azure/azqr, 795 stars), Claude Code Skill Developer Guide (diet103/claude-code-infrastructure-showcase, 10k stars), Darwin Skill Optimizer (alchaincyf/darwin-skill, 6.2k stars) and Claude Code Command Development (anthropics/claude-plugins-official, 38k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Create Skill File?

YYH211 (a GitHub user) maintains it in YYH211/Claude-meta-skill, which has 282 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on May 15, 2026.

Source: YYH211/Claude-meta-skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.