Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Add persistent graph-based memory to NanoClaw agents using mnemon. Agents recall context before responding and remember insights after. Each group gets isolated memory with optional global shared store.
.claude/skills/mnemon-dev-add-mnemon/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 48% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 83% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 113% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 78% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 127% | 0% |
Add mnemon persistent memory to your NanoClaw installation. After running this skill, every agent session will have access to a per-group memory graph that persists across conversations.
Host Container
~/.mnemon/data/{group}/ ──rw──→ /home/node/.mnemon/data/default/ (private)
~/.mnemon/data/global/ ──ro──→ /home/node/.mnemon/data/global/ (shared)Each group gets its own isolated mnemon store. An optional global store provides shared read-only knowledge across all groups.
bash mnemon --version If not installed:
brew install mnemon-dev/tap/mnemongo install github.com/mnemon-dev/mnemon@latestbash docker image inspect nanoclaw-agent:latest >/dev/null 2>&1 && echo "OK"
bash curl -s https://api.github.com/repos/mnemon-dev/mnemon/releases/latest | grep -o '"tag_name": "v[^"]*"' | cut -d'"' -f4 | sed 's/^v//'
File: container/Dockerfile
Add the following block after the apt-get install section and before the npm install -g line. Replace 0.1.1 with the version from Phase 1 step 3:
dockerfile# Install mnemon for persistent agent memory ARG MNEMON_VERSION=0.1.1 RUN ARCH=$(dpkg --print-architecture) && \ curl -fsSL "https://github.com/mnemon-dev/mnemon/releases/download/v${MNEMON_VERSION}/mnemon_${MNEMON_VERSION}_linux_${ARCH}.tar.gz" \ | tar -xz -C /usr/local/bin mnemon && \ chmod +x /usr/local/bin/mnemon
This works for both amd64 and arm64 architectures.
File: container/skills/mnemon/SKILL.md
Create this file with the mnemon container skill content. This skill teaches the agent inside the container when and how to use mnemon. It should include:
--store global --readonly).mnemon recall "<query>" --limit 5. Also check the global store: mnemon recall "<query>" --store global --readonly --limit 5. Craft focused keyword-rich queries.File: src/container-runner.ts
In the function that builds volume mounts (where the existing group folder and Claude session mounts are defined), add two new mounts after the Claude sessions mount:
typescript// Per-group mnemon memory store (private, read-write) const groupMnemonDir = path.join(homedir(), '.mnemon', 'data', group.folder); fs.mkdirSync(groupMnemonDir, { recursive: true }); mounts.push({ hostPath: groupMnemonDir, containerPath: '/home/node/.mnemon/data/default', readonly: false, }); // Global shared mnemon memory (read-only, optional) const globalMnemonDir = path.join(homedir(), '.mnemon', 'data', 'global'); if (fs.existsSync(globalMnemonDir)) { mounts.push({ hostPath: globalMnemonDir, containerPath: '/home/node/.mnemon/data/global', readonly: true, }); }
Adapt the mount syntax to match the existing pattern in container-runner.ts (it may use string format like hostPath:containerPath:ro or an object format — match whichever the file uses).
Important: The mkdirSync call ensures the per-group mnemon directory exists on the host before the container starts, preventing mount failures.
Create container/hooks/mnemon/ with four shell scripts. These run inside the container at Claude Code lifecycle events to actively drive memory operations.
File: container/hooks/mnemon/prime.sh
bash#!/bin/bash # mnemon SessionStart hook — report memory stats on session init. STATS=$(mnemon status 2>/dev/null) if [ -n "$STATS" ]; then INSIGHTS=$(echo "$STATS" | sed -n 's/.*"total_insights": *\([0-9]*\).*/\1/p' | head -1) EDGES=$(echo "$STATS" | sed -n 's/.*"edge_count": *\([0-9]*\).*/\1/p' | head -1) echo "[mnemon] Memory active (${INSIGHTS:-0} insights, ${EDGES:-0} edges)." else echo "[mnemon] Memory active." fi
File: container/hooks/mnemon/user_prompt.sh
bash#!/bin/bash # mnemon UserPromptSubmit hook — remind agent to evaluate recall/remember. echo "[mnemon] Evaluate: recall needed? After responding, evaluate: remember needed?"
File: container/hooks/mnemon/stop.sh
bash#!/bin/bash # mnemon Stop hook — remind agent to consider remember after responding. INPUT=$(cat) MSG=$(echo "$INPUT" | jq -r '.last_assistant_message // ""' 2>/dev/null) if echo "$MSG" | grep -qiE "mnemon remember|sub-agent.*remember|Stored.*imp="; then exit 0 fi echo "[mnemon] Consider: does this exchange warrant a remember sub-agent?"
File: container/hooks/mnemon/compact.sh
bash#!/bin/bash # mnemon PreCompact hook — save key insights before context compaction. echo "[mnemon] Context compaction starting. Review this session and remember the most valuable insights (up to 5) before context is compressed. Delegate to Task sub-agents now."
Make all scripts executable: chmod +x container/hooks/mnemon/*.sh
File: container/Dockerfile
Add after the mnemon binary install block:
dockerfile# Copy mnemon hook scripts COPY hooks/mnemon/ /app/hooks/mnemon/ RUN chmod +x /app/hooks/mnemon/*.sh
File: src/container-runner.ts
In the block where settings.json is created for each group session (look for writeFileSync with settings.json), merge mnemon hooks into the settings object:
typescript// Register mnemon lifecycle hooks const mnemonHooks = { SessionStart: [{ hooks: [{ type: 'command', command: '/app/hooks/mnemon/prime.sh' }] }], UserPromptSubmit: [{ hooks: [{ type: 'command', command: '/app/hooks/mnemon/user_prompt.sh' }] }], Stop: [{ hooks: [{ type: 'command', command: '/app/hooks/mnemon/stop.sh' }] }], PreCompact: [{ hooks: [{ type: 'command', command: '/app/hooks/mnemon/compact.sh' }] }], }; // Merge into existing settings.hooks (preserve any existing hooks) const existingHooks = settings.hooks || {}; for (const [event, entries] of Object.entries(mnemonHooks)) { existingHooks[event] = [...(existingHooks[event] || []), ...entries]; } settings.hooks = existingHooks;
Adapt this to match the existing settings.json construction pattern in container-runner.ts.
bash mnemon store create global
bash ./container/build.sh
bash # macOS with launchd: launchctl kickstart -k "gui/$(id -u)/com.nanoclaw" # Or manually: npm run dev
bash docker run --rm --entrypoint mnemon nanoclaw-agent:latest --version
bash docker run --rm --entrypoint mnemon nanoclaw-agent:latest status
bash ls ~/.mnemon/data/ # Should show directories for each active group
To remove mnemon from your NanoClaw installation:
ARG MNEMON_VERSION + RUN ... mnemon block and the COPY hooks/mnemon/ linerm -rf container/skills/mnemon/rm -rf container/hooks/mnemon/src/container-runner.ts: delete the mnemon mount blockssrc/container-runner.ts: delete the mnemon hooks merge in settings.json./container/build.shrm -rf ~/.mnemon/data/| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-15 | fail→fail | 15,075 | 5,023 | -67% | 1 | 1 | 0% | 2,186 | 3,335 | +53% | 0 | 0 | — |
case-01 | fail→fail | 23,117 | 4,539 | -80% | 1 | 1 | 0% | 4,355 | 3,067 | -30% | 0 | 0 | — |
case-02 | fail→fail | 19,396 | 6,201 | -68% | 1 | 1 | 0% | 3,620 | 2,974 | -18% | 0 | 0 | — |
case-03 | fail→pass | 32,119 | 6,899 | -79% | 1 | 1 | 0% | 2,609 | 3,859 | +48% | 0 | 0 | — |
case-04 | pass→pass | 14,820 | 9,974 | -33% | 1 | 1 | 0% | 2,454 | 4,099 | +67% | 0 | 0 | — |
case-05 | pass→fail | 14,060 | 10,999 | -22% | 1 | 1 | 0% | 2,610 | 4,254 | +63% | 0 | 0 | — |
case-06 | pass→pass | 9,150 | 8,919 | -3% | 1 | 1 | 0% | 1,423 | 3,552 | +150% | 0 | 0 | — |
case-07 | fail→pass | 11,121 | 4,231 | -62% | 1 | 1 | 0% | 1,800 | 3,286 | +83% | 0 | 0 | — |
case-08 | fail→pass | 9,414 | 3,868 | -59% | 1 | 1 | 0% | 1,492 | 3,171 | +113% | 0 | 0 | — |
case-09 | fail→pass | 11,632 | 3,945 | -66% | 1 | 1 | 0% | 1,757 | 3,124 | +78% | 0 | 0 | — |
case-10 | fail→fail | 20,876 | 2,373 | -89% | 1 | 1 | 0% | 2,901 | 2,910 | +0% | 0 | 0 | — |
case-11 | fail→pass | 11,051 | 7,140 | -35% | 1 | 1 | 0% | 1,668 | 3,782 | +127% | 0 | 0 | — |
case-12 | fail→fail | 10,618 | 2,360 | -78% | 1 | 1 | 0% | 1,723 | 2,881 | +67% | 0 | 0 | — |
case-13 | fail→pass | 16,415 | 3,643 | -78% | 1 | 1 | 0% | 2,545 | 3,024 | +19% | 0 | 0 | — |
case-14 | fail→pass | 10,836 | 1,820 | -83% | 1 | 1 | 0% | 1,515 | 2,761 | +82% | 0 | 0 | — |
case-16 | fail→pass | 10,360 | 2,092 | -80% | 1 | 1 | 0% | 1,425 | 2,836 | +99% | 0 | 0 | — |
case-17 | fail→pass | 16,229 | 2,649 | -84% | 1 | 1 | 0% | 2,509 | 2,884 | +15% | 0 | 0 | — |
case-18 | fail→pass | 14,614 | 5,280 | -64% | 1 | 1 | 0% | 2,396 | 3,443 | +44% | 0 | 0 | — |
case-19 | fail→pass | 27,331 | 1,502 | -95% | 1 | 1 | 0% | 4,163 | 2,738 | -34% | 0 | 0 | — |
case-20 | fail→pass | 9,027 | 1,367 | -85% | 1 | 1 | 0% | 1,363 | 2,713 | +99% | 0 | 0 | — |
case-21 | fail→pass | 8,748 | 3,717 | -58% | 1 | 1 | 0% | 1,262 | 3,133 | +148% | 0 | 0 | — |
case-22 | fail→pass | 4,813 | 2,643 | -45% | 1 | 1 | 0% | 685 | 2,909 | +325% | 0 | 0 | — |
case-23 | fail→pass | 19,421 | 3,139 | -84% | 1 | 1 | 0% | 1,540 | 3,081 | +100% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +61 percentage points is the difference between those two pass rates over the 23 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.