Agent skill

mnemon Persistent Memory for NanoClaw

by nanocoai in nanocoai/nanoclaw

Installs mnemon in the agent container so agents recall relevant past context before replying and store new insights after every turn.

MITAuto-check passedAgent Workflows

Install mnemon Persistent Memory for NanoClaw

skills CLI
$ npx skills add nanocoai/nanoclaw --skill add-mnemon -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install nanocoai/nanoclaw add-mnemon --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/nanocoai/nanoclaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/add-mnemon .claude/skills/add-mnemon && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
add-mnemon
GitHub stars
31k
Token cost
~1.7k tokens
SKILL.md length
593 words
Files
4
Skills in repo
59
Repo updated
First seen
Licence
MIT

At a glance

Installs mnemon in the agent container so agents recall relevant past context before replying and store new insights after every turn.

  • Works in 3 steps: Pre-flight → Apply Changes → Restart and Verify
  • Giving NanoClaw agents memory that persists across conversations
  • SKILL.md covers Provider Compatibility, Phase 1: Pre-flight, Phase 2: Apply Changes and Phase 3: Restart and Verify, plus 2 more sections
  • Runs TypeScript scripts from its folder; calls docker, curl and bun; reaches github.com and api.github.com

What it does

mnemon gives NanoClaw agents graph-based memory that lasts across turns and restarts. It goes into the agent container image, and at every container start `mnemon setup` registers Claude Code hooks: one pulls relevant memory before the agent replies and another stores new insights after each turn. Memory is written to the `.claude/` mount of each agent group, so it survives restarts.

The hooks only fire for groups on the default Claude provider, so the skill has you check each group's `container.json` first. A group on another provider, such as opencode, never calls the `claude` CLI and gets no memory. Applying the skill means adding a pinned mnemon install block to `container/Dockerfile` and one `mnemon setup` call near the top of `container/entrypoint.sh`. Both steps can be repeated safely, and two tests cover the Dockerfile and the entrypoint.

When your agent uses it

  • Giving NanoClaw agents memory that persists across conversations
  • Checking which agent groups use a provider compatible with the memory hooks
  • Re-applying the mnemon container changes after an image update

Example prompts

  • “Add mnemon persistent memory to my NanoClaw agents.”
  • “Check whether any of my agent groups use a provider that will ignore the mnemon hooks.”
  • “Verify the Dockerfile and entrypoint changes for mnemon are in place.”

Requirements

  • A NanoClaw installation with its container image
  • Agent groups on the default Claude provider

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Pre-flight
  2. Apply Changes
  3. Restart and Verify

What it can do on your machine

Read from SKILL.md and the folder at commit 66f0823. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (TypeScript), which the agent can run.

    Shell commands in SKILL.md call:

    • docker
    • curl
    • bun
    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com
    • api.github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

mnemon Persistent Memory for NanoClaw loads about 1.7k tokens when it runs. Until then it costs about 35 tokens; SKILL.md has 593 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~35
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from nanocoai/nanoclaw at commit 66f0823, republished under its MIT licence (© nanocoai). 593 words, ~1,680 tokens.

Download SKILL.mdSave it as .claude/skills/add-mnemon/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
add-mnemon
description
Add persistent graph-based memory via mnemon. Agents recall past context before responding and remember insights after each turn.

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:

bash
grep -H '"provider"' groups/*/container.json 2>/dev/null   # no match, or "provider": "claude" = Claude

If 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
bash
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
bash
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):

dockerfile
# ---- 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/mnemon

MNEMON_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:

bash
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:

bash
#!/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:

bash
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.ts

mnemon-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).

Show full SKILL.md (229 more words)Show less
4. Rebuild and smoke-test the image
bash
./container/build.sh
docker run --rm --entrypoint mnemon nanoclaw-agent:latest --version

Phase 3: Restart and Verify

Restart the service

Run from your NanoClaw project root:

bash
source setup/lib/install-slug.sh
systemctl --user restart $(systemd_unit)              # Linux
# launchctl kickstart -k gui/$(id -u)/$(launchd_label)   # macOS
Confirm mnemon hooks are registered

After the next container starts, check that setup ran:

bash
docker logs $(docker ps --filter label=nanoclaw-session --format "{{.Names}}" | head -1) 2>&1 | grep -i mnemon

Then inspect the hooks inside the running container:

bash
docker exec $(docker ps --filter label=nanoclaw-session --format "{{.Names}}" | head -1) \
  cat /home/node/.claude/settings.json | grep -A5 mnemon
Test 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:

bash
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):

bash
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:

bash
docker exec <container> cat /home/node/.claude/settings.json

If 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:

bash
docker exec -it <container> mnemon setup --target claude-code --yes --global

© nanocoai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files in .claude/skills/add-mnemon of nanocoai/nanoclaw.

  • SKILL.md
  • REMOVE.md
  • mnemon-dockerfile.test.ts
  • mnemon-entrypoint.test.ts

Open the folder on GitHubat commit 66f0823

Compare with similar skills

mnemon Persistent Memory for NanoClaw next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

mnemon Persistent Memory for NanoClaw compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
mnemon Persistent Memory for NanoClaw this skillnanocoai/nanoclaw31k—~1.7kAutomated safety check: PassMIT
Cognee Docker Setuptopoteretes/cognee32k—~901Automated safety check: NotesApache-2.0
Project Releaseswimmwatch/cloakbrowser-mcp164—~1.9kAutomated safety check: PassMIT
Setup Xhs MCPautoclaw-cc/xiaohongshu-mcp-skills269—~678Automated safety check: PassMIT
Happycapy Skill Creatorhappycapy-ai/Happycapy-skills137—~627Automated safety check: PassMIT
Devcontainer Devstacklok/toolhive-studio170—~3.8kAutomated safety check: NotesApache-2.0

Similar skills

  • Cognee Docker Setup

    topoteretes/cognee

    Runs the Cognee AI memory platform in Docker, from a one-file prebuilt image to a full compose stack with UI, MCP server, Postgres and Neo4j.

    32k GitHub stars~901 tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Project Release

    swimmwatch/cloakbrowser-mcp

    Prepare, publish, verify, or recover a cloakbrowser-mcp release only when the user explicitly requests release work.

    164 GitHub stars~1.9k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Setup Xhs MCP

    autoclaw-cc/xiaohongshu-mcp-skills

    安装部署 xiaohongshu-mcp 服务并配置 MCP 连接,引导用户完成从零到可用的全流程. An agent skill from autoclaw-cc/xiaohongshu-mcp-skills.

    269 GitHub stars~678 tokensUpdated 7 mo ago
    Agent WorkflowsAuto-check passed
  • Happycapy Skill Creator

    happycapy-ai/Happycapy-skills

    Automate HappyCapy skill creation by finding and adapting existing skills from anthropics/skills repository.

    137 GitHub stars~627 tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Devcontainer Dev

    stacklok/toolhive-studio

    Spin up and interact with ToolHive Studio's containerized dev environment (Xvfb + noVNC + DinD).

    170 GitHub stars~3.8k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Autoresearch Task QA

    bosprimigenious/autoresearch-skills

    对 AutoResearch 目录或 ZIP 做只读质检;先审优化面是否仅调参、Baseline 是否合理、Reference 提升是否充分,再查 21 项实现、严格 Docker 路径、Harbor 接口与成对训练证据。输出方法介绍、完整跑分、专家退回说明及 TXT/Markdown/JSON 报告;不用于求解任务。

    152 GitHub stars~1.6k tokensUpdated 5 days ago
    Agent WorkflowsAuto-check passed

More from nanocoai/nanoclaw

All 59 skills in this repo
  • Installs or refreshes Iron Proxy and its Iron Control web console for NanoClaw, with a local Docker setup, database, credentials and a human approval bridge.

    31k GitHub stars~4.6k tokensUpdated 3 days ago
    Auto-check: notes
  • Installs or refreshes OneCLI as the gateway provider for NanoClaw, copying the adapter files, registering the provider and running the setup script.

    31k GitHub stars~1.1k tokensUpdated 3 days ago
    Auto-check: notes
  • Agent Browser

    nanocoai/nanoclaw

    Drives a web browser from the shell with the agent-browser CLI: open pages, read an element snapshot, click and fill by reference, grab text and screenshots.

    31k GitHub starsUsed in 2 repos~1.6k tokens
    Auto-check passed
  • Guides a conversational migration from an OpenClaw install to NanoClaw v2, carrying over identity, channel credentials, scheduled tasks and workspace files.

    31k GitHub stars~6k tokensUpdated 3 days ago
    Auto-check: notes
  • Wires up an additional phone number onto an already-installed Dial channel, so one NanoClaw install answers SMS and AI voice calls on more than one line.

    31k GitHub stars~1.5k tokensUpdated 3 days ago
    Auto-check passed
  • Add Dial Tool

    nanocoai/nanoclaw

    Installs the `dial` CLI and a credential in NanoClaw agent containers so chosen agents can send SMS, place AI voice calls and receive verification codes.

    31k GitHub stars~4.4k tokensUpdated 3 days ago
    Auto-check passed

Works with

Questions about mnemon Persistent Memory for NanoClaw

What does mnemon Persistent Memory for NanoClaw do?

Installs mnemon in the agent container so agents recall relevant past context before replying and store new insights after every turn. mnemon gives NanoClaw agents graph-based memory that lasts across turns and restarts. It goes into the agent container image, and at every container start `mnemon setup` registers Claude Code hooks: one pulls relevant memory before the agent replies and another stores new insights after each turn.

When should I use mnemon Persistent Memory for NanoClaw?

mnemon Persistent Memory for NanoClaw fits situations like: giving NanoClaw agents memory that persists across conversations; checking which agent groups use a provider compatible with the memory hooks; re-applying the mnemon container changes after an image update.

How do I install mnemon Persistent Memory for NanoClaw in Claude Code?

Run `npx skills add nanocoai/nanoclaw --skill add-mnemon -a claude-code`. Or copy the skill folder (.claude/skills/add-mnemon in nanocoai/nanoclaw) into .claude/skills/add-mnemon in your project. Claude Code loads it when a task matches its description.

How do I install mnemon Persistent Memory for NanoClaw in Codex?

Run `npx skills add nanocoai/nanoclaw --skill add-mnemon -a codex`. Or copy the skill folder (.claude/skills/add-mnemon in nanocoai/nanoclaw) into .agents/skills/add-mnemon in your project. Codex loads it when a task matches its description.

Can I use mnemon Persistent Memory for NanoClaw in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nanocoai/nanoclaw --skill add-mnemon -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-mnemon, .gemini/skills/add-mnemon, .github/skills/add-mnemon and .opencode/skills/add-mnemon in your project.

What does mnemon Persistent Memory for NanoClaw need to run?

Going by SKILL.md and its folder, mnemon Persistent Memory for NanoClaw needs TypeScript for the scripts in its folder and the command-line tools its instructions call (docker, curl, bun and pnpm). Our summary lists: A NanoClaw installation with its container image; Agent groups on the default Claude provider.

Does mnemon Persistent Memory for NanoClaw access the network?

SKILL.md names 2 domains. In commands or code: github.com and api.github.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is mnemon Persistent Memory for NanoClaw safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does mnemon Persistent Memory for NanoClaw use?

mnemon Persistent Memory for NanoClaw is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does mnemon Persistent Memory for NanoClaw use?

About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to mnemon Persistent Memory for NanoClaw?

Skills that share tags, products or a category with mnemon Persistent Memory for NanoClaw: Cognee Docker Setup (topoteretes/cognee, 32k stars), Project Release (swimmwatch/cloakbrowser-mcp, 164 stars), Setup Xhs MCP (autoclaw-cc/xiaohongshu-mcp-skills, 269 stars) and Happycapy Skill Creator (happycapy-ai/Happycapy-skills, 137 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains mnemon Persistent Memory for NanoClaw?

nanocoai (a GitHub organization) maintains it in nanocoai/nanoclaw, which has 30,902 GitHub stars. The repository holds 59 skills in this directory. The repository was last updated on October 6, 2026.

Source: nanocoai/nanoclaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.