filesystem-context
하는 일
이 시스템은 AI가 중요한 정보를 단기 기억에 과부하 없이 관리하도록 돕습니다. 모든 것을 한꺼번에 기억하려 하는 대신, 필요할 때 접근할 수 있도록 데이터를 파일에 저장합니다.
사용하는 경우
- ✓AI가 한꺼번에 너무 많은 정보를 받았을 때.
- ✓AI가 오랫동안 기억해야 할 중요한 내용이 있을 때.
- ✓AI의 여러 부분이 정보를 공유해야 할 때.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/filesystem-context/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 검색 결과를 나중에 참고할 수 있도록 파일로 저장해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 중요한 정보를 파일에 씁니다. 그 정보가 다시 필요하면 모든 것을 메모리에 불러오는 대신, 필요한 것만 찾아서 읽습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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 Use
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 grows and crowds out space for dynamic information.
Dynamic Context Discovery Dynamic context is loaded on-demand when relevant to the current task. The agent receives minimal static pointers (names, descriptions, file paths) and uses search tools to load full content when needed.
Dynamic discovery is more token-efficient because only necessary data enters the context window. It can also improve response quality by reducing potentially confusing or contradictory information.
The trade-off: dynamic discovery requires the model to correctly identify when to load additional context. This works well with current frontier models but may fail with less capable models that do not recognize when they need more information.
Pattern 1: Filesystem as Scratch Pad
The Problem Tool calls can return massive outputs. A web search may return 10k tokens of raw content. A database query may return hundreds of rows. If this content enters the message history, it remains for the entire conversation, inflating token costs and potentially degrading attention to more relevant information.
The Solution Write large tool outputs to files instead of returning them directly to the context. The agent then uses targeted retrieval (grep, line-specific reads) to extract only the relevant portions.
Implementation
def handle_tool_output(output: str, threshold: int = 2000) -> str:
if len(output) < threshold:
return output
# Write to scratch pad
file_path = f"scratch/{tool_name}_{timestamp}.txt"
write_file(file_path, output)
# Return reference instead of content
key_summary = extract_summary(output, max_tokens=200)
return f"[Output written to {file_path}. Summary: {key_summary}]"
The agent can then use grep to search for specific patterns or read_file with line ranges to retrieve targeted sections.
Benefits
- Reduces token accumulation over long conversations
- Preserves full output for later reference
- Enables targeted retrieval instead of carrying everything
Pattern 2: Plan Persistence
The Problem Long-horizon tasks require agents to make plans and follow them. But as conversations extend, plans can fall out of attention or be lost to summarization. The agent loses track of what it was supposed to do.
The Solution
…
자주 묻는 질문
왜 AI에게 모든 정보를 한 번에 줄 수 없나요?
AI에게는 제한된 「단기 기억」(컨텍스트 창)이 있습니다. 너무 많은 정보를 주면 가장 중요한 것을 잊거나 혼란스러워할 수 있습니다.
AI는 어떤 정보를 저장할지 어떻게 아나요?
AI는 현재 작업에 중요하거나 나중에 유용할 것 같은 정보를 식별하도록 학습되어 있으며, 그 정보를 파일에 저장하기로 결정합니다.
AI를 위한 「메모장」 같은 것인가요?
네, 비슷합니다. AI는 파일을 메모장이나 서류 캐비닛처럼 사용해 필요할 때 중요한 정보를 저장하고 꺼냅니다.
상세 정보
작성자의 원본 설명
Use for file-based context management, dynamic context discovery, and reducing context window bloat. Offload context to files for just-in-time loading.
인기도
- GitHub 스타
- 48k
- 순위
- #4614
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.
비슷한 스킬
technical-documentation
394k에이전트가 명확한 기술 문서와 에이전트 지침 파일을 작성하고 검토하도록 도와, 사람과 AI 도구가 쉽게 따를 수 있게 합니다.
architecture-decision-records
280k에이전트가 프로젝트 구조에 관한 중요한 결정을 기록하도록 합니다. 선택의 이유를 이해하고 변경 이력을 명확히 유지하는 데 도움이 됩니다.
code-tour
280k에이전트가 정확한 파일과 줄 번호를 참조하는 단계별 코드 안내를 만들도록 합니다. 소개, 설명, 리뷰에 유용합니다.