mem-setup

mem-setup is a skill for Claude Code from thedotmack/claude-mem. It costs 85 tokens per session (694 once invoked), scanned A, original, Apache-2.0.

A setup guide for connecting the claude-mem memory service to Cowork using credentials from cmem.ai. The credentials let the plugin capture and insert memory from earlier sessions.

In plain words
What is it for?
Use it to add or update the sync token, user ID, and SyncHub URL in the plugin configuration. It is also for checking the required connection details when setting up cloud memory sync.
Why use it?
It removes the manual configuration work needed to pair the plugin with your account. It also explains how to handle the sync token without exposing it in chat, commands, or logs.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: reads .claude/ paths.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the claude-mem-cowork plugin — 1 skill shipped together

Good fit Use it to add or update the sync token, user ID, and…

Compare 6 skills from other repositories ↓
About the project

Claude-Mem, now presented as Grok Mem, records an agent's work, compresses it with AI, and brings relevant notes into later sessions so the agent can remember decisions and next steps. It is intended for persistent context across agent conversations and supports multiple coding-agent environments. The catalogue add-ons provide the workflows and integrations used to operate this memory system.

thedotmack/claude-mem · 93,305 stars · on GitHub · claude-mem.ai

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add thedotmack/claude-mem
Claude Code
/plugin install claude-mem-cowork

Made for: Claude Code.

Or install claude-mem-cowork, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mem-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/thedotmack/claude-mem/mem-setup.svg)](https://agentmods.dev/skills/thedotmack/claude-mem/mem-setup)
Your own site
<a href="https://agentmods.dev/skills/thedotmack/claude-mem/mem-setup"><img src="https://agentmods.dev/badge/skills/thedotmack/claude-mem/mem-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 694 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00085 $0.00694
Opus 5 $0.00043 $0.00347
Sonnet 5 $0.00017 $0.00139
Haiku 4.5 $0.00009 $0.00069

Measured 7d ago against content hash 48fcdb2dd3f3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

mem-setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

cowork/skills/mem-setup/SKILL.md · 65 lines

How it starts

The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Claude-Mem Setup (Cowork pairing)

Configure this plugin with the user's own cmem.ai credentials so hooks can capture and inject memory. Anyone can pair — credentials are per-user configuration, never hardcoded in plugin logic.

What to collect

From cmem.ai → Connect, the user has three values:

  1. sync token (starts with cm_) — used as the bearer API key
  2. user id (UUID)
  3. SyncHub URL (a workers.dev or cmem.ai URL)

If the user pastes the whole Connect blurb, extract the three values from it. If any are missing, ask for the sync token at minimum — the other two are optional.

Secret handling — non-negotiable

  • Never echo the token back in conversation, put it in a shell argv, or log it.
  • Move it only via file writes (Write/Edit tool) and file reads.

Steps

  1. Locate the installed plugin root (this skill's own plugin). Update its config.json: set apiKey to the sync token, userId, and syncHubUrl. Leave other settings unless the user asks (inject toggles). Project naming is automatic (cmem_work_*) and is not configurable.

  2. Cowork containers are ephemeral: edits to the installed copy last only for this session. To make pairing permanent, repackage — zip the plugin directory as <plugin-name>.plugin and send it to the user to re-install (the cowork-plugin skill's packaging flow). Tell the user this is why.

  3. If this machine also has a local claude-mem install (a ~/.claude-mem/ directory exists), optionally write the same values to ~/.claude-mem/settings.json with mode 0600 (CLAUDE_MEM_CLOUD_SYNC_TOKEN, CLAUDE_MEM_CLOUD_SYNC_USER_ID, CLAUDE_MEM_CLOUD_SYNC_HUB_URL keys — the same keys the local claude-mem cloud-sync pairing writes) — the hook script and the local worker both read it.

  4. Verify without exposing the secret:

    node "${CLAUDE_PLUGIN_ROOT}/scripts/cmem-hook.mjs" status
    

    Report the masked output. A MISSING key means the write didn't land; a 404 on /api/hooks/context is expected until the Pro endpoints deploy (search/injection still work via /api/mcp).

Read the full file on GitHub · 65 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 65 lines · 85 tokens per session scan A 48fcdb2dd3f3

Subscribe to this mod's changes

mem-setup is a skill published in the GitHub repository thedotmack/claude-mem (93,305 stars, last pushed today), licensed Apache-2.0. It adds 85 tokens to every session and 694 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.