Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I Built My Own Context Index Before Claude Code Had Skills and Memory

Описание и применение

Автор создал иерархический индекс документов, чтобы уменьшить токенов, необходимых для поиска нужной информации в Claude Code, и сравнил его с RAG и встроенными навыками.

Задача

Managing a growing set of project documents in Claude Code’s context window was inefficient; reading the entire collection for every task wasted tokens and time.

Результат

The tree‑structured index dramatically reduced token usage per task, improved efficiency, and remained simple, deterministic, and portable across AI tools.

Рабочий процесс

  • 1. Create a flat index file listing each document with a short description and file path.
  • 2. Organize the index into balanced folders (e.g., 10 top‑level folders, each with 10 subfolders, each containing ~10 entries).
  • 3. When a task arrives, Claude Code scans only the relevant folder hierarchy to find the matching line.
  • 4. Open the referenced file and load its full content only when needed.
  • 5. Maintain the folder balance to keep search depth minimal.
  • 6. Use the index for any document that is read, while keeping Skills and Memory separate for executable actions and personal preferences.

Доказательства

The fix is something most people already do without thinking about it: folders. Nobody keeps a thousand files loose in one folder, they get split into subfolders...

Источник

At 1,000 lines, it stops being nothing. Reading the whole list at that size runs into the tens of thousands of tokens...

Источник

  • Дата записи: 2026-09-05T18:45:00.117Z