filesystem-context
Qué hace
Esta skill muestra cómo guardar salidas largas, planes y notas en archivos, y leerlos solo cuando hacen falta, manteniendo despejada la ventana de trabajo de la IA. Está pensada para quienes construyen agentes que ejecutan tareas largas o comparten trabajo entre agentes.
Cuándo usarla
- ✓Cuando las salidas de herramientas o los registros llenan la ventana de contexto del agente.
- ✓Cuando un agente necesita conservar un plan o notas de trabajo durante una tarea larga.
- ✓Cuando varios agentes deben compartir información a través de archivos en lugar de mensajes directos.
Link de la skill
https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering/blob/main/skills/filesystem-context/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Configura mi agente para que guarde las salidas largas de los comandos en archivos y lea solo las partes que necesite.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La skill hace que el agente escriba los resultados en archivos y luego consulte las partes relevantes bajo demanda, en lugar de mantenerlo todo en el prompt.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Filesystem-Based Context Engineering
Use the filesystem as the primary overflow layer for agent context because context windows are limited while tasks often require more information than fits in a single window. Files let agents store, retrieve, and update an effectively unlimited amount of context through a single interface.
Prefer dynamic context discovery -- pulling relevant context on demand -- over static inclusion, because static context consumes tokens regardless of relevance and crowds out space for task-specific information.
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
Do not activate this skill for adjacent work owned by other skills:
- Semantic cross-session memory, entity tracking, or temporal knowledge graphs:
memory-systems. - Conversation summarization, compaction, or durable handoff wording:
context-compression. - Token-efficiency tactics that do not require file-backed storage:
context-optimization. - Multi-agent topology or handoff protocol design:
multi-agent-patterns. - Model edits that evict content from the live window itself:
self-managed-context.
Core Concepts
Diagnose context failures against these four modes, because each requires a different filesystem remedy:
- Missing context -- needed information is absent from the total available context. Fix by persisting tool outputs and intermediate results to files so nothing is lost.
- Under-retrieved context -- retrieved content fails to encapsulate what the agent needs. Fix by structuring files for targeted retrieval (grep-friendly formats, clear section headers).
- Over-retrieved context -- retrieved content far exceeds what is needed, wasting tokens and degrading attention. Fix by offloading bulk content to files and returning compact references.
- Buried context -- niche information is hidden across many files. Fix by combining glob and grep for structural search alongside semantic search for conceptual queries.
Use the filesystem as the persistent layer that addresses all four: write once, store durably, retrieve selectively.
Detailed Topics
The Static vs Dynamic Context Trade-off
Treat static context (system instructions, tool definitions, critical rules) as expensive real estate -- it consumes tokens on every turn regardless of relevance. As agents accumulate capabilities, static context grows and crowds out dynamic information.
Use dynamic context discovery instead: include only minimal static pointers (names, one-line descriptions, file paths) and load full content with search tools when relevant. This is more token-efficient and often improves response quality by reducing contradictory or irrelevant information in the window.
Accept the trade-off: dynamic discovery requires the model to recognize when it needs more context. Current frontier models handle this well, but less capable models may fail to trigger loads. When in doubt, err toward including critical safety or correctness constraints statically.
Pattern 1: Filesystem as Scratch Pad
Redirect large tool outputs to files instead of returning them directly to context, because a single web search or database query can dump thousands of tokens into message history where they persist for the entire conversation.
Write the output to a scratch file, extract a compact summary, and return a file reference. The agent then uses targeted retrieval (grep for patterns, read with line ranges) to access only what it needs.
def handle_tool_output(output: str, threshold: int = 2000) -> str:
if len(output) < threshold:
return output
file_path = f"scratch/{tool_name}_{timestamp}.txt"
write_file(file_path, output)
key_summary = extract_summary(output, max_tokens=200)
return f"[Output written to {file_path}. Summary: {key_summary}]"
Use grep to search the offloaded file and read_file with line ranges to retrieve targeted sections, because this preserves full output for later reference while keeping only ~100 tokens in the active context.
Pattern 2: Plan Persistence
Write plans to the filesystem be
Preguntas frecuentes
¿Por qué guardar el contexto en archivos?
Los archivos pueden contener mucha más información que la ventana de contexto, y el agente solo carga lo que necesita.
¿Es lo mismo que la memoria a largo plazo?
No. La memoria a largo plazo entre sesiones se trata por separado, mientras que esta skill se centra en los archivos usados durante una tarea.
¿Se limpian los archivos antiguos?
La skill menciona políticas de limpieza para el contexto guardado fuera del prompt.
Detalles
Descripción original del autor
This skill should be used when agent work needs file-backed context: durable scratchpads, tool-output offloading, just-in-time discovery, cross-agent handoff files, filesystem memory, or cleanup policies for context stored outside the prompt.
Popularidad
- Estrellas en GitHub
- 18 mil
- Posición en el ranking
- #10642
- Licencia
- MIT
- Actualizada
- 11/10/2026
Comentarios
- …
Más skills de este repositorio
context-engineering-collection
18 milAyuda a tu agente a gestionar lo que entra en la ventana de contexto de un modelo de IA, desde la memoria y las herramientas hasta las configuraciones de varios agentes y la evaluación.
advanced-evaluation
18 milEnseña a tu agente a juzgar las respuestas de la IA usando otra IA, con puntuación, comparación lado a lado y comprobaciones de sesgo.
bdi-mental-states
18 milEnseña a tu agente a modelar creencias, objetivos y planes con el enfoque BDI, para que sus decisiones puedan rastrearse y explicarse.
context-compression
18 milAyuda a tu agente a acortar sesiones largas de IA en resúmenes que conserven las decisiones, los archivos, los riesgos y los próximos pasos.
Skills parecidas
add-model-provider
394 milPermite que tu agente conecte un nuevo proveedor de modelos de IA a OpenClaw con comandos de configuración seguros, mantenga las claves API fuera del texto plano y haga una prueba en vivo.
acp-router
394 milAyuda a tu agente a enviar una tarea a un asistente de programación como Claude Code o Cursor a través de OpenClaw, para que el trabajo se ejecute en esa herramienta.
browser-automation
394 milEnseña a tu agente a controlar páginas web paso a paso, incluidos los inicios de sesión, las pestañas y la recuperación cuando una página deja de responder.