The /mm-publish skill drives the full creator publish flow inside your AI agent. You only confirm decisions — the agent runs every CLI command. The user creates the draft on the web first; the skill resumes from a pack-id and handles auth, signing, source discovery, pack assembly, and publish.
This page mirrors the canonical packages/cli/skills/mm-publish/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.
| Flag | Required | Purpose |
|---|---|---|
--pack-id | yes | Existing draft pack-id (UUID) from https://memorymarket.co/sell/<id>. If absent, the skill stops and asks you to create the draft on the web first. |
--sources | no | Comma-separated source paths to package. If omitted, the skill auto-scans common memory locations and asks you to confirm. |
--out | no | Output directory for the assembled pack. Defaults to ./.memorymarket-drafts/<slug>/; the skill confirms before writing. |
Before doing anything else, the agent confirms you are signed in and have a registered signing key.
mm whoami. If output is “Not authenticated” or the command exits non-zero, the agent runs mm login, which opens a browser window for OAuth. Wait for the CLI to print “Logged in as @<username>”.~/.memorymarket/keys/signing.pub. If absent, run mm keygen (writes a fresh Ed25519 keypair to ~/.memorymarket/keys/).mm register-key to upload the public key to the server. Key already registered is fine — proceed.If any of these steps error (network, rate-limit, refused), the skill stops and surfaces the error to you. It does not proceed to Phase 2.
Your memory layout is unknown. The agent scans, proposes a list, and asks for confirmation.
Auto-scan locations from CWD and home, in order:
| Source | Reason |
|---|---|
./CLAUDE.md, ./AGENTS.md, ./.cursorrules, ./.windsurfrules | Project-scope agent rules |
./.claude/**/*.md | Project-scope Claude Code memory |
./.cursor/rules/*.md, ./.cursor/rules/*.mdc | Project-scope Cursor rules |
~/.claude/CLAUDE.md, ~/.claude/skills/**/SKILL.md | User-scope Claude memory + skills |
~/.codex/AGENTS.md | Codex memory |
./knowledge-base/**/*.md | Karpathy-style wiki, if present |
./*.md (root only) | Any project-root markdown that smells like memory: philosophy.md, principles.md, voice.md, playbook.md, runbook.md, style-guide.md, system-prompt.md |
The agent prints a numbered table (index, path, line count, one-line shape guess), then asks: “Which of these should I include? Reply with numbers (e.g. 1,3,5-8), all, or paste your own paths.”
Banned: the skill never invents memory content. Every line in the resulting pack traces back to a file you confirmed.
The agent does the extraction in-context — there is no mm pack or amp packCLI. The full AMP extraction pipeline runs inline as Phase 3 sub-phases (3a shape detection → 3b unit extraction → 3c primitive classification + capability routing → 3d draft pack assembly → 3e validation → 3f confirm + sign). Output: a directory containing manifest.json, agents.md, and memory/<capability>.md files. There is no separate skill for the extraction step.
./.memorymarket-drafts/<slug>/. Confirms the directory does not already contain a manifest.json (asks before overwriting).manifest.json on the AMP v0.4 schema (primitive_format: "inline-tag-v0.4"), agents.md routing index, and one memory/<capability>.md per detected capability. The manifest the skill writes follows this exact shape — every field below is required by mm publish validation:signed and signature start empty; mm sign writes them in-place during Phase 3f.mm sign <pack-dir>. Then runs mm verify <pack-dir> to confirm the signature is valid. mm verify is a signature check (it expects a signed pack); pre-sign structural validation happens implicitly during assembly.Every published pack needs a server-side draft row, and the web is the only place that creates drafts. The skill never creates a draft.
--pack-id <uuid> was passed: validate it is a valid UUID (8-4-4-4-12 hex shape). On valid input, confirm to you — “Publishing into draft <uuid>.” — and proceed to Phase 5.--pack-id was NOT passed: stop and redirect. Print this exact message:Wait for you to paste a UUID. Validate the shape. On valid input, continue to Phase 5. On invalid input, ask again — never retry silently.
Never run mm create. Never call POST /api/packs/create. Drafts are created on the web only.
mm publish --pack-id <uuid>.published.https://memorymarket.co/pack/<slug> and the marketing reminder:MANIFEST_NOT_FOUND / FILE_NOT_FOUND — wrong directory; the skill asks you to cd into the assembled pack dir and retries.NO_SIGNING_KEY — re-runs Phase 1 step 2 (key registration). Never loops silently — it tells you what happened.INVALID_SIGNATURE / PACK_VALIDATION_FAILED— surfaces the API's error details verbatim and asks how to proceed.mm create. Drafts are created on the web only. If --pack-id is missing, redirect — never silently create a draft.mm publish before you have confirmed the assembled pack files in Phase 3.mm publish.https://memorymarket.co/sell/<uuid>(Marketing step). Price IS in scope here — it's set via --price when you run mm publish.