add-mnemon
Skill4 starsChanged 3 months agoMITView on GitHub
Add persistent graph-based memory via mnemon. Agents recall past context before responding and remember insights after each turn.
3 other projects use a version of this, 1 of them edited; 1 of 1 edited versions we compared changed its rules.
How people change it
1 of 1 edited versions changed its rules.
Of the 1 edited version we compared: 1 made changes of their own.
Rules people drop
- If a group sets a different provider (e.g.
"provider": "opencode"), it spawns its own process and never invokes theclaudeCLI, so the hooks registered bymnemon setupdo not run for that group.dropped by 1 of 1 - If already applied, re-run Phase 2 anyway — every step is idempotent and skips work that is already in place — then continue to Phase 3 (Verify).dropped by 1 of 1
- If it prints
Wire it, add the setup call right afterset -e, before thecatthat captures stdin, so the result looks like:dropped by 1 of 1
We split this file and each edited version into the rules they give an agent and match them by wording. A version that adds no rule of its own and has not changed since this file last did reads as an older text, so what it lacks is not counted as dropped. We keep no past texts of a file, so that is inferred, and an edited version that started from an older text still counts its gaps as drops.
Adopted by
Most recently taken up by
- prathish-ks/isthmusword for word, first seen Oct 6, 2026
- nanocoai/nanoclawword for word, first seen Oct 4, 2026
- microsoft/amplifier-app-nanoclawedited, first seen Jun 12, 2026
Other versions3 projects use a version of this.
Word for word · 2
- nanocoai/nanoclaw★ 31k100% same
- prathish-ks/isthmus★ 2100% same
Edited · 1
- microsoft/amplifier-app-nanoclaw★ 460% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository51 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- container/CLAUDE.mdCLAUDE.md
- add-anydocSkill
- add-atomic-chat-toolSkill
- add-clidashSkill
- add-codexSkill
- add-dashboardSkill
- add-deltachatSkill
- add-dial-numberSkill
- add-dialSkill
- add-dial-toolSkill
- add-discordSkill
- add-emacsSkill
- add-gchatSkill
- add-githubSkill
- add-imessageSkill
- add-karpathy-llm-wikiSkill
- add-linearSkill
- add-macos-statusbarSkill
- add-matrixSkill
- add-ollama-providerSkill
- add-ollama-toolSkill
- add-opencodeSkill
- add-resendSkill
- add-rtkSkill
- add-signalSkill
- add-slackSkill
- add-tavily-toolSkill
- add-teamsSkill
- add-telegramSkill
- add-vercelSkill
- add-webexSkill
- add-wechatSkill
- add-whatsapp-cloudSkill
- add-whatsappSkill
- customizeSkill
- debugSkill
- init-first-agentSkill
- init-onecliSkill
- learnSkill
- manage-channelsSkill
- manage-mountsSkill
- migrate-from-openclawSkill
- migrate-from-v1Skill
- migrate-memorySkill
- migrate-nanoclawSkill
- migrate-slack-agentsSkill
- setupSkill
- update-nanoclawSkill
- update-skillsSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
If a group sets a different provider (e.g.
- Distinctive: line 28
If already applied, re-run Phase 2 anyway — every step is idempotent and skips work that is already in place — then continue to Phase 3 …
- Very specific: line 65
If it prints Wire it, add the setup call right after set -e, before the cat that captures stdin, so the result looks like:
- Distinctive: line 107
Run from your NanoClaw project root:
- Distinctive: line 117
After the next container starts, check that setup ran:
- Very specific: line 153
Verify MNEMON_DATA_DIR resolves to a mounted path (not an in-container ephemeral directory):
- Very specific: line 159
If the directory is empty after conversations, the mount is missing or the path is wrong.
- Very specific: line 169
If the hooks are absent, mnemon setup may have failed silently.
- Distinctive: line 173
Run setup manually inside a running container to see the full error:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add Mnemon — Persistent Memory
Installs mnemon in the agent container image. On each container start, mnemon setup registers Claude Code hooks that surface relevant memory before the agent responds and store new insights after each turn. Memory is written to the per-agent-group .claude/ mount and survives container restarts.
Provider Compatibility
mnemon hooks fire only under --target claude-code. Use this skill on agent groups that run the default Claude provider. The provider is the materialized provider key in each group's container.json (absent or claude = default Claude provider). Confirm it before applying:
grep -H '"provider"' groups/*/container.json 2>/dev/null # no match, or "provider": "claude" = ClaudeIf a group sets a different provider (e.g. "provider": "opencode"), it spawns its own process and never invokes the claude CLI, so the hooks registered by mnemon setup do not run for that group.
Phase 1: Pre-flight
Check if already applied
grep -q 'MNEMON_VERSION' container/Dockerfile && echo "Already applied" || echo "Not applied"If already applied, re-run Phase 2 anyway — every step is idempotent and skips work that is already in place — then continue to Phase 3 (Verify).
Check latest mnemon version
curl -fsSL https://api.github.com/repos/mnemon-dev/mnemon/releases/latest | grep '"tag_name"'Note the version (e.g. v0.1.1) — use it as MNEMON_VERSION in the next step.
Phase 2: Apply Changes
1. Dockerfile — install mnemon binary
Insert the mnemon block immediately above the # ---- Bun runtime section of container/Dockerfile (skip if grep -q 'MNEMON_VERSION' container/Dockerfile already matches):
# ---- mnemon — 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
ENV MNEMON_DATA_DIR=/home/node/.claude/mnemonMNEMON_DATA_DIR points into the per-agent-group .claude/ mount, so memory persists across container restarts.
2. Entrypoint — run mnemon setup on each container start
mnemon setup is idempotent. Run it once per container/entrypoint.sh. First check whether the line is already present:
grep -q 'mnemon setup' container/entrypoint.sh && echo "Already wired" || echo "Wire it"If it prints Wire it, add the setup call right after set -e, before the cat that captures stdin, so the result looks like:
#!/bin/bash
# NanoClaw agent container entrypoint.
#
# ...existing header comment...
set -e
mnemon setup --target claude-code --yes --global >/dev/stderr 2>&1
cat > /tmp/input.json
exec bun run /app/src/index.ts < /tmp/input.json>/dev/stderr 2>&1 routes all mnemon output to stderr (docker logs) so it doesn't interfere with the JSON stdin handshake between host and agent-runner.
3. Copy the integration tests
Both reach-ins are into container build/runtime files that aren't importable or typed (a GitHub-release binary in the Dockerfile, a shell line in the entrypoint), so structural tests guard them. Copy them into the host test tree:
cp .claude/skills/add-mnemon/mnemon-dockerfile.test.ts src/mnemon-dockerfile.test.ts
cp .claude/skills/add-mnemon/mnemon-entrypoint.test.ts src/mnemon-entrypoint.test.ts
pnpm exec vitest run src/mnemon-dockerfile.test.ts src/mnemon-entrypoint.test.tsmnemon-dockerfile.test.ts asserts the MNEMON_VERSION ARG and MNEMON_DATA_DIR ENV are present (red if the install layer is dropped on an upgrade). mnemon-entrypoint.test.ts asserts the entrypoint invokes mnemon setup --target claude-code (red if the wiring is removed).
4. Rebuild and smoke-test the image
./container/build.sh
docker run --rm --entrypoint mnemon nanoclaw-agent:latest --versionPhase 3: Restart and Verify
Restart the service
Run from your NanoClaw project root:
source setup/lib/install-slug.sh
systemctl --user restart $(systemd_unit) # Linux
# launchctl kickstart -k gui/$(id -u)/$(launchd_label) # macOSConfirm mnemon hooks are registered
After the next container starts, check that setup ran:
docker logs $(docker ps --filter label=nanoclaw-session --format "{{.Names}}" | head -1) 2>&1 | grep -i mnemonThen inspect the hooks inside the running container:
docker exec $(docker ps --filter label=nanoclaw-session --format "{{.Names}}" | head -1) \
cat /home/node/.claude/settings.json | grep -A5 mnemonTest memory recall
Have a conversation with the agent, then start a new session and reference something from the earlier one. Mnemon should surface the relevant context automatically without you restating it.
Memory Storage
Mnemon writes to /home/node/.claude/mnemon/ inside the container, which maps to the per-agent-group .claude/ directory on the host. To find the exact host path:
docker inspect $(docker ps --filter label=nanoclaw-session --format "{{.Names}}" | head -1) \
--format '{{range .Mounts}}{{if eq .Destination "/home/node/.claude"}}{{.Source}}{{end}}{{end}}'To reset all memory for an agent, stop the container and delete the mnemon/ subdirectory from that host path.
Troubleshooting
mnemon: command not found in container
The image wasn't rebuilt after adding the Dockerfile layer. Run ./container/build.sh and restart.
Memory not persisting across restarts
Verify MNEMON_DATA_DIR resolves to a mounted path (not an in-container ephemeral directory):
docker exec <container> sh -c 'ls -la $MNEMON_DATA_DIR'If the directory is empty after conversations, the mount is missing or the path is wrong. Check the host mount with the docker inspect command above.
Agent not using past memory
mnemon setup writes hooks into /home/node/.claude/settings.json. Verify:
docker exec <container> cat /home/node/.claude/settings.jsonIf the hooks are absent, mnemon setup may have failed silently. Check container startup logs for errors from mnemon.
Setup fails at container start
Run setup manually inside a running container to see the full error:
docker exec -it <container> mnemon setup --target claude-code --yes --globalDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

