mindkeeper
Time Machine for Your AI's Brain — version control for agent context files. Use when the user asks about changes in SOUL.md, AGENTS.md, MEMORY.md, or other agent context files; when they want to undo, rollback, or compare versions; or when they need a checkpoint before risky edits.
git clone https://github.com/seekcontext/mindkeeper
T=$(mktemp -d) && git clone --depth=1 https://github.com/seekcontext/mindkeeper "$T" && mkdir -p ~/.claude/skills && cp -r "$T/packages/openclaw/skills/mindkeeper" ~/.claude/skills/seekcontext-mindkeeper-mindkeeper && rm -rf "$T"
T=$(mktemp -d) && git clone --depth=1 https://github.com/seekcontext/mindkeeper "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/packages/openclaw/skills/mindkeeper" ~/.openclaw/skills/seekcontext-mindkeeper-mindkeeper && rm -rf "$T"
packages/openclaw/skills/mindkeeper/SKILL.mdMindkeeper — Time Machine for Your AI's Brain
Use mindkeeper tools when the user asks about changes, history, or versions of their agent context files (
AGENTS.md, SOUL.md, USER.md, IDENTITY.md, TOOLS.md, HEARTBEAT.md, MEMORY.md, memory/, skills/).
Bootstrap (One-time setup)
When the user enables mindkeeper or asks for mindkeeper capability, first try
mind_status. If it fails, do not assume the plugin is missing yet. It can also fail when Gateway has not finished loading the plugin, when tools are not exposed to the current session yet, or when the workspace copy of this skill is unavailable.
-
Diagnose conservatively — Tell the user: "I can't access the mindkeeper tools yet. The plugin may be missing, Gateway may still need a restart, or the current session may not have loaded the skill/tool context yet." Only say the plugin is definitely missing if the runtime explicitly shows that
is not installed.mindkeeper-openclaw -
If the runtime confirms the plugin is missing and the user confirms, run this flow:
- Install the plugin — Run via bash:
openclaw plugins install mindkeeper-openclaw - Restart Gateway if the runtime supports it — Use the available runtime mechanism to restart Gateway. If restart is unavailable or fails, tell the user: "Plugin installed. Restart your Gateway manually to apply."
- Confirm — If restart succeeded, tell the user: "Mindkeeper is ready. Restart complete — you can now ask about history, diffs, rollbacks, or snapshots." If restart did not happen, tell the user that the plugin is installed but Gateway must be restarted before the tools will appear.
- Install the plugin — Run via bash:
-
If the plugin appears installed already — Tell the user to retry after Gateway finishes loading or after a manual restart. If a workspace copy of the skill appears to be missing, mention that the session may not have loaded the built-in mindkeeper skill correctly yet.
-
Alternative — If the user prefers to install manually, tell them: "Run
in your terminal, then restart your Gateway. After that, mindkeeper will be ready."openclaw plugins install mindkeeper-openclaw
If
mind_status succeeds, the plugin is already installed; skip the bootstrap and proceed with the user's request.
Tool Preference
In OpenClaw Plugin mode, prefer the
mind_* tools over CLI commands for normal mindkeeper operations.
- Use
,mind_status
,mind_history
,mind_diff
, andmind_snapshot
whenever they are available.mind_rollback - Do not use
oropenclaw mind ...
for routine history, diff, snapshot, or rollback requests if the plugin tools are available.mindkeeper ... - CLI commands are for one-time setup, troubleshooting, manual user workflows, or when the user explicitly asks for terminal commands.
Available Tools
| Tool | Purpose |
|---|---|
| Show what files are tracked and whether there are unsaved changes |
| Browse the change log for one file or all files |
| Compare any two versions of a file side-by-side |
| Restore a file to a previous version (always preview first) |
| Save a named checkpoint before making significant changes |
Tracking Scope
Mindkeeper tracks these files by default:
,AGENTS.md
,SOUL.md
,USER.mdIDENTITY.md
,TOOLS.md
,HEARTBEAT.mdMEMORY.mdmemory/**/*.mdskills/**/*.md
Excluded by default:
BOOTSTRAP.md, canvas/**, .git/, .mindkeeper/.
When to Use
| User says… | Action |
|---|---|
| "What changed in SOUL.md?" | with |
| "Show me the diff from last week" | to find the commit, then |
| "Undo that change" / "Roll back AGENTS.md" | Full rollback procedure (see below) |
| "Save a checkpoint before I experiment" | with a descriptive name |
| "Is mindkeeper tracking my files?" | |
| "What does my history look like?" | without a file filter |
Direct Edit Requests
If the user asks to directly edit a tracked file such as
SOUL.md, AGENTS.md, or MEMORY.md, make the edit directly.
- Do not block on CLI availability.
- Do not mention unavailable CLI commands unless the user explicitly asked for a CLI-based workflow.
- Mindkeeper's background watcher should capture the change automatically after the edit.
- If relevant, you may mention that the change should now be tracked by mindkeeper.
Tool Usage Guide
mind_status
Call this first when the user asks about history, tracking state, snapshots, or rollback, or if you're unsure whether mindkeeper is initialized.
mind_status → { initialized, workDir, pendingChanges, snapshots }
You do not need to call
mind_status before a simple direct edit request unless the user specifically asks about tracking or history.
mind_history
Returns a list of commits with short hash, date, and message.
(optional): filter to a specific file path, e.g.file"SOUL.md"
(optional): number of entries to return (default 10, increase for longer searches)limit
mind_history({ file: "SOUL.md", limit: 20 }) → { count, entries: [{ oid, date, message }] }
mind_diff
Compares two versions of a file.
from and to are short or full commit hashes from mind_history.
- Omit
to compareto
against the current version (HEAD).from - To see what changed in the latest commit: use
(the parent) andfrom: entries[1].oid
or omitto: entries[0].oid
for HEAD. Do NOT useto
withfrom: entries[0].oid
— that compares the same commit to itself and yields an empty diff.to: HEAD
mind_diff({ file: "SOUL.md", from: "a1b2c3d4" }) → { file, from, to, additions, deletions, unified }
mind_snapshot
Creates a named checkpoint of the current state of all tracked files. Use before risky changes.
: short identifier, e.g.name
or"stable-v2""before-experiment"
(optional): longer descriptionmessage
mind_snapshot({ name: "stable-v2", message: "Personality tuned, rules finalized" }) → { success, snapshot, commit: { oid, message } }
mind_rollback
Always use the two-step procedure. Never skip the preview.
Step 1 — Preview:
mind_rollback({ file: "SOUL.md", to: "a1b2c3d4", preview: true }) → { preview: true, diff: { unified, additions, deletions }, instruction }
Show the diff to the user and ask for confirmation.
Step 2 — Execute (only after user confirms):
mind_rollback({ file: "SOUL.md", to: "a1b2c3d4", preview: false }) → { preview: false, success: true, commit: { oid, message } }
After success, tell the user: "Run
to apply the changes to your current session."/new
Important Notes
- This skill is the guide, the plugin is the engine — the
plugin provides the actualmindkeeper-openclaw
tools and watcher; this skill teaches the AI how to bootstrap and use them safelymind_* - Use plugin tools first — in OpenClaw Plugin mode, prefer
tools over CLI commands for normal operationsmind_* - Rollback is per-file — it only restores the specified file, not all files at once
- Rollbacks are non-destructive — every rollback creates a new commit, so it can itself be undone
- Auto-snapshots run in the background — the user doesn't need to manually save; mindkeeper captures every change automatically
- LLM commit messages are plugin-only for now — currently supported only through the OpenClaw plugin; standalone CLI mode falls back to template messages
- Named snapshots are the safety net — encourage users to snapshot before major personality or rule changes
- If history is empty — mindkeeper may not have initialized yet, or no changes have been made since install. Call
to check.mind_status - Commit hashes — always use the
field fromoid
results. Short 8-character hashes are fine.mind_history - Keep user-facing messages focused — if a task can be completed with file edits or
tools, do not distract the user with unavailable CLI detailsmind_*