Agent skill · Agent Skills for Context Engineering
/filesystem-context Use files as overflow memory for agents
This skill makes the filesystem the agent's extra memory. Large tool outputs go to scratch files with a short summary in context, plans live in a structured file the agent re-reads, sub-agents write findings to their own folders, skills and logs load on demand, and grep and line-range reads fetch only what is needed.
Works with
- Claude Code
- Cursor, Codex, Claude Code
When to use it
- Search results or logs are flooding the context window.
- A long task loses its plan after a few rounds of summarization.
- Several sub-agents need to share findings without passing long messages.
How it works
- 1Classify the failure
Decides whether context is missing, under-retrieved, over-retrieved or buried, since each needs a different file-based fix.
- 2Offload outputs
Writes tool results above about 2,000 tokens to a scratch file and returns a reference with a short summary.
- 3Persist plans and findings
Keeps the plan in a YAML file re-read each turn and gives every sub-agent its own workspace directory.
- 4Retrieve selectively
Combines listing, glob, grep and ranged reads for exact matches, and adds semantic search for conceptual questions.
- 5Clean up
Applies retention rules to scratch files and checks that cached paths still exist before reading them.
What it steers the agent away from
- Reading a huge file into context without checking its size.
- Concurrent agents overwriting the same file.
- Scratch folders growing without any cleanup.
Install this skill
It installs with the Agent Skills for Context Engineering pack.
Claude Code (plugin marketplace)Installs all published skills as one plugin; they activate from task context.
/plugin marketplace add muratcankoylan/Agent-Skills-for-Context-Engineering
/plugin install context-engineering@context-engineering-marketplaceCursor, Codex, Claude Code (single skill copy)Run from a clone of the repo; copy whole folders, since flattening SKILL.md breaks its reference links.
mkdir -p .cursor/skills
cp -R skills/context-fundamentals .cursor/skills/
mkdir -p .claude/skills
cp -R skills/context-fundamentals .claude/skills/
mkdir -p .codex/skills
cp -R skills/context-fundamentals .codex/skills/Commands come from the author’s README; check it for changes before you run them.
Questions
When is it not worth it?
For single-turn tasks, contexts that already fit comfortably, latency-critical work or models without file tools.
Can agents learn by editing their own instruction files?
The skill describes it but calls it experimental and asks for validation and periodic review of what gets saved.
More guides from Agent Skills for Context Engineering
/context-compressionCompress long agent sessions without losing the file trailDesigns structured, incremental session summaries that keep file trails and decisions, and tests them with probe questions.Read the guide →/harness-engineeringBuild autonomous agent loops that cannot game their metricDesigns autonomous agent loops with locked evaluators, editable surfaces, append-only logs, rollback and human approval points.Read the guide →/multi-agent-patternsDecide when multiple agents help and how to wire themChooses between supervisor, swarm and hierarchical agent setups, with isolation mechanisms, handoffs and failure mitigations.Read the guide →/tool-designDesign agent tools that get picked and called correctlyWrites agent-facing tool descriptions, schemas and recoverable errors, and merges overlapping tools into fewer clear ones.Read the guide →
Also in this pack
/advanced-evaluationSets up LLM-as-judge scoring, pairwise comparison and rubric calibration, with mitigations for known judge biases.↗/bdi-mental-statesModels agent beliefs, desires and intentions from RDF context using BDI ontology patterns for traceable deliberation.↗/context-degradationDiagnoses five failure patterns in long contexts, from lost-in-middle and poisoning to clashing instructions, with signals and fixes for each.↗/context-fundamentalsExplains what a context window holds, how attention is spread across it and why fewer high-signal tokens beat more tokens.↗/context-optimizationCuts token cost with context budgets, observation masking, prefix caching and partitioning, measured against answer quality.↗/evaluationBuilds agent evaluation with deterministic checks, multi-dimension rubrics, regression suites, baselines and production monitoring.↗/hosted-agentsPlans background coding agents in remote sandboxes with prebuilt images, warm pools, snapshots and multiplayer sessions.↗/latent-briefingShares an orchestrator's trajectory with workers by compacting it in the worker's KV cache when you control the runtime.↗/long-horizon-promptingWrites launch briefs for agents that run for hours, with exact success predicates, stop rules, audit gates and worker contracts.↗/project-developmentDecides whether an LLM fits a task, shapes batch or agent pipelines, estimates token cost and designs parseable structured output.↗/self-improvement-loopsBuilds loops where the harness itself is optimized, such as failure-driven self-edits or scaffold search, behind acceptance gates.↗/self-managed-contextLets the model edit its own live context safely, with pinned prefixes, edit gates, receipts, budget readouts and rollback.↗
Summary by trendhub. The skill itself lives in muratcankoylan/Agent-Skills-for-Context-Engineering/skills/filesystem-context by Muratcan Koylan (MIT); read the full, current text there.