On-Demand Skill Files
Pattern for keeping service-specific CLI/API guidance out of the always-loaded project context until the agent actually needs that service.
Key points
- A skill file can teach an agent exact commands, flags, and output formats without requiring a full MCP server [src-041].
- In the article's GitHub CLI experiment, the skill costs about 480 tokens when loaded and steers the agent toward structured
--jsonoutput [src-041]. - The efficiency depends on invocation timing: on-demand skill loading costs once when needed, while putting the same guidance in
CLAUDE.mdor.cursorrulesmakes it an always-on context cost [src-041]. - On-demand skill files are strongest for low-frequency services that need reliable structured output, such as GitHub, Kubernetes, cloud CLIs, Stripe, or DNS tooling [src-041].
- This complements Progressive Context Loading: a project can carry many skills as long as the full instructions are loaded only when selected.
Related entities
Related concepts
- Progressive Context Loading
- MCP Vs Cli Token Tradeoff
- Gn Ratio Tool Selection
- API Over MCP Principle
- Context Management
Source references
- [src-041] Marco Mornati — "The Future of Agentic Tooling: MCP Servers vs. CLI A Data-Driven Comparison" (2026-04-27)
Recommended next
Keep reading from this thread
From 500 indexed pages and articles.
- Wiki concept G/N Ratio Tool Selection Decision framework for choosing between CLI, on-demand skill files, Gateway MCP, and Native MCP by estimating how often a service is actually Related by 041
- Wiki concept Progressive Context Loading (Skills) The three-level loading pattern Claude Code uses to keep skills lightweight. Level 1: initial search only reads the YAML frontmatter (name + Related by 041
- Wiki concept Tool Schema Tax The fixed context cost paid when an agent runtime injects tool schemas into every prompt, regardless of whether those tools are used in Related by 041