filesystem-context
Was er macht
Dieses System hilft der KI, wichtige Informationen zu verwalten, ohne ihr Kurzzeitgedächtnis zu überlasten. Es speichert Daten in Dateien, auf die die KI bei Bedarf zugreifen kann, statt alles auf einmal im Kopf behalten zu müssen.
Wann du ihn nutzt
- ✓Wenn die KI auf einmal zu viele Informationen bekommt.
- ✓Wenn die KI sich etwas Wichtiges über eine lange Zeit merken muss.
- ✓Wenn verschiedene Teile der KI Informationen miteinander teilen müssen.
Link zum Skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/filesystem-context/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Speichere die Ergebnisse dieser Suche in einer Datei, damit ich später darauf zurückgreifen kann.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Die KI schreibt wichtige Informationen in Dateien. Wenn sie diese Informationen wieder braucht, sucht sie gezielt nur das heraus, was nötig ist, statt alles in ihr Gedächtnis zu laden.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von 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
…
Häufige Fragen
Warum kann ich der KI nicht einfach alle Informationen auf einmal geben?
Die KI hat ein begrenztes 'Kurzzeitgedächtnis' (Kontextfenster). Wenn du ihr zu viele Informationen gibst, vergisst sie vielleicht das Wichtigste oder wird verwirrt.
Wie erkennt die KI, welche Informationen sie speichern sollte?
Die KI ist darauf trainiert, Informationen zu erkennen, die für die aktuelle Aufgabe entscheidend sind oder später nützlich sein könnten, und entscheidet dann, sie in Dateien zu speichern.
Ist das wie ein 'Notizblock' für die KI?
Ja, das ist ähnlich. Die KI nutzt Dateien wie einen Notizblock oder einen Aktenschrank, um wichtige Informationen zu speichern und bei Bedarf wieder abzurufen.
Details
Originalbeschreibung des Autors
Use for file-based context management, dynamic context discovery, and reducing context window bloat. Offload context to files for just-in-time loading.
Beliebtheit
- GitHub-Sterne
- 48k
- Platz im Ranking
- #4614
- Lizenz
- MIT
- Aktualisiert
- 15.10.2026
Kommentare
- …
Weitere Skills aus diesem Repository
00-andruia-consultant
48kHilft deinem Agenten, KI-Projekte zu starten oder zu verbessern. Er analysiert Code, schlägt Tools vor und erstellt Aktionspläne auf Spanisch.
007
48kLässt deinen Agenten Sicherheitsaudits und Bedrohungsmodellierung durchführen. Nützlich, um Projekte vor Angriffen und Schwachstellen zu schützen.
10-andruia-skill-smith
48kHilft deinem Agenten, KI-Tools zu erstellen oder zu verbessern. Er legt fest, wie Tools funktionieren, schreibt die Dokumentation und prüft die Struktur.
20-andruia-niche-intelligence
48kLässt deinen Agenten eine Branchenzusammenfassung erstellen. Nützlich, um Kontext, Regeln, Nutzungsmuster und Risiken anhand verlässlicher Quellen zu verstehen.
Ähnliche Skills
technical-documentation
394kHilft deinem Agenten, klare technische Dokumentation und Agenten-Anleitungen zu schreiben und zu prüfen, damit Menschen und KI-Tools leicht folgen können.
architecture-decision-records
280kLässt deinen Agenten wichtige Entscheidungen zur Projektstruktur festhalten. So bleibt nachvollziehbar, warum etwas so gewählt wurde, und die Änderungen sind klar dokumentiert.
code-tour
280kLässt deinen Agenten Schritt-für-Schritt-Erklärungen des Codes mit genauen Datei- und Zeilenangaben erstellen. Nützlich für Einführungen, Erklärungen und Reviews.