/mm-add

The /mm-add skill installs a MemoryMarket pack into your workspace, driven by your AI agent. You only confirm decisions — the agent runs every CLI command. It wraps mm install and an optional inline wiki-integration step (Phase 4) into one conversational flow.

This page mirrors the canonical packages/cli/skills/mm-add/SKILL.md file shipped in the memorymarket npm package. The SKILL.md is what your agent actually reads at invocation time — if this page drifts from it, the SKILL.md wins.

Usage

$ /mm-add [pack-ref] [--scope project|user] [--agent <name>] [--no-wiki]

Examples

$ /mm-add @ari/10k-mrr-in-24h # install from registry, project scope
$ /mm-add @ari/10k-mrr-in-24h --scope user # install globally
$ /mm-add ./my-local-pack # install from a local directory

Arguments

FlagRequiredPurpose
pack-refnoPack reference (e.g. @user/slug) or local path to a pack directory. If omitted, the skill asks you.
--scopenoproject (default — ./.memorymarket/<slug>/) or user (~/.memorymarket/<slug>/).
--agentnoForce-target a specific agent (claude-code, codex, cursor, windsurf, openclaw). If omitted, mm install auto-detects.
--no-wikinoSkip the optional wiki-integration phase even if a Karpathy-style wiki is detected.

Phase 1 — CLI presence check

The agent confirms the mm CLI is on your PATH before doing anything else.

  1. Run mm --help. The skill does NOT use mm whoami here — whoami requires auth credentials and exits non-zero on a fresh install even when mm is on PATH.
  2. If the command is not found, install the CLI:
$ npm install -g memorymarket
$ mm --help # confirm install

If you are installing from the registry (@user/slug), mm install requires auth. The skill runs mm whoami and, if not authenticated, runs mm login. Local-path installs (--from-path) do not need auth.

Phase 2 — Pack identification

  1. If you did not pass a pack-ref, the skill asks: “Which pack do you want to install? Paste the registry handle (e.g. @ari/10k-mrr-in-24h) or a local directory path.”
  2. Validates the input shape. Registry handle: starts with @, matches @<user>/<slug> (lowercase a-z/0-9/dash). Local path: must be an existing directory containing manifest.json.
  3. Asks for the install scope unless --scope was passed: “Project scope (./.memorymarket/<slug>/, applies to this directory only) or user scope (~/.memorymarket/<slug>/, applies to every project)?” Default: project.
  4. If --agent was not passed, the skill lets mm install auto-detect.

Phase 3 — Install

  1. The agent builds the command. Registry: mm install <pack-ref> --scope <scope>. Local path: mm install --from-path <path> --scope <scope>. Adds --agent <name> if provided.
  2. If using --from-path, the skill surfaces the CLI's signature-skip warning. Local-path installs bypass Ed25519 signature verification — registry installs are the safer default.
  3. Runs the install. Surfaces the CLI output to you.
  4. On success, the CLI has written the pack to ./.memorymarket/<slug>/ (or ~/.memorymarket/<slug>/) and patched the host agent's rules file (managed block in CLAUDE.md, AGENTS.md, .cursor/rules/<slug>.md, etc.) so the pack is active immediately. A sidecar metadata file is written to .memorymarket/.meta/<slug>.json — it tracks the installed agent + source so mm update and mm uninstall know what to touch. Do not delete it.
  5. Confirms to you: “Installed <slug> to <path>. The pack is active in your agent — try a relevant prompt.”

Error handling

  • NO_ENTITLEMENT — you have not purchased a paid pack. The skill prints the pack URL https://memorymarket.co/pack/<slug> and stops.
  • SIGNATURE_INVALID — the pack failed signature verification. The skill stops and never retries blindly.
  • Other errors are surfaced verbatim; the skill asks you how to proceed.

Phase 4 — Optional wiki integration

This phase runs only if a Karpathy-style wiki is detected and --no-wiki was not passed.

  1. Probes for ./knowledge-base/wiki/index.md. If absent, skips Phase 4 silently.
  2. If present, asks: “I see you have a knowledge-base/wiki — want me to weave the pack's memory into your wiki pages with wikilinks? (yes/no)”
  3. If yes: runs the wiki-integration pipeline inline (Phase 4 sub-phases 4a–4d). Detects wiki state, plans the merge, asks the user to confirm, then merges the pack's memory/*.md into matching wiki pages, appending a “From <slug>pack” section with new content and source attribution. Wikilinks are added conservatively. There is no separate skill for this step.
  4. If no: prints “Skipping wiki integration. The pack is still active via the agent's managed rules block.” and stops.

Banned behaviors

  • Never invent install paths. The skill always uses what mm install actually wrote — read from the CLI output.
  • Never re-run mm install with different flags after a NO_ENTITLEMENT or SIGNATURE_INVALID error. Those are terminal.
  • Never modify the host agent's rules file by hand. mm install already manages a clearly-marked block.
  • Never skip the --scope decision. Project vs user scope changes where the pack lands and which projects it affects.

Out of scope

  • Purchasing paid packs. The skill directs you to the web UI for checkout.
  • Generating a memory pack from scratch. That is /mm-publish.
  • Modifying the pack's content after install. Treat the installed pack as read-only.

Related