Claude Skills Architecture: Progressive Disclosure, Runtime, and Sandboxing
This article focuses on the architecture and engineering practice of Skills (progressive disclosure, runtime, sandboxing, permissions). If you want the “how to choose/how to ship” view (decision matrix, composition strategies, SKILL.md templates), see: /en/blog/claude-skills-landing-guide/.
This English version is an abridged translation of the Chinese original.
1. Paradigm shift: from prompt engineering to context engineering
In software architecture, we’ve repeatedly moved from monoliths to modular systems to improve composability and governance. In LLM applications, the analogous shift is from “stacking prompts” to engineering context as structured, versioned modules.
Core claim:
Skills refactor LLM systems from “one huge prompt” into “versioned, auditable, composable runtime modules”.
The benefits map to three control surfaces:
- context budget control: allocate always-on vs on-demand content
- execution path control: move deterministic work into scripts
- permission boundary control: sandboxing and least-privilege tools
2. Core architecture: Progressive Disclosure
Progressive disclosure splits content into:
- lightweight metadata (discoverability)
- instructions (loaded when triggered)
- resources/scripts (loaded on demand)
This reduces token tax while keeping deep procedures available.
3. Skill form factor: filesystem layout and conventions
A Skill is a directory of assets:
- an entry
SKILL.md(metadata + procedure) - optional reference files (specs, templates, examples)
- optional scripts (repeatable checks and transformations)
4. Runtime environment: Claude Code CLI and system integration
Runtime considerations:
- how Skills are discovered and loaded
- how scripts are executed and how outputs are surfaced
- how teams version and distribute Skills
5. Security and sandboxing
Once Skills can execute tools/scripts, governance matters:
- sandbox boundaries (what the Skill can touch)
- permissions (allowed tools, paths, commands)
- auditability (logs, deterministic outputs)
6. Skills and MCP: competition or collaboration?
Useful division:
- MCP: connectivity to external systems/data/tools
- Skills: procedural knowledge and standards for doing work
In practice, teams combine both: Skills encode “how”, MCP provides “access”.
7. Advanced agent patterns: recursion, forks, and self-improvement
Skills become more powerful when combined with:
- subagents for context isolation
- forked sessions for parallel exploration
- feedback loops (review → improve Skill)
8. Development and debugging
Practical tips:
- keep Skills small and scoped
- add scripts for determinism
- validate with real tasks and iterate
Conclusion
Skills are a modularization mechanism for “how to do work”. Progressive disclosure controls context cost, scripts improve determinism, and sandboxing makes execution governable.