Skip to main content
hook

atlas — Claude Code hook: code indexing and memory recall

atlas is a Claude Code hook that keeps a local index and agent memory. It runs on session events, tool calls and prompt submission.

Apache-2.0 ★ 135 updated 2026-11-17

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add bloodfeast/atlas
/plugin install atlas@atlas
Open on GitHub

What atlas does

atlas supports identifier and section lookup, builds a code index and adds entries to append-only memory. It brings stored information back when it matches the current context. A separate hook enforces a context cap.

The hooks run at session start and end, around tool use, when a prompt is submitted, when an agent stops and before context compaction. Some events call the MCP tool hook; session events run ${CLAUDE_PLUGIN_ROOT}/bin/atlas --hook. Installation uses the Claude Code plugin marketplace, and hook settings are in .claude/settings.json.

What it helps with

  • find an identifier in the local index
  • search code by section
  • keep agent memory append-only
  • recall relevant stored information on prompt submission
  • enforce a context cap with a hook

Example prompts for the agent

  • Find the UserPromptSubmit identifier in this project.
  • Store this information in agent memory and recall it when relevant.

How to install atlas

1Plugin marketplace

/plugin marketplace add bloodfeast/atlas
/plugin install atlas@atlas

2Manually: put the files in place

.claude/settings.json

The hooks block: event (PreToolUse, PostToolUse, Stop…) → command. Personal ones go to ~/.claude/settings.json

Step by step, with commands for each platform: Claude Code hooks: what they are, where to configure them, how to block a risky command

Questions about atlas

How do I install atlas in Claude Code?

Run /plugin marketplace add bloodfeast/atlas, then /plugin install atlas@atlas. Hook settings are in .claude/settings.json.

What does atlas do?

The hook maintains a local index and agent memory. It supports identifier and section lookup, code indexing, and relevance-gated recall.

Which events trigger atlas?

It runs at session start and end, on prompt submission and tool use, when an agent stops, and before context compaction.

Source text

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

Similar hooks

Hooks catalog →

From the same set4

More in the catalog

Project sponsors

Companies that keep this analytics open