一键导入
filesystem-context
Activate when managing large outputs, persisting plans across turns, or using the filesystem as a context layer for agent workflows.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Activate when managing large outputs, persisting plans across turns, or using the filesystem as a context layer for agent workflows.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Activate when an Engineering Manager needs to shape a rough initiative into a clear, scoped, outcome-oriented brief before execution.
Activate when reviewing branches, commits, or pull requests using the emoji-driven review protocol.
Activate when managing conversation history in long sessions, choosing compression strategies, or preserving critical information during context truncation.
Activate when designing agent systems, debugging unexpected agent behavior, or optimizing context usage and attention budgets.
Activate when hitting context limits, experiencing quality degradation in long sessions, or needing to extend effective context capacity.
Activate when generating in-code comments or system documentation using the Diátaxis framework.
| name | filesystem-context |
| version | 1.0.0 |
| description | Activate when managing large outputs, persisting plans across turns, or using the filesystem as a context layer for agent workflows. |
| triggers | ["filesystem","scratch-pad","plan-persistence","offload","large-output","file-state"] |
The filesystem provides a persistent layer where agents write once and read selectively, offloading bulk content while preserving the ability to retrieve specific information. This skill addresses the core challenge: context windows are limited, but tasks often require more information than fits within them.
Write large tool outputs (>2000 tokens) to files rather than keeping them in message history. This allows targeted retrieval instead of carrying everything forward.
When to use: Test suite output, build logs, API responses, large file contents, search results spanning many files.
# Instead of dumping full test output into context:
pytest --tb=short > /tmp/test-results.txt
# Then read selectively:
grep "FAILED" /tmp/test-results.txt
Store structured plans in files so agents can re-read objectives and track progress across long conversations. Prevents losing track of multi-step tasks when context compresses.
# .ai/current-plan.md
## Objective
Refactor payment module to use Value Objects
## Steps
- [x] Create Email value object
- [x] Create Price value object
- [ ] Update PaymentService to use VOs
- [ ] Update tests
## Current Step
Updating PaymentService — see src/payment/service.ts
Multiple agents writing findings directly to shared filesystem locations preserves information fidelity better than passing through a coordinator (avoids the "telephone game" problem).
Store instruction sets as files and load them only when relevant, rather than stuffing all skills into the system prompt. This is exactly what the .ai/skills/ directory pattern enables.
Static context (always loaded): Skill names and triggers in system prompt Dynamic context (loaded on-demand): Full SKILL.md content when a trigger matches
Sync terminal output to searchable files. Instead of scrolling through long command output in context, write to a file and grep for relevant sections.
Agents can write learned preferences to instruction files (like CLAUDE.md memory sections) for incorporation in subsequent sessions. Use sparingly — validate before persisting.
File-system state machine for a migration task:
data/migration/
├── analysis.md # Research phase complete
├── plan.md # Planning phase complete
├── users.sql # Users table migrated
└── orders.sql # Orders table migrated
# Missing: inventory.sql = next step
Offloading build output:
# Bad: 500 lines of webpack output flooding context
npm run build
# Good: Offload and query
npm run build > /tmp/build-output.txt 2>&1
grep -E "ERROR|WARNING" /tmp/build-output.txt
context-fundamentals (progressive disclosure principle)context-optimization (observation masking uses filesystem offload), context-compression (file state survives compression), recursive-exploration (dependency trees can be persisted)