atlas — хук для Claude Code: индексация кода и память агента
Хук atlas для Claude Code ведёт локальный индекс и память агента. Он подключается к событиям сессии, вызовам инструментов и отправке промпта.
Apache-2.0 ★ 135 обновлён 2026-11-17
/plugin marketplace add bloodfeast/atlas
/plugin install atlas@atlasЧто делает atlas
atlas поддерживает поиск по идентификаторам и разделам, индексирует код и добавляет записи в память, не перезаписывая предыдущие. Воспоминания возвращаются с учётом их релевантности, а отдельный хук контролирует лимит контекста.
Хуки срабатывают на старте и завершении сессии, перед вызовом инструмента и после него, при отправке промпта, остановке агента и сжатии контекста. Для части событий используется MCP-инструмент hook, для событий сессии запускается ${CLAUDE_PLUGIN_ROOT}/bin/atlas --hook. Установка добавляет плагин через маркетплейс Claude Code; настройки хуков находятся в .claude/settings.json.
Какие задачи решает
- найти идентификатор в локальном индексе
- искать по разделам кода
- сохранять записи в памяти агента
- возвращать релевантные воспоминания при отправке промпта
- контролировать лимит контекста хуком
Примеры запросов агенту
- Найди в проекте идентификатор
UserPromptSubmit. - Сохрани эту информацию в памяти агента и верни её, когда она будет релевантна.
Как установить atlas
1Через маркетплейс плагинов
/plugin marketplace add bloodfeast/atlas/plugin install atlas@atlas2Вручную: положить файлы
.claude/settings.jsonБлок hooks: событие (PreToolUse, PostToolUse, Stop…) → команда. Личные — ~/.claude/settings.json
По шагам, с командами для каждой платформы: Хуки Claude Code: что это, где настраивать и как запретить опасную команду
Вопросы об atlas
Как установить atlas в Claude Code?
Выполни /plugin marketplace add bloodfeast/atlas, затем /plugin install atlas@atlas. Настройки хуков находятся в .claude/settings.json.
Что делает atlas?
Хук ведёт локальный индекс и память агента: ищет идентификаторы и разделы, индексирует код и сохраняет записи. Релевантные воспоминания возвращаются по запросу.
На каких событиях срабатывает хук atlas?
Он запускается при старте и завершении сессии, отправке промпта, вызовах инструментов, остановке агента и сжатии контекста.
Исходный текст
hooks.json · Apache-2.0
Hooks bundle shipped with the atlas plugin for Claude Code.
A local index and memory store for agents: identifier lookup, section search, a code index, append-only memory, relevance-gated recall and a context-cap hook.
Triggers on: PreToolUse, PostToolUse, UserPromptSubmit, SessionStart, SessionEnd, Stop, SubagentStop, PreCompact.
```json
{
"hooks": {
"SessionStart": [
{"hooks": [{"type": "command", "command": "\"${CLAUDE_PLUGIN_ROOT}/bin/atlas\" --hook", "timeout": 10}]}
],
"SessionEnd": [
{"matcher": "clear",
"hooks": [{"type": "command", "command": "\"${CLAUDE_PLUGIN_ROOT}/bin/atlas\" --hook", "timeout": 10}]}
],
"UserPromptSubmit": [
{"hooks": [{"type": "mcp_tool", "server": "plugin:atlas:atlas", "tool": "hook",
"input": {"event": "UserPromptSubmit", "session_id": "${session_id}", "prompt": "${prompt}", "transcript_path": "${transcript_path}"}}]}
],
"SubagentStart": [
{"hooks": [{"type": "mcp_tool", "server": "plugin:atlas:atlas", "tool": "hook",
"input": {"event": "SubagentStart", "session_id": "${session_id}", "agent_id": "${agent_id}", "agent_type": "${agent_type}", "transcript_path": "${transcript_path}"}}]}
],
"SubagentStop": [
{"hooks": [{"type": "mcp_tool", "server": "plugin:atlas:atlas", "tool": "hook",
"input": {"event": "SubagentStop", "session_id": "${session_id}", "agent_id": "${agent_id}", "agent_type": "${agent_type}", "transcript_path": "${transcript_path}", "last_assistant_message": "${last_assistant_message}", "stop_hook_active": "${stop_hook_active}", "background_tasks": "${background_tasks}"}}]}
],
"Stop": [
{"hooks": [{"type": "mcp_tool", "server": "plugin:atlas:atlas", "tool": "hook",
"input": {"event": "Stop", "session_id": "${session_id}", "transcript_path": "${transcript_path}", "stop_hook_active": "${stop_hook_active}", "background_tasks": "${background_tasks}", "session_crons": "${session_crons}"}}]}
],
"PreToolUse": [
{"matcher": "*",
"hooks": [{"type": "mcp_tool", "server": "plugin:atlas:atlas", "tool": "hook",
"input": {"event": "PreToolUse", "session_id": "${session_id}", "agent_id": "${agent_id}", "tool_name": "${tool_name}", "tool_use_id": "${tool_use_id}", "transcript_path": "${transcript_path}", "cwd": "${cwd}", "permission_mode": "${permission_mode}", "tool_prompt": "${tool_input.prompt}", "tool_input": "${tool_input}"}}]}
],
"PostToolUse": [
{"matcher": "Bash|PowerShell|Read|Grep|Glob|Edit|Write|AskUserQuestion",
"hooks": [{"type": "mcp_tool", "server": "plugin:atlas:atlas", "tool": "hook",
"input": {"event": "PostToolUse", "session_id": "${session_id}", "agent_id": "${agent_id}", "tool_name": "${tool_name}", "transcript_path": "${transcript_path}", "cwd": "${cwd}", "tool_input": "${tool_input}", "tool_response": "${tool_response}"}}]}
],
"PreCompact": [
{"hooks": [{"type": "mcp_tool", "server": "plugin:atlas:atlas", "tool": "hook",
"input": {"event": "PreCompact", "session_id": "${session_id}", "agent_id": "${agent_id}", "agent_type": "${agent_type}", "trigger": "${trigger}", "transcript_path": "${transcript_path}"}}]}
]
}
}
```
© Brandon White · Apache-2.0 · bloodfeast/atlas