/cowork-mem:cowork-memfrom Cowork Memory
Provides persistent memory across Cowork sessions using a SQLite database with full-text and TF-IDF search. Automatically recalls past context at session start and captures decisions, file changes, and insights during work.
Ships in Cowork Memory. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
You have access to a persistent memory system that survives across Cowork sessions. It stores observations (decisions, file edits, insights, errors, notes) in a SQLite database with full-text search and semantic (TF-IDF) search, organized into sessions.
Memory is automatic — you don't need to manually trigger it every session. Three session hooks run in the background:
This means the memory fills itself. Your job is to add the why — decisions, insights, errors — that the hook can't infer automatically.
All memory operations go through a single script:
python3 {SKILL_DIR}/scripts/memory_store.py <command> [args]
The database lives at ~/.claude/.cowork-mem/memory.db and persists on the
user's machine across sessions. The COWORK_MEM_DB environment variable
overrides the default path if set.
In addition to keyword search, you have vector search using TF-IDF similarity:
COWORK_MEM_DB=~/.claude/.cowork-mem/memory.db \
python3 {SKILL_DIR}/scripts/vector_search.py "authentication middleware pattern" --limit 8
Use semantic search when:
The SessionStart hook auto-runs session-start before you begin. If memory
was loaded, you'll already have context. If working manually:
python3 {SKILL_DIR}/scripts/memory_store.py session-start --project "project-name"
Briefly tell the user what you remember: "Last time we worked on X, we decided Y and were in the middle of Z." Keep it to 1-2 sentences — don't dump everything.
The PostToolUse hook auto-captures file edits, bash commands, and tasks. Focus your manual saves on the why — things the hook can't infer:
Decisions — when the user makes a choice or you agree on an approach:
python3 {SKILL_DIR}/scripts/memory_store.py add decision \
"Chose PostgreSQL over MongoDB for the user database because we need ACID transactions" \
--tags "architecture,database"
Insights — things learned that affect future work:
python3 {SKILL_DIR}/scripts/memory_store.py add insight \
"The production API has a 100 req/min rate limit per API key, not per user" \
--tags "api,production"
Errors — problems encountered and their solutions:
python3 {SKILL_DIR}/scripts/memory_store.py add error \
"Build fails if Node version < 18 because of native fetch usage. Fix: add engines field to package.json" \
--tags "build,node"
Notes — anything else worth remembering:
python3 {SKILL_DIR}/scripts/memory_store.py add note \
"User prefers tabs over spaces, 80 char line width, and dislikes ternary operators" \
--tags "preferences,style"
The hook handles what happened. You handle why it matters.
Save: architectural decisions, non-obvious constraints, user preferences, hard-won debugging insights, things that took multiple attempts.
Skip: routine operations already captured by the hook (file reads, directory listings, standard installs).
If the user wraps something in <private> tags, the content is stored but
excluded from search results. Useful for sensitive data that provides context
but shouldn't surface casually.
Keyword search:
python3 {SKILL_DIR}/scripts/memory_store.py search "authentication middleware" --limit 10
Semantic search (finds conceptually related observations):
COWORK_MEM_DB=~/.claude/.cowork-mem/memory.db \
python3 {SKILL_DIR}/scripts/vector_search.py "how does auth work" --limit 8
Search returns compact results (truncated to 300 chars). Fetch full detail:
python3 {SKILL_DIR}/scripts/memory_store.py get obs_abc123 obs_def456
Chronological view:
python3 {SKILL_DIR}/scripts/memory_store.py timeline --hours 48
When the user is wrapping up:
python3 {SKILL_DIR}/scripts/memory_store.py session-end \
--summary "Implemented JWT auth middleware, set up PostgreSQL connection pool. Next: add rate limiting and write tests for auth endpoints."
Write the summary as a note to yourself tomorrow: what was accomplished, what's in progress, what's next.
This plugin includes specialized skills for memory-aware workflows:
| Skill | Use when... |
|---|---|
mem-search | Searching memory for specific topics |
knowledge-agent | Answering "why did we do X?" or "what's our approach to Y?" |
smart-explore | Orienting to a project at session start |
make-plan | Planning next steps grounded in past work |
timeline-report | Getting a summary of what happened this week |
do | Running any task with memory context loaded automatically |
Stats — see how much memory is stored:
python3 {SKILL_DIR}/scripts/memory_store.py stats
Compact — compress old observations into daily summaries:
python3 {SKILL_DIR}/scripts/memory_store.py compact --before-days 30
Export — dump everything as JSON or Markdown:
python3 {SKILL_DIR}/scripts/memory_store.py export --format md
Delete — remove specific observations:
python3 {SKILL_DIR}/scripts/memory_store.py delete obs_abc123
Be proactive, not noisy. The hooks already do the work. Don't announce every save — just do it. Only surface recalled context when it changes your approach.
Summarize, don't regurgitate. Synthesize retrieved context into what's relevant right now. "Last session we set up auth with JWT and decided on PostgreSQL" — not a bullet list of every observation.
Quality over quantity. 5 well-written observations per session beats 50 low-signal ones. Each observation should be independently useful to someone reading it without other context.
Use tags consistently. Lowercase, descriptive: architecture, bugfix,
user-preference, api, deployment, etc.
Search before deciding. When making architectural decisions or the user asks "didn't we already...", search memory first.
See references/REFERENCE.md for the complete command reference.
references/REFERENCE.md (opens in a new tab)scripts/memory_store.py (opens in a new tab)scripts/post_tool_capture.py (opens in a new tab)scripts/vector_search.py (opens in a new tab)tests/test_hook_plugin_root.py (opens in a new tab)tests/test_memory_store_repair.py (opens in a new tab)tests/test_redaction_and_modes.py (opens in a new tab)tests/test_utc_now.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
session-memory, context-persistence, project-history, cowork
npx claudepluginhub msapps-mobile/claude-plugins --plugin cowork-mem7 skills in this plugin
/doExecute a task using memory for context — the memory-aware task runner. Use when the user says "do X", "implement Y", "fix Z", "build this", "continue working on", "pick up where we left off", "keep going", or any task that benefits from knowing what was already done. This skill wraps task execution with memory recall at the start and observation capture at the end — making every task build on prior work.
/knowledge-agentAnswer questions using accumulated project memory as a knowledge base. Use when the user asks "why did we choose X", "what's our approach to Y", "what do we know about Z", "explain how our auth works", "what's the deployment process", "what libraries are we using", "remind me why we did X this way", or any question that has likely been answered or decided in a previous session. Also trigger when making architectural decisions to check if a similar decision was already made.
/make-planCreate a work plan using memory context from past sessions. Use when the user says "make a plan", "what should we do next", "plan this out", "give me a roadmap", "help me prioritize", "what's the next step", "plan the sprint", or any request to organize upcoming work. Memory ensures the plan is grounded in what's already done, decided, and known to be broken.
/mem-searchSearch persistent memory using keyword or semantic (TF-IDF) search. Use when the user asks "do we have any notes on X", "what do we know about Y", "did we decide anything about Z", "search memory for", "recall anything about", "look up in memory", or any question about past decisions, errors, or context. Also trigger proactively when answering questions where past context would help.
/smart-exploreExplore a project or codebase using memory as a guide. Use when the user says "explore this project", "understand the codebase", "give me an overview", "catch me up on this project", "what's the state of X", "orient me", or starts working on a project that likely has prior sessions. Also trigger at the start of any new session on an ongoing project to build context before diving in.
/timeline-reportGenerate a chronological report of what happened across sessions. Use when the user asks "what have we done this week", "give me a history", "summarize what happened", "what changed recently", "show me the timeline", "weekly recap", "what did we accomplish", "show session history", or any request for a narrative summary of past work over a time period.
Other plugins' skills for the same job