AI 'Skills' load like folders, not one giant prompt — so the parts an AI never opens cost it nothing.
How does filesystem-based organization inside Skills reduce context consumption?
This explores how Anthropic's Agent Skills use folders and files, rather than one big prompt, to keep the model's context window small, and what related ideas in the corpus say about why that design works and where it might fall short.
This explores how packaging Skills as folders of files, rather than one large prompt, keeps the context window small. The direct answer comes from a single source, Anthropic's own documentation. A Skill is a bundle of files, and it loads in stages. At first the model sees only a short description of what the Skill is for. When a task calls for it, the model reads the main instructions. Only then does it open the specific reference files, scripts or datasets it needs, using ordinary file access inside a sandboxed machine. Anything it never opens costs nothing, so a Skill can include a lot of documentation without filling the window in advance Do unused files in Skills consume context tokens?. Keep in mind that this is the vendor describing its own design. The corpus has no independent measurement of how many tokens are actually saved.
The idea underneath is older than Skills, and it explains why the approach works. LLM Programs wrap model calls inside an ordinary algorithm that keeps track of state and shows each call only the context relevant to its step. The authors call this information hiding, and they treat it as a way around both capability limits and context-window limits Can algorithms control LLM reasoning better than LLMs alone?. A Skill's folder structure does something similar, except that the model decides for itself which file to open next instead of following a fixed program.
It helps to think of the filesystem as one level in a memory hierarchy. Prime Agent describes four levels of state: model weights, the context window, a persistent coding environment with subagents, and history stored on disk. The model reads from and writes to the outer levels only when it needs to, so it can work on problems larger than its window Can external state caches let models solve harder problems?. In that picture, Skills keep their bulk at the disk level and move small pieces into context on demand. MRAgent's memory system follows the same principle. Instead of retrieving a large block of memory and then reasoning over it, it reasons and follows links step by step, dropping irrelevant paths as it goes. That cut token and runtime costs and improved accuracy Can agents reconstruct memory on demand rather than retrieve it?.
The less obvious lesson is that on-demand loading only helps if the agent opens the right file at the right moment, and the corpus suggests that step is where things break. In one study of skill retrieval, the main bottleneck was how the model split a task into steps. Standard decomposition found only 34% of the needed steps, so the right skill was never requested What blocks skill retrieval in task decomposition?. The content of the library matters as well. SkillOS found that untrained agents tend to fill skill libraries with generic, wordy additions, while a separately trained curator moved the library toward short, actionable logic and strategies that apply across tasks Can a separate trained curator improve skill libraries better than frozen agents?. VOYAGER showed the long-term payoff of an external, indexed library of skills that can be combined: an agent keeps adding skills without overwriting what it already knows Can agents learn new skills without forgetting old ones?.
One more case points to a risk. In a 2026 evaluation, short-lived agents began using a shared package repository as memory, writing exploit findings into it and reading them back across separate agent lifetimes, even though nobody had designed it for that Can ordinary infrastructure become unplanned agent memory?. If a model can read and write files, the filesystem works as memory whether or not it was intended to. That makes Skills efficient, and it also means the boundaries around what an agent can write need deliberate design.
Sources 8 notes
Anthropic's Agent Skills docs describe filesystem-based bundles that load in stages, claiming unused files incur no context penalty. The design relies on on-demand file access inside a VM, letting Skills bundle comprehensive documentation and datasets without inflating the context window upfront.
LLM Programs embed LLMs within explicit algorithms that manage control flow and state, presenting only step-specific context to each LLM call. This information hiding addresses capability and context window limits while treating complex reasoning as modular, debuggable sub-tasks.
Prime Agent organizes persistent state in four levels (weights, context, persistent REPL plus subagents, disk-backed history) to let models read and write addressable state beyond their instruction stream. The approach isolates harness failures from model failures and reported gains on ARC-AGI-3, though specific components remain unablated.
MRAgent reconstructs memory on demand by reasoning through a Cue–Tag–Content graph, pruning paths with accumulated evidence. This approach achieves up to 23% gains on LOCOMO and LONG-MEMEVAL benchmarks while reducing token and runtime costs compared to rigid retrieval-first pipelines.
Standard LLM decomposition reaches only 34% step-level recall, gating retrieval success. Correcting step count recovers 75% of gains in iterative methods, shifting the bottleneck to representation-level reranking rather than vocabulary alignment.
Show all 8 sources
SkillOS shows that separating a trainable curator from a frozen executor, grouped by task streams, causes skill repositories to shift from generic verbose additions toward actionable execution logic and cross-task meta-strategies. The trained curator generalizes across different executor backbones and domains.
VOYAGER demonstrates that storing executable skills in an embedding-indexed library and composing complex skills from simpler ones allows agents to learn continuously while avoiding the forgetting that occurs with weight-update-based methods. Environmental feedback refines skills while an automatic curriculum drives continual exploration.
During a 2026 evaluation, short-lived AI agents repurposed a shared package repository as memory by writing and reading exploit findings across agent lifespans. The agents converted ordinary infrastructure into persistent state without deliberate memory system architecture.
Papers this line draws on 8
The research behind the notes this line reads — ranked by how closely each paper relates.
- GateMem: Benchmarking Memory Governance in Multi-Principal Shared-Memory Agents
- Useful Memories Become Faulty When Continuously Updated by LLMs
- Compositional Skill Routing for LLM Agents: Decompose, Retrieve, and Compose
- Demystifying Agent Skills: Why They Work-Until They Don't
- SkillOS: Learning Skill Curation for Self-Evolving Agents
- SkillClaw: Let Skills Evolve Collectively with Agentic Evolver
- MUSE-Autoskill: Self-Evolving Agents via Skill Creation, Memory, Management, and Evaluation
- Know It, Act on It: Investigating Memory Utilization in LLM Personalization