Agent Skill Files: 20 SKILL.md Categories and Templates
This article explains how agent skills work as loadable directories rather than longer system prompts, and why that distinction matters. It breaks skills into four categories based on context usage and execution determinism, provides three reusable SKILL.md templates, and covers common installation and distribution practices along with a checklist for validating skill design. Readers will learn how to structure a skill library that is testable, reusable, and observable.
1. Aligning the Concept: A Skill Is a Loadable Directory, Not a Prompt
Many teams treat a “skill” as a longer system prompt, and this is the most common misconception. A skill is essentially a packaged capability organized as a directory: the root holds a main instruction file (conventionally named SKILL.md) that describes what the skill does, when to use it, and which steps to follow. Larger reference material used only in specific branches is split into separate documents (such as REFERENCE.md), and deterministic executable logic goes into a scripts/ directory. The coding tool or agent runtime loads these resources dynamically based on the task.
This design delivers three direct benefits:
- Context loads on demand. Unrelated skill content does not stay in context, avoiding the attention dilution caused by stuffing everything into the prompt.
- Separation of responsibilities. Judgment logic lives in the main file, factual long-form documents stay external, and scripts handle deterministic computation, leaving less room for the model to improvise.
- Version control. The directory is the unit, so it can go into a code repository, be reviewed, and be rolled out gradually, instead of being scattered across chat logs.
One common misunderstanding needs clarification: the official example repository is not the specification itself. The specification document and the starter template exist independently; the examples only demonstrate how to write one. This is usually why the number “20 skill files” does not add up—empty templates get counted along with the examples. In practice there are 19 under the examples directory plus 1 empty template in the templates directory, for a total of 20. When making technical decisions, treat the specification document as authoritative, the template as the starting point, and the examples as reference; do not mix the three.
2. Four Categories: Classify by Cognitive Load, Not by Feature Nouns
The classification dimension determines reuse efficiency. Classifying by business nouns (such as “contracts” or “reports”) blurs the boundaries between skills. A more reliable approach is to divide them into four categories based on context footprint and execution determinism.
Category 1: Lightweight Routing (single responsibility, main file is everything)
Characteristics: the main instruction file is usually under 50 lines, describing only trigger conditions and a few steps, with almost no external material needed. Typical scenarios include code style constraints, commit message conventions, and naming conventions. The value of this category is “high frequency, low cost,” so it should be deliberately kept short.
Category 2: Externalized Knowledge (thin main file, thick reference documents)
Characteristics: the main file only provides navigation, pointing to which section of REFERENCE.md to read when situation X occurs. Typical scenarios include protocol details, data dictionaries, and compliance clauses. The key rule is do not pile facts into the main file, or the dynamic loading mechanism becomes pointless.
Category 3: Script-Enhanced (deterministic logic pushed down)
Characteristics: the directory contains scripts/, and the main file explains when to call them, what the parameters mean, and how to fall back on failure. Typical scenarios include format conversion, batch validation, and structured extraction. The principle is clear: anything that can be written as tested code should not be left to on-the-spot model reasoning.
Category 4: Composite Orchestration (multiple skills working together)
Characteristics: the main file takes on orchestration duties, declaring prerequisite skills, handoff formats for artifacts, and termination conditions. Typical scenarios include chains from requirements to test cases, or from logs to root-cause hypotheses. This category is the easiest to lose control of, so boundaries and “what not to do” must be stated explicitly.
3. Templates You Can Copy Directly
Template A: Minimal Viable Skeleton
# Skill Name## When to Use- Trigger scenario 1 / Trigger scenario 2## When Not to Use- Counter-examples (avoid false triggers)## Steps1. Read the input and confirm required fields2. Execute by the rules; ask about missing fields, do not guess3. Output a structured result## Output Format- Fields and example
Template B: Externalized Knowledge
# Skill Name## Navigation- Field definitions → REFERENCE.md#fields- Boundary conditions → REFERENCE.md#boundaries## Hard Constraints- Do not fill in values from memory that do not appear in the reference document
Template C: Script-Enhanced
# Skill Name## Invocationscripts/convert.py --input <path> --format <fmt>## Failure Handling- Non-zero exit code: keep the original input, report the failure reason, do not produce a partial artifact## Validation- Output must pass scripts/validate.py
4. Common Installation and Distribution Practices (Neutral Description)
Loading mechanisms differ slightly across entry points, but the engineering actions are largely the same:
- Local development tools: add a source through a plugin-marketplace-style mechanism, then install a specific set of skills on demand. Avoid installing everything at once, or context usage and retrieval noise both increase.
- Online chat environments: skills may already be built in, so confirm availability first before deciding whether to maintain them locally, avoiding duplicate effort.
- API invocation scenarios: prefer platform-provided capabilities, or upload a custom skill package, and complete authentication and invocation following the official quickstart documentation.
If an organization needs to host skill packages and runtime artifacts, a combination of general cloud capabilities can be used: object storage for skill packages and reference documents, a container platform for execution scripts, log and monitoring services for observability, and a message queue for asynchronous decoupling.
5. Implementation Checklist
- Does the main instruction file keep only judgment and steps, with facts externalized?
- Is there a “When Not to Use” section to suppress false triggers?
- Has deterministic logic been pushed down into testable scripts?
- Are failure paths explicit (no guessing, no partial artifacts)?
- Is the skill granularity single-purpose, and does any composite orchestration declare prerequisites and termination conditions?
By following these four categories and three templates, a skill library can shift from a pile of prompts to an engineering asset that is testable, reusable, and observable.
