AgentSkillsCN

skill-creator

用于创建和管理 Claude 代码技能的工具。当用户需要新建技能、验证技能结构,或打包技能以供分发时,可使用此工具。触发场景包括:创建自定义工作流、封装领域知识、构建文档生成功能模板,或集成特定工具与 API。

SKILL.md
--- frontmatter
name: skill-creator
description: Tools for creating and managing Claude Code Skills. Use when users need to create new skills, validate skill structure, or package skills for distribution. Triggers include creating custom workflows, encapsulating domain knowledge, building document generation templates, or integrating specific tools and APIs.

Skill Creator

Create high-quality custom Skills for Claude Code.

Core Principles

  1. Concise is Key — Only add information Claude doesn't already know; every piece must justify its token cost
  2. Appropriate Freedom — High freedom uses text guidance, low freedom uses specific scripts
  3. Progressive Loading — Metadata always loaded, body loaded on trigger, resources loaded on demand

Creation Workflow

code
1. Define Use Cases → Gather concrete scenarios and trigger conditions
2. Plan Contents    → Identify needed scripts, references, and assets
3. Initialize       → Run scripts/init_skill.py
4. Write Content    → Complete SKILL.md and bundled resources
5. Validate & Pack  → Run scripts/package_skill.py

Skill Structure

code
my-skill/
├── SKILL.md           # Required: Main file
├── scripts/           # Optional: Executable scripts
├── references/        # Optional: Reference docs (loaded into context on demand)
└── assets/            # Optional: Templates, images, etc. (not loaded into context)

SKILL.md Specification

Frontmatter (Required)

yaml
---
name: my-skill              # kebab-case, max 64 characters
description: Concise description of functionality and trigger scenarios. Must include WHEN to use.
---

Body Structure Patterns

PatternBest ForExample
Workflow-basedSequential processesPDF form filling, document approval
Task-basedMultiple independent operationsImage processing (crop/rotate/compress)
Reference-basedStandards or specificationsBrand guidelines, coding standards
Capability-basedIntegrated systemsProduct management, data analysis platform

Scripts

Initialize New Skill

bash
python scripts/init_skill.py <skill-name> --path <output-dir>

# Example
python scripts/init_skill.py my-analyzer --path ~/skills

Validate and Package

bash
python scripts/package_skill.py <skill-folder> [output-dir]

# Example
python scripts/package_skill.py ~/skills/my-analyzer ./dist

Quality Checklist

  • Description includes trigger conditions (WHEN to use)
  • SKILL.md body < 500 lines
  • No redundant docs (README, CHANGELOG, etc.)
  • Scripts tested and working
  • Large reference docs split out with guidance on when to read them

Common Patterns Reference

See references/patterns.md for:

  • Sequential workflow pattern
  • Conditional branching pattern
  • Output template pattern
  • Example-driven pattern