agentleFS
satishbabariyasatishbabariya/claude-mem-go/skills/mem-export/SKILL.md

mem-export

Skill1 starsChanged 45 days agoMITView on GitHub

Back up claude-mem-go's memory database to a file, or restore/migrate one from a file. Use when the user asks to "back up my memories", "export the memory database", "move my memories to Postgres", or "restore from a backup".

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Add -db <postgres DSN> to export from the Postgres backend instead of the default SQLite file.

    line 28
  2. Very specific:

    Add -db <postgres DSN> to import into the Postgres backend (the migration path).

    line 41

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Memory Backup & Migration (export / import)

claude-mem-go's export/import subcommands are its only backup and cross-backend migration story — there's no other way to get data out of the store, or move it between the SQLite and Postgres backends.

When to use

  • "Back up my memories" / "export the database" → export
  • "Restore from a backup" / "import that file" → import
  • "Move my memories to Postgres" (or from Postgres to SQLite) → export from the source backend, import into the destination — the same file works for both, since both backends implement the same interface.

export

Writes every observation as JSON Lines (one per line) to a file.

"$CLAUDE_PLUGIN_ROOT/claude-mem-go" export -out backup.jsonl

Add -db <postgres DSN> to export from the Postgres backend instead of the default SQLite file. No -project filter exists on export — it's always everything, since a partial backup is a worse default than a complete one.

import

Reads a file export wrote and re-inserts every row.

"$CLAUDE_PLUGIN_ROOT/claude-mem-go" import -in backup.jsonl

Add -db <postgres DSN> to import into the Postgres backend (the migration path). This is safe to run more than once, or against a database that already has some of the data: each row keeps its original content-hash, so an already-present row is skipped, not duplicated — tell the user this if they're worried about re-running it. Each row's embedding (if it had one) travels with it too, so a SQLite→Postgres migration doesn't leave semantic search with nothing to search — the user shouldn't need to re-embed anything just because they moved backends. If mem-doctor reports embedding_dims_consistent=false afterward (e.g. the source and destination were configured with different embedding models at some point), that's a mem-reembed job, not an export/import problem.

(Fall back to claude-mem-go export/import on PATH if $CLAUDE_PLUGIN_ROOT isn't set — see mem-doctor's skill for why.)

Not destructive, but be clear about direction

Neither command deletes anything from the source — export only reads, and import only adds. If the user's actual goal involves also deleting old data (freeing up space, not just backing it up), that's a separate, genuinely destructive step — see the mem-prune skill, and don't combine the two without the user explicitly asking for both.

Download now (ZIP)

Does 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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.