跪拜 Guibai
← All articles
VibeCoding · Android · Kotlin

Building Your First Agent Skill: From Messy Notes to Structured Meeting Summaries

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

Agent Skills are the packaging format that turns one-shot prompts into reusable, discoverable workflows. Getting the frontmatter description right determines whether an agent ever finds your skill, and structuring instructions for progressive disclosure keeps context windows lean while still carrying full documentation and templates.

Summary

Agent Skills are built around a single SKILL.md file with YAML frontmatter and executable Markdown instructions. The frontmatter's description field is the routing mechanism: it tells the agent when to trigger the skill by matching user intent, not just keywords. A well-written description states what the skill does, when to use it, and what capabilities it includes, using language real users would type.

The instruction body must be specific and ordered by priority. Critical checks go at the top, not buried at the bottom. Supporting files in references/, scripts/, and assets/ directories stay out of context until the workflow explicitly calls for them, keeping the skill lightweight despite carrying templates, style guides, or validation scripts.

Success criteria are defined before writing any code, split into quantitative metrics (trigger accuracy across 10+ requests) and qualitative checks (no fabricated information, every action item has an owner). The skill is placed in an agent-specific directory like .claude/skills/ or .codex/skills/, with ~/.agents/skills/ serving as a shared location for multi-agent setups.

Takeaways
Only SKILL.md is required; references/, scripts/, and assets/ are optional directories loaded on demand.
The description field must combine what the skill does, when to use it, and what capabilities it includes, using language a real user would type.
Place the most important instructions at the top of the file, not hidden at the bottom where the agent might miss them.
Supporting files are never auto-discovered; every file must be explicitly referenced in the instruction body for the agent to read it.
Define quantitative success criteria (trigger accuracy) and qualitative criteria (no hallucinations, structured output) before writing the skill.
Skill directories vary by agent: .claude/skills/ for Claude Code, .codex/skills/ for OpenAI Codex, .trae/skills/ for Trae.
~/.agents/skills/ works as a shared location for Codex but is not guaranteed across all agents; always check the target agent's documentation.
Conclusions

Progressive disclosure means a skill with dozens of reference files can still be lightweight because only SKILL.md enters context initially; the rest is fetched on demand.

The description field functions as a routing key, not documentation. Its quality directly determines whether the skill triggers silently or requires the user to name it explicitly.

Explicit file references in instructions are a reliability mechanism: the agent has no reason to read a file unless the workflow tells it to, which prevents context pollution but demands disciplined authoring.

Success criteria written before implementation serve as a contract for testing. Without them, a skill that 'seems to work' may fail silently on edge cases or unrelated requests.

Concepts & terms
Progressive Disclosure
A loading strategy where an agent first sees only a skill's name and description to decide relevance, then reads the full instruction body only after confirming a match, and fetches supporting files only when explicitly referenced in the workflow.
Frontmatter
YAML metadata at the top of SKILL.md, wrapped in --- delimiters, containing at minimum a name and description field. It is the first thing an agent reads to determine whether to trigger the skill.
Agent Skills Open Specification
A community specification defining the SKILL.md format, directory structure, and naming conventions (1-64 lowercase letters, numbers, hyphens; name must match parent directory) to enable cross-agent compatibility.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗