
Filesystem Context Engineering
Lets an agent offload big outputs and plans to files and reload only what it needs.
- Stars
- 18,282
- Licence
- MIT
- Files
- 3 files
What it does
This skill teaches an AI agent to use files on disk as an extra memory layer. Instead of stuffing every tool result, log, or plan into the chat, the agent saves large outputs to a scratch file, keeps only a short summary and file path in the conversation, and later searches or reads just the parts it needs. It also covers saving plans so they survive long tasks, and having sub-agents write findings to separate folders for a coordinator to read.
Great for
- Developers building long-running agents that hit context window limits
- Teams running multiple sub-agents that need to share findings without passing messages through each other
- Anyone whose agent tasks produce large search results, logs, or terminal output
Skip it if
- Simple short chats where nothing gets large, since the extra file handling adds overhead
- Cross-session semantic memory or knowledge graphs, which the skill itself says belong to a different skill (memory-systems)
- Environments where the agent should not write files or where scratch directories could expose sensitive data
Try asking
- “Save the full output of this large database query to a scratch file and give me a summary with a pointer I can search later”
- “Create a plan file for refactoring our auth module and re-read it at the start of each step”
- “Set up a workspace folder where each sub-agent writes its findings so the coordinator can combine them”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 3 original files, the MIT licence and an attribution note.
filesystem-context.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip filesystem-context.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip filesystem-context.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Set a sensible size threshold for offloading (the examples use about 2000 characters or tokens) so small outputs stay inline.
- Add cleanup rules for scratch folders so old files do not accumulate or leak sensitive data.
- Ask the agent to grep or read line ranges from offloaded files instead of loading whole files back into context.
What's inside
- references/implementation-patterns.md
- scripts/filesystem_context.py
- SKILL.md
Redistributed unmodified from muratcankoylan/Agent-Skills-for-Context-Engineering under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.