This skill should be used when the user asks to "offload context to files", "implement dynamic context discovery", "use filesystem for agent memory", "reduce context window bloat", or mentions file-based context management, tool output persistence, agent scratch pads, or just-in-time context loading.
View on GitHubguanyang/antigravity-skills
antigravity-skills
January 24, 2026
Select agents to install to:
npx add-skill https://github.com/guanyang/antigravity-skills/blob/main/skills/filesystem-context/SKILL.md -a claude-code --skill filesystem-contextInstallation paths:
.claude/skills/filesystem-context/# Filesystem-Based Context Engineering The filesystem provides a single interface through which agents can flexibly store, retrieve, and update an effectively unlimited amount of context. This pattern addresses the fundamental constraint that context windows are limited while tasks often require more information than fits in a single window. The core insight is that files enable dynamic context discovery: agents pull relevant context on demand rather than carrying everything in the context window. This contrasts with static context, which is always included regardless of relevance. ## When to Activate Activate this skill when: - Tool outputs are bloating the context window - Agents need to persist state across long trajectories - Sub-agents must share information without direct message passing - Tasks require more context than fits in the window - Building agents that learn and update their own instructions - Implementing scratch pads for intermediate results - Terminal outputs or logs need to be accessible to agents ## Core Concepts Context engineering can fail in four predictable ways. First, when the context an agent needs is not in the total available context. Second, when retrieved context fails to encapsulate needed context. Third, when retrieved context far exceeds needed context, wasting tokens and degrading performance. Fourth, when agents cannot discover niche information buried in many files. The filesystem addresses these failures by providing a persistent layer where agents write once and read selectively, offloading bulk content while preserving the ability to retrieve specific information through search tools. ## Detailed Topics ### The Static vs Dynamic Context Trade-off **Static Context** Static context is always included in the prompt: system instructions, tool definitions, and critical rules. Static context consumes tokens regardless of task relevance. As agents accumulate more capabilities (tools, skills, instructions), static context g