跪拜 Guibai
← All articles
Developer

Agent Skills Are Just Folders with a Manifest — Here's the Full Spec and How to Write One

By 神奇小汤圆 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Skills are the packaging format that turns a general-purpose coding agent into a domain specialist without fine-tuning. Knowing the spec means teams can version, share, and compose expert behaviors the same way they manage code — and the growing open-source skill registries lower the cost of adopting battle-tested agent workflows.

Summary

A Skill boils down to a folder with a required SKILL.md file that carries metadata — name, description, version — and a Markdown body that injects role definitions, step-by-step instructions, output formats, examples, and error handling into the agent. Optional subdirectories hold executable scripts, reference documents, and template assets. The format is governed by the agentskills.io specification and Anthropic's official guide, with a growing ecosystem of community repositories aggregating thousands of pre-built skills.

Skills install either globally into an agent's own SKILLS directory or scoped to a single project under a `.opencode/skills` (or equivalent) folder. A skill-creator meta-skill from Anthropic can generate new skills from a natural-language prompt, collapsing the authoring loop into a single command.

The design philosophy is progressive disclosure: the metadata layer acts as a lightweight trigger scanned across all skills, the instruction layer swaps in a domain-specific SOP once matched, and the resource layer provides deterministic scripts and reference material for execution. This mirrors how a human expert recalls a mental checklist only when a relevant problem arises, rather than keeping every procedure active at all times.

Takeaways
Every Skill is a folder whose name must match the `name` field in SKILL.md, using lowercase letters, digits, and hyphens only.
The `description` field in YAML frontmatter is the sole signal an agent uses to decide whether to load the skill; it must describe function, trigger conditions, and value in 1–2 sentences.
SKILL.md body instructions should use imperative mood and cover role definition, step-by-step procedures, output format, few-shot examples, and error handling.
Optional `scripts/`, `references/`, and `assets/` directories supply deterministic execution, factual lookup, and templates that the instruction layer can invoke.
Skills can be installed globally (agent-level) or per-project (e.g., under `.opencode/skills/`), with the exact path varying by agent.
Anthropic ships a skill-creator skill that bootstraps new skills from a natural-language prompt, reducing authoring to a single chat command.
Progressive disclosure splits a skill into three layers: metadata for intent matching, instructions for SOP injection, and resources for deterministic execution and verification.
Conclusions

The skill format is deliberately file-system-native — no registry, no API, no packaging tool required — which makes it trivially versionable in Git and composable across different agent runtimes.

Progressive disclosure is a cost-management strategy disguised as a design pattern: keeping only metadata in context until a skill is triggered avoids blowing out the prompt window with unused expertise.

The instruction layer effectively performs a runtime fine-tune via prompt engineering, swapping the agent's default reasoning chain for a domain-specific SOP without touching model weights.

Community skill registries are growing fast (6,000+ entries on agent-skills.md alone), suggesting that reusable agent behaviors are being commoditized the way npm packages were a decade ago.

Concepts & terms
Progressive Disclosure
A cognitive architecture for AI agents where only lightweight metadata is always in context; full instructions and resources load on demand when intent matches, mimicking how a human expert recalls detailed procedures only when a relevant problem arises.
SKILL.md
The required manifest file inside every Skill folder, consisting of YAML frontmatter (name, description, optional version, license, compatibility) and a Markdown body that defines the agent's role, step-by-step instructions, output format, examples, and error handling.
Skill Creator
Anthropic's meta-skill that generates new Agent Skills from a natural-language prompt, automating the creation of the folder structure, SKILL.md metadata, and instruction body.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗