Claude Code Mastery
20 partsTL;DR
CloudFlare, Anthropic, and Cursor independently discovered the same pattern: don't load all tools upfront. Let agents discover what they need. The results are dramatic.
| Official Sources | |
|---|---|
| Anthropic Advanced Tool Use | Tool search, programmatic calling, and memory tools engineering post |
| CloudFlare Code Mode | TypeScript sandbox approach to MCP, 98.7% token reduction |
| Cursor Dynamic Context | 46.9% token reduction with dynamic context discovery |
| Claude Code Overview | Official Claude Code capabilities and architecture |
| Claude Code Skills | Skills implementation guide for progressive disclosure |
| Model Context Protocol | MCP specification and server patterns |
In September 2025, CloudFlare published a blog post titled "Code Mode: The Better Way to Use MCP." It contained a single, devastating observation: we've been using MCP wrong.
The problem wasn't theoretical. When you load MCP tool definitions directly into an LLM's context window, you're forcing the model to see every available tool for every request, whether it needs them or not. Most of the time, those tools sit idle, burning tokens for nothing.
CloudFlare's insight was radical: models are excellent at writing code. They're not great at leveraging MCP. So why not let the model write TypeScript to find and call the tools it needs instead of embedding all the schemas upfront?
Three months later, Anthropic and Cursor both arrived at identical conclusions independently. The pattern has a name: progressive disclosure.

For the next layer of context, read Claude Code Agent Teams, Subagents, and MCP: The 2026 Playbook and Why Skills Beat Prompts for Coding Agents in 2026; they show how reusable agent knowledge turns one-off wins into repeatable workflow.
Anthropic's tool search feature shows the math clearly. Using a full MCP tool library with traditional context loading consumed 77,000 tokens. With tool search - discovering tools on demand - that dropped to 8,700 tokens. That's an 85% reduction while maintaining access to the entire tool library.
Accuracy improved too. In MCP evaluations:
Cursor reported similar wins. By implementing dynamic context discovery, they achieved a 46.9% reduction in total agent tokens. One week later, CloudFlare dropped their findings: a 98.7% reduction in token usage using TypeScript sandboxes instead of MCP schemas.
This isn't incremental optimization. This is a paradigm shift.
Six months ago, the industry obsessed over inference speed and GPU efficiency. The conversation has moved. CloudFlare, Anthropic, Vercel, Cursor, Daytona, and Lovable are all converging on the same infrastructure: sandboxes, file systems, and bash.
The pattern is elegant. Instead of tokenizing every tool definition, you give agents three things:
The agent's job becomes simple: discover what you need, load it, use it. No context bloat. No unused tool schemas. No wasted tokens.
Newsletter
Get the weekly deep dive
Tutorials on Claude Code, AI agents, and dev tools, delivered free every week.
From the archive
Jan 5, 2026 • 7 min read
Jan 1, 2026 • 5 min read
Dec 31, 2025 • 7 min read
Dec 30, 2025 • 7 min read

Claude Code implements progressive disclosure through skills. A skill is a YAML file with frontmatter (the summary) and references to actual scripts and markdown files (the implementation).
Here's the pattern:
---
name: "Web Research"
description: "Search and summarize web content using Firecrawl"
---
## Usage
Call this skill when you need current web information.
## Implementation
- [[firecrawl.sh]] - Core search and scraping
- [[research-template.md]] - Output format
The agent sees only the frontmatter in context (10-30 tokens). When it invokes the skill, it reads the full implementation - and only then. Scale to 1,000 skills, 10,000 skills, and the static context cost remains flat.
You can nest skills hierarchically. A skill can reference sub-skills. An agent can walk the directory structure, find what it needs, and load only that.

Anthropic's advanced tool use releases included two other pieces that complete the picture:
Programmatic Tool Calling: Tools don't return raw results anymore. They execute in a code environment, so the agent can inspect output, transform it, chain operations - all without leaving context.
Memory Tool: Not embeddings. Not vector databases. Just files. Markdown documents stored in the file system, read and updated as needed. Simple. Searchable. Manageable.
The principle extends to Claude Code. Instead of complex vector retrieval, read sections of files on demand. Update a memory.md when something matters. Let the agent grep, grep, find. It works.
Before progressive disclosure, agent tasks had to be small and contained. You watched token limits. You minimized tool use. You feared the context reset.
Now:
CloudFlare and Anthropic's approach inspired an experimental feature in Claude Code: the MCP CLI flag. When enabled, instead of embedding all MCP schemas in context, the model uses tool search to discover and invoke servers on demand.
Is it perfect? Not yet. It's actively being refined. But the direction is clear: zero context cost for tool discovery. Tens of thousands of tokens saved per request.

What's remarkable is that CloudFlare, Anthropic, Cursor, and others arrived here independently. No coordination. Same conclusion: tools as files, loaded on demand, bash is all you need.
This wasn't what anyone predicted six months ago. It's counterintuitive. Most of us assumed you'd load everything up front. But the data is overwhelming.
The industry is converging on the same answer: progressive disclosure works.
If you've been cautious about Claude Code's scope because of context limits, stop. The bottleneck just moved. File systems, bash, and progressive disclosure unlock agents that can tackle ambitious, complex work without the orchestration overhead that held us back before.
Give the agent a file system. Get out of the way. Let it discover what it needs. The results speak for themselves.
Progressive disclosure is a pattern where AI agents discover and load tools on demand rather than having all tool definitions embedded in the context window upfront. Instead of burning tokens on unused tool schemas, the agent uses a file system, bash, and code execution to find and invoke only the tools it needs for each specific task.
The reductions are dramatic. Anthropic reported an 85% reduction (from 77,000 tokens to 8,700 tokens) using tool search. CloudFlare achieved a 98.7% reduction using TypeScript sandboxes instead of MCP schemas. Cursor reported a 46.9% reduction in total agent tokens with dynamic context discovery.
When models see fewer irrelevant tools in context, they make better decisions about which tools to use. Anthropic's evaluations showed accuracy improvements from 49% to 74% on Opus 4, and from 79.5% to 88.1% on Opus 4.5 after implementing tool search.
Use skills - YAML files with frontmatter summaries and references to implementation files. The agent sees only the frontmatter (10-30 tokens) in context. When invoked, it reads the full implementation. You can nest skills hierarchically and scale to thousands without increasing static context cost.
Agents need: (1) a file system to read, write, and search, (2) bash to execute commands and run scripts, and (3) code execution to call MCP servers on demand. This lets the agent discover, load, and use tools dynamically instead of loading everything upfront.
Yes. Instead of embedding all MCP schemas in context, you can use tool search to discover and invoke MCP servers on demand. Claude Code has an experimental MCP CLI flag that implements this pattern, saving tens of thousands of tokens per request while maintaining access to the full tool library.
It enables multi-hour workflows without context resets, hundreds or thousands of tool integrations available instantly, complex orchestration without orchestration logic, and truly autonomous systems that run for extended periods. Context is no longer the bottleneck for ambitious agent tasks.
Read next
A comprehensive look at Claude Skills-modular, persistent task modules that shatter AI's memory constraints and enable progressive, composable, code-capable workflows for developers and organizations.
8 min readThe definitive collection of Claude Code tips - sub-agents, hooks, worktrees, MCP, custom agents, keyboard shortcuts, and dozens of hidden features most developers never discover.
25 min readClaude Code is Anthropic's AI coding agent for terminal, IDE, desktop, and browser workflows. Learn what it does, how it works, pricing, setup, MCP, skills, hooks, and subagents.
15 min readTechnical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.
Anthropic's flagship reasoning model. Best-in-class for coding, long-context analysis, and agentic workflows. 1M token c...
View ToolAnthropic's agentic coding CLI. Runs in your terminal, edits files autonomously, spawns sub-agents, and maintains memory...
View ToolInteractive TUI dashboard that shows exactly where your Claude Code and Cursor tokens are going, in real time.
View ToolMac app for running parallel Claude Code, Codex, and Cursor agents in isolated workspaces. Watch every agent work at onc...
View ToolUnlock pro skills and share private collections with your team.
View AppPro hooks for Claude Code. Private bundles, team sync, one-click install.
View AppInspect Claude Code transcripts to see which files, tools, and tokens are filling the context window.
View AppConfigure Claude Code for maximum productivity -- CLAUDE.md, sub-agents, MCP servers, and autonomous workflows.
AI AgentsA complete, citation-backed Claude Code course with setup, prompting systems, MCP, CI, security, cost controls, and capstone workflows.
ai-developmentInstall Claude Code, configure your first project, and start shipping code with AI in under 5 minutes.
Getting Started
Progressive Disclosure in Claude Code In this video, we explore the concept of progressive disclosure within Claude code and its impact on building AI agents. Highlighting recent trends among top AI

Open Design: Open-Source n8n App That Turns Any Website into a Brand Kit, Design System, HTML + Images The video introduces Open Design, an MIT-licensed full-stack template that combines AI and n8n a

Nimbalyst Demo: A Visual Workspace for Codex + Claude Code with Kanban, Plans, and AI Commits Try it: https://nimbalyst.com/ Star Repo Here: https://github.com/Nimbalyst/nimbalyst This video demos N

A comprehensive look at Claude Skills-modular, persistent task modules that shatter AI's memory constraints and enable p...

The definitive collection of Claude Code tips - sub-agents, hooks, worktrees, MCP, custom agents, keyboard shortcuts, an...

Claude Code is Anthropic's AI coding agent for terminal, IDE, desktop, and browser workflows. Learn what it does, how it...

A practical operational guide to Claude Code usage limits in 2026: plan behavior, API key pitfalls, routing choices, and...

From Claude Code to Gladia, the ten CLIs every AI-native developer should know. Install commands, trade-offs, and when t...

Anthropic brought git worktrees to Claude Code. Spawn multiple agents working on the same repo simultaneously - no mer...

New tutorials, open-source projects, and deep dives on coding agents - delivered weekly.