Anthropic Skill Paradigm
1. Structure
Skill is a directory contains:
1 | my-skill/ |
1.1 SKILL.md
The SKILL.md file must start with YAML frontmatter that contains some
required metadata: name, description. At
startup, the agent pre-loads the name and
description of every installed skill into its system
prompt.
This metadata is the ==first level== of progressive disclosure: it provides just enough information for Claude to know when each skill should be used without loading all of it into context.
The actual body of this file is the ==second level== of detail.
If Claude thinks the skill is relevant to the current task, it will
load the skill by reading its full SKILL.md into
context.

1.2 Reference & Scripts
As skills grow in complexity, they may contain too much context to fit into a single ==SKILL.md==, or context that’s relevant only in specific scenarios.
In these cases, skills can bundle additional files within the skill directory and reference them by name from SKILL.md. These additional linked files are the ==third level== (and beyond) of detail, which Claude can choose to navigate and discover only as needed.
In the PDF skill shown below, the SKILL.md refers to two
additional files (reference.md and forms.md)
that the skill author chooses to bundle alongside the core
SKILL.md.
By moving the form-filling instructions to a separate file
(forms.md), the skill author is able to keep the core of
the skill lean, trusting that Claude will read forms.md
only when filling out a form.

Progressive disclosure is the core design principle that makes Agent Skills flexible and scalable. Like a well-organized manual that starts with a table of contents, then specific chapters, and finally a detailed appendix, skills let Claude load information only as needed:
| Level | File | Context Window | # Tokens |
|---|---|---|---|
| 1 | SKILL.md Metadata (YAML) | Always Loaded | ~100 |
| 2 | SKILL.md Body (Markdown) | Loaded when skill triggered | <5k |
| 3+ | Bundled Files (text files, scripts, data) | Loaded as-needed by Agent | unlimited* |
Agents with a filesystem and code execution tools ==don’t need to== read the entirety of a skill into their context window when working on a particular task.
This means that the amount of context that can be bundled into a skill is effectively unbounded.

Skills can also include code for Claude to execute as tools at its discretion:
Large language models excel at many tasks, but certain operations are better suited for traditional code execution. For example, sorting a list via token generation is far more expensive than simply running a sorting algorithm. Beyond efficiency concerns, many applications require the deterministic reliability that only code can provide.
In our example, the PDF skill includes a ==pre-written Python script== that reads a PDF and extracts all form fields.
Claude can run this script without loading either the script or the PDF into context. And because code is deterministic, this workflow is consistent and repeatable.

2. Concrete Skill Implementation
skills/skills at main · anthropics/skills
2.1 drawio-skill
drawio-skill/skills/drawio-skill at main · Agents365-ai/drawio-skill
structure:
1 | . |
2.1.1 SKILL.md
1 | --- |
2.1.1.1 frontmatter
frontmatter is the part will be loaded into LLM’s
context window.
name: skill namedescription: the trigger mechanismlicense: optionalallowed-tools: optionalmetadata: optional; this skill.md fills this field with some other info.
2.1.1.2 Draw.io Architecture Studio
Produce editable .drawio artifacts, not flattened
pictures. The preferred entrypoint is
scripts/diagramctl.py, which unifies generation,
incremental sync, multi-view projection, semantic queries/tests/reviews,
failure analysis, and accessible publishing over a shared Diagram
IR.
2.1.1.2.1 Choose the workflow
This is a function route table:
| Request | Route |
|---|---|
| Natural-language diagram with precise styling | Read references/diagram-types.md, then
references/xml-authoring.md and author XML |
| Standard flowchart/mindmap/gantt/timeline/etc. with no special styling | If draw.io >=30, read
references/mermaid-authoring.md and convert Mermaid to
native .drawio |
| Large graph (~15+ nodes) that needs automatic layout | Use autolayout.py; read
references/autolayout.md before passing any
--layout value |
| Code, Terraform, K8s, compose, SQL, OpenAPI, AsyncAPI, or CI source | Use diagramctl.py build; read
references/diagram-ir.md |
| Protocol Buffers schema (.proto) | Use protoimports.py or
diagramctl.py build; read
references/toolbox.md |
| GraphQL SDL schema (.graphql/.gql) or introspection JSON | Use graphqlerd.py or diagramctl.py build;
read references/toolbox.md |
| Running cluster/stack/cloud (actual state, not declared config) | Read references/live-infra.md, then use
tfstate.py, dockerimports.py, or
k8simports.py - |
| Update a generated diagram without losing manual layout | Use diagramctl.py sync; read
references/diagram-ir.md |
| Executive/system/deployment/data-flow/security views | Use diagramctl.py views; read
references/diagram-ir.md |
| Query, architecture policy, review, what-if, or guided walkthrough | Read references/semantic-workflows.md |
| MCP host (Claude Desktop, Cursor, VS Code, Codex) should call these workflows | Register scripts/diagramctl_mcp.py; read
references/mcp.md |
| Prompt phrasing for a diagram type or semantic workflow | Read references/cookbook.md |
| Enforce architecture rules or visual diffs in GitHub Actions CI | Read references/ci-gate.md |
| Rendered before/after/diff images as a PR review comment | Use prdiff.py; read
references/pr-bot.md |
Existing .drawio to
HTML/PPTX/Mermaid/Markdown/animation/runbook |
Read references/toolbox.md;
diagramctl.py transform exposes the existing tools |
| Pipeline, journey, or subsystem map drawn as a metro/subway map | Use tubemap.py; read
references/tubemap.md |
| Shape, cloud/vendor, AI, or Databricks icon | Read references/shapes.md or
references/databricks.md; never guess shape names |
| Learn/apply/manage a visual style | Read references/style-presets.md |
| Extract a reusable style from an existing diagram or theme | Read references/style-extraction.md |
| Existing image to editable diagram (screenshot, whiteboard photo, legacy PNG) | Read references/derasterize.md |
| Export/platform problem | Read references/troubleshooting.md; for access/network
questions read references/security.md |