home / skills / yuniorglez / gemini-elite-core / context-distiller

context-distiller skill

/skills/context-distiller

This skill distills high-fidelity context for AI swarms by automating packing, symbol mapping, and memory rehydration to maximize session intelligence.

npx playbooks add skill yuniorglez/gemini-elite-core --skill context-distiller

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
3.3 KB
---
name: context-distiller
id: context-distiller
version: 1.1.0
description: "Senior Context Architect & Memory Engineer. Expert in Automated Context Packing, Symbol Indexing, and Agent Rehydration for 2026."
---

# 🗺️ Skill: Context Distiller (v1.1.0)

## Executive Summary
The `context-distiller` is the master of high-fidelity information management for AI swarms. In 2026, the success of a mission depends on the quality and density of the context provided to the agent. This skill focuses on **Automated Context Packing**, building **Symbolic Project Maps**, and managing **Agent Memory Rehydration** to ensure that every session starts with maximum intelligence and minimum token noise.

---

## 📋 Table of Contents
1. [The Distillation Protocol](#the-distillation-protocol)
2. [The "Do Not" List (Anti-Patterns)](#the-do-not-list-anti-patterns)
3. [Automated Context Packing (Repomix)](#automated-context-packing-repomix)
4. [Symbolic Project Mapping](#symbolic-project-mapping)
5. [Agent Memory & Rehydration](#agent-memory--rehydration)
6. [Hierarchical Inheritance](#hierarchical-inheritance)
7. [Reference Library](#reference-library)

---

## 🛠️ The Distillation Protocol

Before initiating a new mission or subproject, the Distiller MUST:

1.  **Codebase Scan**: Use `rg` and `list_directory` to map the active module's boundaries.
2.  **Symbol Indexing**: Generate a list of critical types and interfaces.
3.  **Inheritance Audit**: load master rules from `docs/AGENTS.md`.
4.  **Local Rehydration**: Create or read `.gemini/GEMINI.md` for mission-specific context.
5.  **Context Packing**: Bundle all findings into a structured Markdown artifact.

---

## 🚫 The "Do Not" List (Anti-Patterns)

| Anti-Pattern | Why it fails in 2026 | Modern Alternative |
| :--- | :--- | :--- |
| **Thin Context** | Leads to hallucinations and generic code. | Use **High-Fidelity Packing**. |
| **Token Bloat** | High latency and poor reasoning. | Use **Semantic Filtering**. |
| **Flat History** | Agent loses track of past decisions. | Use **Memory Rehydration**. |
| **Manual Symbol Hunt**| Slow and prone to missing definitions. | Use **Symbolic Project Maps**. |
| **Ignoring Rules** | Inconsistent architecture. | Use **Hierarchical Inheritance**. |

---

## 📦 Automated Context Packing

We use **Repomix** and **gitingest** to feed the models:
-   **Structure**: Group files by domain (Logic, Types, Tests).
-   **Optimization**: Exclude noise (node_modules, dist, git).
-   **Security**: Mandatory secret scrubbing before ingestion.

*See [References: Context Packing](./references/automated-context-packing.md) for workflows.*

---

## 🐘 Symbolic Project Mapping

When projects are large, don't read everything—use a map.
-   **JSON Maps**: Indexing every export and its file path.
-   **Symbolic RAG**: fetching only relevant files based on symbol dependency.

---

## 📖 Reference Library

Detailed deep-dives into Information Engineering:

- [**Context Packing**](./references/automated-context-packing.md): Bundling artifacts for LLMs.
- [**Symbolic Mapping**](./references/symbol-indexing-symbolic-ai.md): Navigating large codebases.
- [**Memory Rehydration**](./references/agent-memory-rehydration.md): Persistent mission context.
- [**Inheritance Models**](./references/context-inheritance.md): Global vs Local rules.

---

*Updated: January 22, 2026 - 21:40*

Overview

This skill is a Context Distiller designed for senior context architects and memory engineers to convert a codebase and mission artifacts into high-density, model-ready context. It automates context packing, builds symbolic project maps, and manages agent memory rehydration so agents start each session with relevant, compact knowledge. The goal is to reduce hallucinations, minimize token cost, and preserve decision history across agent lifecycles.

How this skill works

The distiller performs an initial codebase scan to identify module boundaries and exports, then runs symbol indexing to map types, interfaces, and dependencies. It applies semantic filtering and secret scrubbing, groups files by domain, and emits a structured Markdown artifact or JSON map for ingestion. For live agents it supports local rehydration by reading or writing mission-specific GEMINI.md artifacts and layering hierarchical inheritance rules.

When to use it

  • Before launching an autonomous mission or subproject to ensure the agent has mission-aware context.
  • When onboarding a new agent or model variant to a large, unfamiliar repository.
  • To reduce token usage and improve reasoning by replacing raw file ingestion with distilled artifacts.
  • When you need consistent enforcement of architectural rules via inheritance and policy layers.
  • During iterative development to keep memory rehydration synchronized with recent decisions.

Best practices

  • Run a fast codebase scan (rg/list_directory) to establish boundaries before deep indexing.
  • Group content by domain (Logic, Types, Tests) and exclude noisy paths (node_modules, dist, .git).
  • Apply mandatory secret scrubbing and automated filters prior to ingestion.
  • Produce JSON symbol maps for on-demand RAG fetches instead of reloading whole files.
  • Maintain a local GEMINI.md per mission to capture session-specific directives and outcomes.

Example use cases

  • Convert a monorepo into a symbolic map so agents fetch only the files relevant to a symbol dependency.
  • Create a compact mission artifact for a long-running autonomous workflow to preserve decision history.
  • Automate pre-flight packing for CI pipelines that spin up ephemeral agents with strict token budgets.
  • Enforce architecture rules by applying hierarchical inheritance of master agent policies during initialization.

FAQ

How does this reduce hallucinations?

By supplying high-fidelity, semantically filtered context and symbol-indexed references, the agent reasons from precise definitions instead of noisy or partial code.

Can I use partial maps for RAG instead of full ingestion?

Yes—JSON symbol maps enable symbolic RAG so you fetch only the files tied to resolved symbols, keeping token usage low.