What Are Agent Skills? A Practical Guide
Understand SKILL.md packages, how agents load them, and when skills beat MCP, prompts, or rules.
Agent Skills are folders of instructions that teach coding agents how to do specific work: review a pull request, follow a design system, or run a deployment checklist. The ecosystem standardizes on a SKILL.md file at the root of each skill, optional scripts, and reference material in the same directory. Agents that support the format discover skills on disk and inject the markdown into context when a task matches the skill's description.
This guide explains what skills are, how SKILL.md frontmatter shapes discovery, how loading differs from MCP servers and ad-hoc prompts, and when your team should author a skill instead of another configuration file.
Table of contents
- Why skills exist
- Anatomy of a skill folder
- SKILL.md frontmatter
- How agents trigger skills
- Skills vs MCP, prompts, and rules
- When to write a skill
- Discover skills on Skilltree
Why skills exist
Large language models are generalists. Without structure, every session re-derives the same conventions: branch naming, test commands, security review steps, or how your design tokens map to components. Skills capture that expertise once, version it in Git, and let agents reload the same instructions across projects and teammates.
The open Agent Skills specification and the community skills CLI make skills portable between Claude Code, Codex, Cursor, and dozens of other agents. Skilltree curates public skills with SPDX licenses, source links, and equip commands so you can install without hunting repositories.
Versioning and code review
Because skills live in Git, they participate in the same review culture as application code. Authors open pull requests for new checklists, reviewers verify that scripts are safe to execute, and release tags pin what npx skills add owner/repo@v1 retrieves. That workflow is difficult to reproduce with ad-hoc system prompts buried in chat history.
Observability
When something goes wrong, you can diff the installed SKILL.md against upstream, read the skills-lock.json entry, and know which commit supplied the text. MCP logs tell you which tools fired; skills tell you which playbook the agent believed it was following. Both logs matter during incident review.
Anatomy of a skill folder
A minimal skill is a directory with SKILL.md. Richer skills add:
- Scripts — shell, Node, or Python helpers the agent may run locally.
- References — long-form docs the agent should read selectively.
- Assets — templates, sample configs, or images referenced from the skill text.
The CLI installs the whole folder into an agent-specific path (for example .agents/skills/{skill-name}/ or .claude/skills/{skill-name}/). Nothing requires a remote server: skills are files on disk, which makes them easy to audit in code review.
Example layout:
web-design-guidelines/
SKILL.md
references/
accessibility-checklist.md
scripts/
lint-ui.sh
Browse curated examples in the Skilltree catalog and inspect upstream trees linked from each skill page.
SKILL.md frontmatter
Agents and tooling use YAML frontmatter at the top of SKILL.md to decide whether and how to load the skill. Common fields (see creating skills in the skills repo):
| Field | Purpose |
|---|---|
name | Stable identifier; often matches the folder name. |
description | Short summary agents match against user intent — this is the primary trigger signal. |
license | SPDX id when publishing publicly. |
compatibility | Optional notes on agents or environments. |
The markdown body holds the actual procedure: steps, constraints, output formats, and links to your internal docs. Keep the description concrete ("Review React components for accessibility and performance") rather than vague ("Helps with code") so agents surface the skill at the right time.
How agents trigger skills
Triggering is not magic polling. Each agent implementation:
- Indexes skill folders under configured paths (project vs global).
- Reads frontmatter
nameanddescription(and sometimes the first paragraphs). - Selects a skill when the user task or tool policy matches that description.
Exact UX differs: some agents show a skill picker; others auto-attach when keywords align. The description field is therefore the contract between authors and runtime — treat it like an API summary.
Installation refreshes what is on disk. After npx skills add …, restart or reload the agent so indexes pick up new folders. Skilltree equip strings always target a specific agent flag (-a claude-code, -a cursor, etc.); see How to install Agent Skills for paths per agent.
Ecosystem discovery
Public skills surface on skills.sh and in the Skilltree catalog. Descriptions compete for attention the same way library READMEs do: precise verbs, clear scope, and honest compatibility notes win installs.
Skills vs MCP, prompts, and rules
Teams often stack multiple instruction layers. Use this table to pick the right tool:
| Mechanism | What it carries | Runtime needs | Best for |
|---|---|---|---|
Agent Skill (SKILL.md) | Versioned workflow prose + optional local scripts | Files on disk; no server | Repeatable engineering playbooks, reviews, scaffolding |
| MCP server | Tool definitions + live data/APIs | Running server + auth | Databases, tickets, browsers, proprietary APIs |
| One-shot prompt | Ephemeral instructions in chat | None | Experiments, one-off tasks |
IDE rules (.cursor/rules, AGENTS.md) | Always-on project constraints | Repo file | Baseline norms for every session |
Skills are not MCP. Skills teach how to behave and may document which MCP tools to call safely. MCP exposes callable tools with schemas. Many production setups use both: MCP for integrations, skills for the human-reviewed process around those integrations.
Skills vs rules files: Rules tend to apply globally whenever the agent opens the repo. Skills are modular packages you can install per project, share across repos via the CLI, and compose into loadouts. Prefer rules for immovable house style; prefer skills for workflows that change often or span multiple repositories.
Skills vs prompts: Prompts die when the chat ends. Skills survive in Git, appear in lockfiles, and can be security-audited before install (skills add integrates with skills.sh audits unless you pass --bypass-audit).
Official references:
When to write a skill
Author a skill when several conditions hold:
- Repeatability — The same sequence of checks or edits happens weekly.
- Teachability — You can write stable steps, examples, and anti-patterns.
- Shareability — Other repos or agents should reuse the package without copy-paste.
- Local scope — Most work uses repository files, CLI tools, or documented MCP calls (not secret remote state).
Skip a skill when:
- You only need a single paragraph reminder (use a short rule instead).
- The task requires live proprietary data with no stable procedure (MCP or custom tools first).
- Instructions change every hour (fix the underlying automation instead).
Start from a template:
npx skills init my-skill
Edit the generated SKILL.md, add references, and publish to a Git repo. Skilltree lists curated public skills as they pass editorial review.
Composition with loadouts
Single skills are atoms; loadouts are molecules. Once you understand frontmatter and install paths, graduate to scenario bundles so onboarding is one script instead of five.
Security habits
- Install from trusted sources; review
SKILL.mdand scripts before-yinstalls in CI. - Prefer project installs for team repos; use
-gonly when you trust global paths on your machine. - Never commit credentials into skills; reference environment variables instead.
FAQ
Do skills replace documentation sites? No. Skills instruct the agent during execution; docs sites remain the canonical human-readable source. Link from SKILL.md to your docs rather than duplicating entire manuals.
Can one repo hold many skills? Yes. Monorepos often expose a skills/ directory with dozens of entries; npx skills add can install all (--skill '*') or a subset.
Are skills sandboxed? They are markdown and local scripts on disk. Treat bundled scripts like any other repo dependency: read before running, especially with elevated permissions.
Discover skills on Skilltree
Skilltree does not mirror SKILL.md bodies. Each listing links to the upstream Git tree, license, dependency graph, and a copy-ready npx skills add command. Use Skills to browse by category, Agents to confirm install directories, and Loadouts when you need a scenario bundle instead of a single skill.
Instruction layering in real repositories
Mature repositories often combine AGENTS.md house rules, a handful of installed skills, and one or two MCP servers for ticketing or search. The agent session starts with rules, attaches skills when tasks match descriptions, and calls MCP tools when live state is required. Document that layering in your internal wiki so new hires know which file to edit when deployment policy changes (usually a skill) versus which token to rotate (usually MCP credentials).
Working with Anthropic and Vercel references
Anthropic documents how Claude products discover and execute skills in hosted and API contexts; the same SKILL.md shape applies locally when you use Claude Code. Vercel's open CLI and agent-skills repository demonstrate production-grade examples you can install verbatim before authoring your own. Treat those projects as normative samples for frontmatter tone, script layout, and licensing headers.
Next steps