By Sagar Shankaran, Founder of CallSphere
Inside the architecture of Claude Agent Skills — folder layout, the metadata index, discovery, on-demand loading, and how skills compose with MCP tools.
Key takeaways
The first time an engineering org adopts Agent Skills across more than a handful of teams, the question stops being "how do I write one" and becomes "how does this actually work under the hood." If you don't understand the internals, you end up with a hundred overlapping skills, a context window that bloats on every turn, and no idea why Claude picks one skill over another. This post walks the full architecture: what a skill is on disk, how Claude knows it exists, when it gets loaded, and how all the pieces fit together end to end.
SKILL.md frontmatter (name + description) is the single most important architectural lever — it is the index Claude searches.Strip away the marketing and a skill is a directory. At minimum it contains a SKILL.md file with YAML frontmatter and a Markdown body. Optionally it carries scripts (Python, shell, anything executable), reference documents, templates, and example files that the body can point to. An Agent Skill is a self-contained folder of natural-language instructions and supporting files that Claude reads at runtime to perform a specialized task without those instructions living permanently in the system prompt.
The frontmatter is the load-bearing part. It holds a name and a description, and the description is what Claude reads when deciding whether the skill applies. The body below the frontmatter can be long and detailed, because it is only pulled into context after the skill has been selected. This split — tiny always-on header, large on-demand body — is the architectural heart of the whole system.
my-skill/
SKILL.md # frontmatter + instructions
reference/
api-schema.md # loaded only if SKILL.md links to it
error-codes.md
scripts/
validate.py # executed, not read into context
templates/
report.html
That layout matters because of how context budgets work. The validate.py script never needs to enter the model's context — Claude runs it as a tool and reads only the output. The reference docs only enter context if the body explicitly tells Claude to open them for a given subtask. You are, in effect, building a small lazy-loaded knowledge tree.
At session start, the runtime scans the skill directories available to it and builds an index from each skill's frontmatter. Only the name and description go into this index — not the body, not the scripts, not the reference files. This keeps the always-present footprint of even a large skill library down to a few hundred tokens per skill rather than thousands.
Hear it before you finish reading
Talk to a live CallSphere AI voice agent in your browser — 60 seconds, no signup.
flowchart TD
A["Session starts"] --> B["Runtime scans skill dirs"]
B --> C["Read each SKILL.md frontmatter"]
C --> D["Build name + description index"]
D --> E{"User prompt arrives"}
E --> F{"Description matches intent?"}
F -->|No| G["Skill stays dormant"]
F -->|Yes| H["Load full SKILL.md body"]
H --> I["Follow links to reference files as needed"]
When a user prompt arrives, Claude compares the intent against those descriptions. This is why the description is not throwaway prose — it is a retrieval query target. A description like "helps with documents" will misfire constantly; "Extracts tables and figures from financial PDFs and converts them to normalized JSON" gives Claude a sharp signal about exactly when to reach for it. The discovery phase is cheap, repeatable every turn, and entirely driven by that one string.
Once a skill is judged relevant, the runtime reads the full SKILL.md body into context. The body is where the real instructions live: step-by-step procedures, constraints, formatting rules, which scripts to run in which order. If the body references additional files — say reference/api-schema.md — those are loaded only when Claude reaches the point of needing them. This is progressive disclosure: the model walks the tree depth-first, paying context cost only for the branches it actually visits.
The payoff is concrete. A skill that documents a 40-endpoint internal API can keep its SKILL.md under 500 words by listing endpoints briefly and linking each domain's full schema to a separate file. A request that only touches billing pulls in the billing schema; the inventory and auth schemas never cost a token. Without progressive disclosure that same skill would force every detail into context on every invocation.
Skills do not replace tools — they orchestrate them. Model Context Protocol servers expose tools and data sources to Claude; a skill tells Claude the playbook for using those tools well. Picture an MCP server that connects to your data warehouse and exposes a run_query tool. The server makes the capability available, but it says nothing about your table naming conventions, which joins are safe, or how to format results for finance. The skill supplies exactly that institutional knowledge.
This separation is what makes skills the right unit for organizational knowledge. Tools are generic and reusable; skills are where your company's specific way of doing things lives. When the architecture is healthy you'll see thin, broadly useful MCP servers paired with rich, opinionated skills layered on top. The skill can even call the script in its own folder to pre-validate inputs before invoking an MCP tool, closing the loop between local logic and remote capability.
Putting it together, a single agentic turn flows like this. The user sends a prompt. Claude consults the always-present skill index and decides whether any skill's description matches. If one does, the body loads and becomes part of the working instructions. Claude then executes — running the skill's scripts as tools, opening reference files as the body directs, and calling MCP tools where the skill instructs. The skill's content shapes the plan; the tools do the side-effecting work; the reference files supply detail just in time.
Still reading? Stop comparing — try CallSphere live.
CallSphere ships complete AI voice agents per industry — 14 tools for healthcare, 10 agents for real estate, 4 specialists for salons. See how it actually handles a call before you book a demo.
Crucially, when the task ends or moves on, that skill body does not have to persist. The next unrelated turn can drop it and load a different skill. This stateless-per-turn loading is why an org can ship hundreds of skills without every conversation paying for all of them. The context cost scales with what a given task touches, not with the size of your skill library.
SKILL.md body length and split anything over a few hundred lines into linked reference files.| Layer | Lives where | Enters context |
|---|---|---|
| Frontmatter (name + description) | Top of SKILL.md | Always (the index) |
| Instruction body | SKILL.md body | On selection |
| Reference files | Linked docs | When the body opens them |
| Scripts | scripts/ folder | Never — run as tools |
An Agent Skill is a self-contained folder of instructions, scripts, and resources that Claude discovers via its frontmatter description and loads into context only when the current task makes it relevant.
An MCP server exposes tools and data — the raw capability — while a skill encodes the procedural knowledge for using those tools well. You typically pair one rich skill with one or more thinner MCP servers.
Because only frontmatter descriptions live in the always-on index. Bodies, reference files, and scripts load lazily, so context cost scales with what a task touches, not with library size.
Yes. Scripts placed in the skill folder are executed as tools, and only their output enters context, which keeps deterministic logic out of the model's reasoning path entirely.
CallSphere takes these same skill-and-tool architectures and points them at voice and chat — agents that load the right playbook mid-call, use tools while the caller is on the line, and book real work around the clock. See it live at callsphere.ai.
Source & attribution: This is an independent, original explainer inspired by Anthropic's coverage on the Claude blog. Claude, Claude Code, Claude Cowork, Claude Opus, and the Model Context Protocol are products and trademarks of Anthropic. CallSphere is not affiliated with or endorsed by Anthropic.

Written by
Sagar Shankaran· Founder, CallSphere
LinkedInSagar Shankaran is the founder of CallSphere, where he builds production AI voice and chat agents deployed across healthcare, hospitality, real estate, and home services. He writes about agentic AI, LLM engineering, and shipping voice agents that handle real calls in production.
See how AI voice agents work for your industry. Live demo available -- no signup required.
How AI that writes inside ServiceTitan instead of living in a separate tab removes about 29 hours a month of supply ticket matching and equipment re-keying.
Independent lots key each auction VIN into six systems. In 2026 assistants write inside the dealer management system itself. What it saves on a 60-car lot.
A homebuilder's variance purchase order is keyed four times before it hits job cost. MCP lets AI write in the system of record and stops the margin leakage.
Why roofing shops key the same roof three times, and how 2026's MCP connectors let an assistant write squares and material orders into the system of record.
One load of corn gets typed in four times between the field and the checkbook. What the 2026 common plug between AI and farm software actually removes.
Leasing agents re-key the same renter into four systems before a showing. Here is what write access to the system of record changes for a rental portfolio.
© 2026 CallSphere Inc. All rights reserved.
Made within San Francisco
Watch how CallSphere handles real customer calls, schedules appointments, and processes payments — live.
Try Live DemoBook a DemoCalculate Your ROI