跪拜 Guibai
← All articles
ClaudeCode · AIAutomation · SkillDevelopment · ProductivityTools · PromptEngineering

Claude Code Skills Are Just a YAML Header and a Markdown Body

By 嘟嘟0717 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Claude Code Skills turn any repetitive, structured-output task into a single reusable file—no separate tooling, no API integration. The description field alone determines whether the Skill fires at the right moment, so getting it wrong means the Skill silently never runs.

Summary

A meeting-minutes Skill turns a 500-line rambling transcript into a structured table of topics, conclusions, and action items. An AI daily news Skill searches TechCrunch, The Verge, Hacker News, and Reddit in parallel, filters 8–15 items, and outputs a filterable, responsive HTML page. Both follow the same pattern: unstructured input in, fixed-format structured output out.

The underlying mold is Anthropic's skill-creator, a meta-Skill that defines an iterative loop—write a draft, run parallel tests with and without the Skill, score the results, improve, and repeat until the benchmark data justifies packaging into a .skill file. Every SKILL.md file has exactly two required parts: a YAML frontmatter with a name and a description (the most critical field for triggering), and a Markdown body typically organized into processing flow, output template, quality requirements, examples, and edge-case notes.

The writing philosophy departs from rigid MUST/NOT rules. Explaining why a constraint matters produces better results than all-caps commands. Imperative sentences, a 500-line cap, and example-driven instruction carry the rest.

Takeaways
Every Claude Code Skill is just a directory with a SKILL.md file; scripts, references, and assets are optional.
The YAML description field is the single most important piece—it controls when Claude triggers the Skill, and vague wording causes silent failures.
skill-creator runs parallel evaluations (with-Skill vs. baseline) to produce benchmark data on pass rate, latency, and token cost.
The run_loop.py script auto-optimizes the description by generating 20 trigger queries and iterating five rounds to find the best wording.
Writing instructions that explain why a rule matters outperforms all-caps MUST and NEVER directives.
Keep SKILL.md under 500 lines; anything longer belongs in a references/ subdirectory loaded on demand.
One good Input → Output example in the Skill body is more effective than pages of prose instructions.
Conclusions

Skill quality hinges almost entirely on the description field, yet most first drafts treat it as an afterthought—the automated optimization loop exists precisely because humans are bad at guessing which keywords Claude will actually latch onto.

The parallel baseline evaluation is the mechanism that makes Skill development empirical rather than superstitious; without it, you're just hoping your edits helped.

Treating the Skill body as a set of explained constraints rather than a list of commands mirrors the difference between training a junior engineer and micromanaging one—the AI generalizes better when it understands intent.

Concepts & terms
skill-creator
Anthropic's official meta-Skill that defines a standardized workflow for creating, testing, evaluating, and packaging Claude Code Skills. It includes sub-agents for grading, blind A/B comparison, and benchmark analysis.
SKILL.md
The single required file in every Claude Code Skill directory. It contains a YAML frontmatter block (name and description) and a Markdown body with processing instructions, output templates, quality criteria, examples, and edge-case notes.
Parallel comparative evaluation
A testing method where each test case runs twice—once with the Skill active and once without (baseline)—to produce quantitative benchmark data comparing pass rates, latency, and token consumption.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗