Skip to content

Writing Skills

元技能

Use when creating new skills, editing existing skills, or verifying skills work before deployment.

Quick Start

Understand in 30 Seconds

Writing skills is test-driven development applied to process documentation.

Core Principle: If you haven't seen an agent fail without the skill, you don't know if the skill teaches the right thing.

When to Use

  • Creating new skills
  • Editing existing skills
  • Verifying skills work before deployment

Complete Guide

What is a Skill?

A skill is a reference guide for validated techniques, patterns, or tools.

Skills are: Reusable techniques, patterns, tools, reference guides Skills are not: Narratives about how you solved a problem once

SKILL.md Structure

Frontmatter (YAML):

  • Only two fields supported: name and description
  • name: Use only letters, numbers, hyphens
  • description: Third person, describe when to use

Iron Law

No skill without a failing test first

RED-GREEN-REFACTOR for Skills

  1. RED: Write failing test (baseline)
  2. GREEN: Write minimal skill
  3. REFACTOR: Close loopholes

Required Background