add-mnemon — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited add-mnemon (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
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.
mnemon hooks fire only under --target claude-code. Use this skill on agent groups that run the default Claude provider (AGENT_PROVIDER=claude). Confirm the provider before applying:
grep AGENT_PROVIDER .env groups/*/container.json 2>/dev/nullIf a group uses a different provider (e.g. AGENT_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.
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).
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.
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.
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.
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).
./container/build.sh
docker run --rm --entrypoint mnemon nanoclaw-agent:latest --versionRun 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) # macOSAfter the next container starts, check that setup ran:
docker logs $(docker ps --filter name=nanoclaw-v2 --format '{{.Names}}' | head -1) 2>&1 | grep -i mnemonThen inspect the hooks inside the running container:
docker exec $(docker ps --filter name=nanoclaw-v2 --format '{{.Names}}' | head -1) \
cat /home/node/.claude/settings.json | grep -A5 mnemonHave 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.
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 name=nanoclaw-v2 --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.
mnemon: command not found in containerThe image wasn't rebuilt after adding the Dockerfile layer. Run ./container/build.sh and restart.
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.
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.
Run setup manually inside a running container to see the full error:
docker exec -it <container> mnemon setup --target claude-code --yes --global~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.