Bible Network Crypto DeFi Onchain RWA AI Agent Stablecoin Chain SAFU CryptoTax DeFAI AGI Claude Me Claude Skill Claude Design Claude Cowork
Independent Media
Not affiliated with any project
Learn Claude Skills. Do Everything Better.
claudeskill-me.com
LATEST
Why Your Claude Code Skill Silently Stops Triggering: The 15,000-Character Description Budget No One Warns You About  ·  Effort vs. Temperature in Claude: What's the Difference, and Why One of Them No Longer Works on Newer Models  ·  anthropics/skills Review: The Official GitHub Repo Has 168k Stars and Solid Content — The Problem Is You Might Never Find It  ·  Subagents Aren't Smarter Mini-Claudes — They Solve Isolation, Not Capability  ·  How Long Should SKILL.md Actually Be? The Logic Behind the Official 500-Line Guideline  ·  How to Actually Use XML Tags in Prompts: 3 Before/After Examples vs. Plain Text
Glossary · Workflow

YAML Frontmatter

Workflow beginner

30-Second Version · For the impatient
A YAML-formatted Block wrapped in --- markers at the very top of a Markdown file, used to describe the file's metadata — the part of a Skill that always loads first in the three-layer Progressive Disclosure model.
Full Explanation +
01 · What is this?

What is YAML Frontmatter, and how does it differ from regular file content?

YAML frontmatter is a standalone Block at the very top of a Markdown file, wrapped between a pair of --- markers, containing metadata about the file — name, description, version, license, and so on — written in YAML format. The difference from the file's main body is this: the body is substantive content meant to be read and understood by a reader (or Claude), while frontmatter is a structured label describing "what this content is," and it's usually not shown directly to users — instead it's used by the system for indexing, filtering, or deciding whether to load the file at all.

In a Claude Code Skill file, frontmatter is only parsed correctly if the opening --- is literally the file's first line; if any other text comes before it, the entire file is treated as having no frontmatter, and all of its content gets handled as ordinary documentation instead.

02 · Why does it exist?

Why does YAML Frontmatter exist, and what problem does it solve?

Without frontmatter, the only way for a system to determine what a file "is" would be to read the entire content and analyze it — tolerable with a handful of files, but when a system might have dozens of Skills installed at once, reading every Skill's full content on every startup just to judge relevance burns through a large amount of unnecessary context.

This is exactly what frontmatter solves: it condenses "what this is and when to use it" into a few dozen tokens of metadata, so the system only needs to read that small Block at startup to make an initial judgment, and only loads the full body when a Skill is actually needed. This is the first layer of what the Skill architecture calls three-layer Progressive Disclosure — metadata always loads, the body loads on trigger, and extension files load only when actually needed.

03 · How does it affect your decisions?

What does YAML Frontmatter actually look like in practice?

Under the Claude Code Skill standard, only six fields are officially recognized in frontmatter: the required name (lowercase, hyphen-separated) and description (explaining what the Skill does and when to use it), plus the optional license, compatibility, metadata, and allowed-tools. When Claude Code starts up, it only reads each Skill's name and description — a step that costs an extremely small number of tokens, so even having many Skills installed at once doesn't create a noticeable burden.

Worth noting: the description field matters far more than any other. It's the only thing the system matches against when deciding whether to trigger a given Skill — if it isn't specific enough, Claude may never trigger the Skill even with a perfectly complete body, simply because it can't judge the relevance. This is also why most authoring guides emphasize the same point: what's most worth polishing in frontmatter usually isn't the number of fields, it's how precisely that one description line is written.

04 · What should you do?

Understanding how YAML Frontmatter works — how does this actually affect how I write a Skill?

The most direct effect is on the order you write things in: get description right first — specific enough that Claude can tell at a glance whether a given request should trigger it — before thinking about what goes in the body, not the other way around. Many newcomers spend their effort on making the body as detailed as possible while overlooking that if description doesn't judge accurately, Claude never even gets to the step of reading the body — no matter how well-written it is, it never gets a chance to matter.

Another practical pitfall is getting the position of that opening --- marker wrong — an extra blank line or comment before it, for instance, causes frontmatter parsing to fail and the whole file gets treated as plain content. In this case the Skill usually doesn't throw an obvious error, it just quietly fails to work (no recognized name). After writing a Skill, it's worth actually testing whether Claude triggers it in the right situation, rather than just eyeballing the formatting.

Sources: Agent Skills - Claude Platform Docs, Extend Claude with skills - Claude Code Docs
Real-World Example +

The open-source data-engineering-skills project on GitHub is a real-world case: it maintains a separate Skill folder for each of several data engineering technologies (Apache Iceberg, Apache Flink, and others), and every SKILL.md in those folders keeps its frontmatter to just a lean name and description, deliberately keeping the SKILL.md body short. Only when a particular technology genuinely needs substantial offline detail, deterministic scripts, or reusable templates does the project add references/, scripts/, or assets/ subdirectories — a concrete implementation of the three-layer progressive disclosure principle in a real open-source project.

Common Misconceptions +
✕ Misconception 1
× Misconception: the more fields frontmatter has and the more detailed they are, the more reliably the Skill gets triggered, when actually: at startup the system only reads the name and description fields to judge relevance — other fields (license, compatibility, metadata) have no effect on trigger accuracy, and the only thing that actually decides triggering is how specific description is
✕ Misconception 2
× Misconception: frontmatter is purely formatting decoration and removing it doesn't affect the Skill's actual content, when actually: if the opening --- marker is positioned wrong and parsing fails, the entire file gets treated as having no frontmatter at all, which can leave the system unable to recognize it as a triggerable Skill in the first place — no matter how complete the body is, it never gets used
The Missing Link +
Direct Impact

The advantage is letting the system quickly judge the relevance of many Skills at an extremely low token cost, without reading full content one by one; the drawback is that this mechanism depends heavily on how precisely description is written — a vague description can leave a Skill never properly triggered even with a well-crafted body, effectively wasted effort.

Ask a Question
Please enter at least 10 characters
More Related Topics