Skills Structure and Best Practices
Skills are reusable workflow packages for agents.
Each skill centers on a SKILL.md file plus optional support files.
Required Skill Shape
Section titled “Required Skill Shape”Every skill needs:
SKILL.md- YAML frontmatter with:
namedescription
Everything else is optional and loaded on demand.
Note: some runtimes can infer missing fields (for example deriving name from folder), but production skills should set both explicitly.
Name and Description Rules
Section titled “Name and Description Rules”name and description are mission-critical because they drive discovery and activation.
- Keep
nameshort, lowercase, and hyphenated - Action-oriented names are easier to reason about (for example
analyzing-time-series) - Use
descriptionto explain both:- what the skill does
- when to use it
- Include keywords users naturally type
- Follow provider-specific limits for metadata length/format
Writing the SKILL.md Body
Section titled “Writing the SKILL.md Body”There is no single required body format, but predictable skills usually share these traits:
- Step-by-step workflow
- Explicit edge-case handling
- Clear “skip only if” conditions
- Deterministic output expectations
A practical guideline is to keep core instructions concise (often under ~500 lines) and move bulky examples to external files.
Optional Folders
Section titled “Optional Folders”Common optional directories:
scripts/: executable logicreferences/: long background docs and interpretation guidesassets/: templates, schemas, logos, sample files
Operational guidance:
- Script dependencies must be documented and validated
- Add error-handling expectations for critical scripts
- Prefer forward slashes in paths for cross-platform behavior
Progressive Disclosure
Section titled “Progressive Disclosure”Skill systems usually load in phases:
- Skill metadata (
name+description) SKILL.mdbody when triggered- Referenced files/scripts only if needed
This keeps context windows cleaner and improves token efficiency.
Skill Design Pattern
Section titled “Skill Design Pattern”Prefer many focused skills over one monolithic skill:
- One skill for domain analysis
- One skill for output formatting
- One skill for compliance/review
Composable skills are easier to test and evolve.
Minimal Example
Section titled “Minimal Example”---name: generating-practice-questionsdescription: Generate practice questions from lecture notes. Use when a user asks for quizzes, exams, or comprehension checks.---
## Workflow1. Parse input notes and extract learning objectives.2. Generate question types in required order.3. Render output using requested template format.4. Validate structure before returning final artifact.Evaluation Before Production
Section titled “Evaluation Before Production”Run a basic release gate:
- Metadata check: naming, description quality, trigger clarity
- Flow check: workflow order and edge-case handling
- Output check: file tree and output format correctness
- Human review: domain expert feedback
- Model matrix: test on each target model/runtime
For script-heavy skills, unit-test scripts independently, then test skill orchestration behavior.
Common Mistakes
Section titled “Common Mistakes”- Overloading
SKILL.mdwith huge static content - Missing “when to use” trigger guidance
- Ambiguous steps that reduce repeatability
- Mixing runtime/session details into reusable instructions
- Treating template-generation tools as autopilot without explicit constraints