Set up and verify a first memtomem memory source, or initialize this repository's project memory tier. Use for onboarding, choosing an index path, confirming that search works, or making project memory ready with `project`.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Setup?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/memtomem-setup)
---
name: setup
description: Set up and verify a first memtomem memory source, or initialize this repository's project memory tier. Use for onboarding, choosing an index path, confirming that search works, or making project memory ready with `project`.
argument-hint: "[path|project]"
allowed-tools: mcp__plugin_memtomem_memtomem__mem_status, mcp__memtomem__mem_status, mcp__plugin_memtomem_memtomem__mem_index, mcp__memtomem__mem_index, mcp__plugin_memtomem_memtomem__mem_search, mcp__memtomem__mem_search
disable-model-invocation: true
---
# Set up memtomem
Use `$ARGUMENTS` as the memory source path, or `project` for this repository's project memory tier.
If the request does not clearly specify the memory source path, or `project` for this repository's project memory tier, ask before calling a tool — and
in a non-interactive context (a subagent or scripted run with nobody to ask), do not
stall and do not guess: stop and report `insufficient_input` naming the missing memory source path, or `project` for this repository's project memory tier.
A request that does specify the memory source path, or `project` for this repository's project memory tier proceeds normally in either context.
If the request is `project` — make this repository's project memory tier ready, the
`project_local` tier that `handoff` and `harvest` write to — follow "Project memory tier"
below instead of steps 1–6. To index a directory that is itself named `project`, give it as
`./project` or as an absolute path.
1. Call `mem_status` and treat the default `provider=none` BM25-only configuration as healthy.
2. If status says memtomem is not configured, stop before indexing and give the exact terminal bootstrap command from the plugin README. Preserve project context by prefixing it with `cd <project-root> &&` when the setup is project-specific. Retry only after the user completes that explicit trust step.
3. Obtain an explicit notes or memory directory from the request; ask for one when absent.
4. Call `mem_index` on that path with `force=false` and `auto_tag=false`. This is a one-shot index and must not silently register a watcher root.
5. Choose a representative phrase from the indexed material and call `mem_search` to verify retrieval.
6. Report the effective DB path, indexed path, and first-success result. Mention embeddings only as an optional relevance enhancement.
Do not install Ollama, enable automation hooks, or edit host instruction files unless the user separately requests those actions.
## Project memory tier
Only `mm mem init` creates and registers this tier. Never create `.memtomem/` or anything in
it, never edit `.gitignore` or `~/.memtomem/config.json`, and never register the tier
through an MCP tool call — not when a step below fails, is refused, or goes unanswered. When
the command cannot run, the user runs it.
1. Ask the CLI for the project root and tier it resolves. `mm mem init --dry-run` changes
nothing in the project or in memtomem's configuration (`uvx` may first install packages
into its own cache):
```bash
uvx --python 3.12 --from 'memtomem[onnx]==0.7.16' mm mem init --dry-run --json --scope project_local
```
Count the output lines that parse as a JSON object; other lines, such as `uvx` install
progress, are not the report. Stop if the command exits non-zero or that count is not
exactly one. When the report's `refusal` is not `null`, stop and report the refusal's
`reason` and `message` as printed; otherwise stop if `project_root` or `tier_dir` is
missing. When you stop, give the user the command in step 4 and the directory the dry run
ran in; a run from another directory acts on that directory's project, so it starts again
with a dry run there.
`<root>` is the report's `project_root` and `<tier>` its `tier_dir`.
2. Tell the user what the command may change, whatever the report says: it creates `<tier>`,
appends memtomem's block to `<root>/.gitignore` when the block is missing, adds `<tier>` to
`indexing.project_memory_dirs` in `~/.memtomem/config.json`, which every project on this
machine shares, and creates `~/.memtomem/` and its lock file when absent. Show `<root>`,
`<tier>` and the report's `config_path`, `registered`, `gitignore` and `ready` as the
current state. Then ask whether to run it, and wait for the reply. Run it only on a yes to
that question; the request that started this workflow is not that answer. In a
non-interactive context (a subagent or scripted run with nobody to ask), or when the user
declines or does not answer, do not run it: stop and give the command.
3. After the yes, run the same dry-run command again from the same working directory and
check its report as in step 1. If its `scope`, `project_root`, `tier_dir` or `config_dir_resolved` differs from
the first report, stop: give both values and the command.
4. Run the command from that same working directory, also when the report said `ready`:
```bash
uvx --python 3.12 --from 'memtomem[onnx]==0.7.16' mm mem init --scope project_local
```
A user who already has the CLI installed can run `mm mem init --scope project_local` from
that same working directory instead.
5. If `uvx` is not available, the call is refused, or the command exits non-zero, stop: give
the command for the user's terminal, and its output when it ran. Do not retry it and do
not work around it.
6. Report the command's output as printed: it registers the tier, says
`Already initialized: … Nothing to do.`, or says the directory was already registered and
has been recreated. Then call `mem_status`, the only memtomem call in this section, and
report the database path and `Project root:`. Look for a `Project sources` row that, with a
leading `~` expanded, is `<tier>`; the active project's rows are listed first. The tier is
ready for this session when that row is there and `Project root:`, with a leading `~`
expanded and without a trailing ` (bound)`, is `<root>`. Otherwise report the command's
result and the status result separately, say which check failed — the row is missing, the
list was cut short, or the row is there but `Project root:` names another directory (give
both paths) — and do not retry; restarting the MCP server is the user's decision.
`mem_status` cannot see duplicate MCP registrations: tell the user to check them in the
client's own MCP list, for example `/mcp` in Claude Code or `codex mcp list` in Codex CLI.
## Registration check (Claude Code)
Before reporting results, note which memtomem tool namespaces this session
exposes. If both `mcp__memtomem__mem_*` and `mcp__plugin_memtomem_memtomem__mem_*`
tools are available, warn about possible duplicate registrations. Other aliases
exposing the same memtomem tool family also warrant a registration check.
Tool visibility alone does not prove two live processes or a shared database.
Recommend `/mcp` first to determine registration names and scopes. A single
visible namespace does not prove that no other registration exists.
The `--claude-mcp` diagnostic ships in the released CLI, but installing the
plugin does not put `mm` on the user's PATH — it registers an MCP server, not
the CLI. So offer the pinned form, which works either way:
```bash
uvx --python 3.12 --from "memtomem[all]==0.7.16" mm doctor --claude-mcp
```
This diagnostic runs in its own environment. It does not install dependencies
into, or repair, the plugin server environment.
Before installation, doctor compares manual registrations with the launch this
release's plugin bundles (`memtomem[onnx]==0.7.16`). After installation, it reads
the actual plugin manifest. Use `/mcp` to verify the session, and repeat the
diagnostic after installation.
If the user says they already have the CLI installed, `mm doctor --claude-mcp`
is the same check. Run it from the project being inspected. Neither is required
— `/mcp` and the scope-specific guidance below cover the same ground.
Name both remediations: keep the plugin by removing the confirmed manual entry
(`claude mcp remove memtomem -s user` for user scope; use `-s local` or
`-s project` for those scopes and replace the name for an alias), or keep the
manual entry by running `/plugin uninstall memtomem@memtomem`. Never remove
either registration yourself. Do not claim to have run the diagnostic unless
it was actually executed. If no duplication is visible, skip the warning silently.