This skill should be used when the user asks to "create a skill", "create an agent", "write a SKILL.md", "write an agent markdown", "add a new skill to plugin", "add a new agent to plugin", or needs guidance on YAML frontmatter format, skill structure, agent structure, or plugin component authoring for Claude Code plugins.
This skill provides the definitive YAML frontmatter specifications and file structure requirements for creating Claude Code plugin skills and agents. Always consult this skill before authoring any SKILL.md or agent markdown file.
Before writing any SKILL.md or agent file, read an existing official example first to verify the format. Never rely solely on a plan or memory — always validate against a real reference.
plugin-name/skills/skill-name/SKILL.md
Every SKILL.md must begin with YAML frontmatter containing name and description:
---
name: my-skill-name
description: This skill should be used when the user asks to "phrase 1", "phrase 2", "phrase 3", or discusses topic-area. Provides guidance on specific-domain.
version: 0.1.0
---
| Field | Required | Format | Notes |
|-------|----------|--------|-------|
| name | Yes | lowercase, hyphens, 3-50 chars | Must start/end with alphanumeric |
| description | Yes | Third-person with trigger phrases | "This skill should be used when..." |
| version | No | Semantic version | e.g. 0.1.0 |
| license | No | SPDX identifier | e.g. MIT |
references/ subdirectoryskill-name/
├── SKILL.md # Required — frontmatter + core instructions
├── references/ # Optional — detailed docs loaded on demand
│ └── detailed-guide.md
├── examples/ # Optional — working examples
│ └── sample.sql
└── scripts/ # Optional — utility scripts
└── validate.sh
plugin-name/agents/agent-name.md
Every agent file must begin with YAML frontmatter containing name, description, model, and color:
---
name: my-agent
description: |
Use this agent when the user asks to "do X", "check Y", or needs Z. Examples:
<example>
Context: User has just written code and wants review
user: "Review my code for issues"
assistant: "I'll use the my-agent agent to review your code."
<commentary>
User explicitly requesting review, trigger agent.
</commentary>
</example>
<example>
Context: Another triggering scenario
user: "Check this file for problems"
assistant: "Let me use my-agent to analyze the file."
<commentary>
File analysis request matches agent scope.
</commentary>
</example>
model: inherit
color: blue
tools: ["Read", "Grep", "Glob"]
---
Agent system prompt body goes here...
| Field | Required | Format | Notes |
|-------|----------|--------|-------|
| name | Yes | lowercase, hyphens, 3-50 chars | Pattern: ^[a-z][a-z0-9]*(-[a-z0-9]+)*$ |
| description | Yes | Text + 2-4 <example> blocks | "Use this agent when..." |
| model | Yes | inherit / sonnet / opus / haiku | Prefer inherit |
| color | Yes | Color name | blue, cyan, green, yellow, magenta, red |
| tools | No | JSON array of tool names | e.g. ["Read", "Grep"] |
The description is the most important field — it controls when Claude triggers the agent.
Must include:
<example> blocks showing usage scenariosContext, user, assistant, <commentary>Bad: "Reviews schemas for compliance." (no examples, no trigger conditions)
Good: Multiline with | pipe, trigger conditions, and 2-4 concrete examples.
["Read", "Grep", "Glob"]- Read)Read, Grep, Glob)| Color | Use Case |
|-------|----------|
| blue / cyan | Analysis, review |
| green | Success-oriented, generation |
| yellow | Caution, validation |
| red | Critical, security |
| magenta | Creative, transformation |
<!-- WRONG — no frontmatter -->
# My Skill
Content here...
<!-- CORRECT -->
---
name: my-skill
description: This skill should be used when...
---
# My Skill
Content here...
<example> Blocks# WRONG — description without examples
description: Reviews code for issues.
# CORRECT — description with examples
description: |
Use this agent when... Examples:
<example>
Context: ...
user: "..."
assistant: "..."
<commentary>...</commentary>
</example>
# WRONG — YAML list
tools:
- Read
- Grep
# WRONG — comma string
tools: Read, Grep, Glob
# CORRECT — JSON array
tools: ["Read", "Grep", "Glob"]
# WRONG
description: Use this skill when you need to create tables.
# CORRECT
description: This skill should be used when the user asks to "create a table"...
name and descriptiondescription uses third person with quoted trigger phrasesreferences/name, description, model, colordescription includes 2-4 <example> blocks with <commentary>model set (prefer inherit)color set with appropriate meaningtools in JSON array format (if restricting)npx skills add MattAtAIEra/skill-and-agent-authoring下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer