Memory skills standalone

The most powerful feature of the system is plain text. The gateway injection is an optimization that saves one agent turn — the CLAUDE.md instructions do the same work without it.

arizuko's memory system is five SKILL.md files and a directory structure. None of it requires a running gateway. You can copy the skills to your local Claude Code setup and get diary entries, episodic recall, facts, and per-user profiles in your personal sessions.

The five skills

SkillWhat it does
diary.mdWrites a dated diary entry at session end. Appends to diary/YYYYMMDD.md.
compact-memories.mdPre-compact hook: archives current session as an episode, compresses old diary entries into summaries.
recall-memories.mdSurfaces relevant past context: recent diary entries, matching episodes, pertinent facts.
facts.mdMaintains a freeform facts file. Adds, updates, and removes facts as the agent learns them.
users.mdMaintains per-user profiles under users/. Updated when meaningful new information is learned.

Copy the skills

mkdir -p ~/.claude/skills

# copy from the arizuko container skills directory
cp /path/to/pub/arizuko/container/skills/self/diary.md          ~/.claude/skills/
cp /path/to/pub/arizuko/container/skills/self/compact-memories.md ~/.claude/skills/
cp /path/to/pub/arizuko/container/skills/self/recall-memories.md ~/.claude/skills/
cp /path/to/pub/arizuko/container/skills/self/facts.md           ~/.claude/skills/
cp /path/to/pub/arizuko/container/skills/self/users.md           ~/.claude/skills/

Wire them into CLAUDE.md

Add two sections to ~/.claude/CLAUDE.md:

## On session start
Run /recall-memories to surface relevant context from past sessions.

## Skills
Skills live in ~/.claude/skills/. Invoke with /skill-name.

Available skills:
- /diary — write a diary entry for this session
- /compact-memories — archive and compress before context compaction
- /recall-memories — surface relevant past context
- /facts — update the facts file
- /users — update a user profile

That is the entire setup. Run claude and the agent has memory.

Directory structure the skills expect

~/.claude/
  skills/          # skill files
  diary/           # dated diary entries (YYYYMMDD.md)
  episodes/        # archived session episodes
  facts.md         # freeform facts
  users/           # per-user profile files

The skills create these directories on first use. Nothing to configure in advance.

Pre-compact hook

compact-memories.md is designed to run as a Claude Code pre-compact hook. Claude Code fires the hook before compacting the context window. The skill archives the current session and compresses old diary entries so the important context survives compaction.

To wire it as a hook, add to your ~/.claude/settings.json:

{
  "hooks": {
    "PreCompact": [
      {
        "matcher": "",
        "hooks": [{"type": "command", "command": "echo '/compact-memories'"}]
      }
    ]
  }
}

Standalone differences from in-container use

Session transcript path: compact-memories.md hardcodes /home/node as the session transcript path — that is the in-container user's home directory. For standalone use, update the path in the skill file to match your Claude Code session directory (typically ~/.claude/ or the project root).

The gateway injects recent diary summaries and episode context at the top of the agent's prompt before the container starts. This saves one agent turn — the agent gets context without needing to call /recall-memories first. Standalone, the agent calls the skill explicitly at session start. The result is identical; the injection is a latency optimization.

How it fits the system

Inside arizuko, the group folder is the agent's working directory. diary/, facts.md, users/, and episodes/ live under the group folder — groups/main/diary/, for example. The skills use relative paths, so they work wherever the working directory is set.

The gateway reads diary entries and episodes to build the injection context. The skills produce those files. The gateway reads them. That is the entire coupling — plain text files at known paths. Standalone users get the same memory system with the agent reading its own files instead of having them injected.