memory_init
Scans a repository to create a categorized project baseline, ingests existing compaction summaries, and installs a memory block in CLAUDE.md to enable memory queries and automatic updates.
Instructions
Create the FIRST STATE for a project and wire Claude Code to use memory.
Call this once at the start of working on a repo (or to refresh — it's idempotent). It:
Scans the repo into a categorized
project.*baseline (overview, stack, structure, commands, connections, git, docs).Folds in current context: ingests any existing compaction summaries for this repo's Claude Code session(s).
Installs a managed memory block in the project CLAUDE.md so the agent knows to query (memory_find) and rely on automatic updates.
root: repo path (defaults to the server's working directory). When running in Docker, mount the repo and pass its in-container path here. install_hooks: also add SessionStart/PostCompact hooks to ~/.claude/settings.json.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | ||
| project | No | ||
| install_hooks | No | ||
| install_claude_md | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |