
switch-project
Overrides the auto-detected project scope to read and write memories under a different project ID, or enables global search to access all memories across all users and projects. Use when working across multiple projects, accessing memories from another repo, enabling team-wide memory access, or when auto-detection resolves to the wrong project.
- Installs
- 94
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/mem0ai/mem0 --skill switch-project- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads switch-project automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Mem0 Switch Project
Override the automatic project_id detection for the current directory, or enable global search mode.
Usage
/mem0:switch-project <project-name>— switch to a specific project scope/mem0:switch-project --global— enable global search (all memories, all users, all projects)/mem0:switch-project --no-global— disable global search and return to per-project scoping
Execution
If --global flag is provided:
-
Set
global_search: truein~/.mem0/settings.jsonusing the Bash tool:python3 -c " import json, os settings_file = os.path.expanduser('~/.mem0/settings.json') settings = {} if os.path.isfile(settings_file): with open(settings_file) as f: settings = json.load(f) settings['global_search'] = True with open(settings_file, 'w') as f: json.dump(settings, f, indent=2) print('Global search enabled') " -
Print:
Global search enabled. Searches now return all memories across all users and projects. Writes still use the current user_id and app_id. Restart the session for the change to take effect.
If --no-global flag is provided:
-
Set
global_search: falsein~/.mem0/settings.jsonusing the Bash tool:python3 -c " import json, os settings_file = os.path.expanduser('~/.mem0/settings.json') settings = {} if os.path.isfile(settings_file): with open(settings_file) as f: settings = json.load(f) settings['global_search'] = False with open(settings_file, 'w') as f: json.dump(settings, f, indent=2) print('Global search disabled') " -
Print:
Global search disabled. Searches now return only memories scoped to the current project. Restart the session for the change to take effect.
If a project name is provided (no flags):
-
If no project name was given, ask: "What project_id should this directory use?"
-
Write the mapping to
~/.mem0/project_map.jsonusing the Bash tool:python3 -c " import json, os map_file = os.path.expanduser('~/.mem0/project_map.json') mapping = {} if os.path.isfile(map_file): with open(map_file) as f: mapping = json.load(f) mapping[os.getcwd()] = '<PROJECT_NAME>' os.makedirs(os.path.dirname(map_file), exist_ok=True) with open(map_file, 'w') as f: json.dump(mapping, f, indent=2) print(f'Mapped {os.getcwd()} -> <PROJECT_NAME>') "(Replace
<PROJECT_NAME>with the user's chosen project name.) -
Verify by searching for existing memories:
- Call
search_memorieswithquery="project",filters={"AND": [{"user_id": "<active_user_id>"}, {"app_id": "<PROJECT_NAME>"}]},top_k=1
- Call
-
Print:
Switched to project <PROJECT_NAME>. <N> memories found for this project. Note: This override persists across sessions for this directory.
FAQ
What does the switch-project skill do?
Overrides the auto-detected project scope to read and write memories under a different project ID, or enables global search to access all memories across all users and projects. Use when working across multiple projects, accessing memories from another repo, enabling team-wide memory access, or when auto-detection resolves to the wrong project.
How do I install switch-project?
Run npx skills add https://github.com/mem0ai/mem0 --skill switch-project in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/switch-project/ (personal) or .claude/skills/switch-project/ (project).
Which AI agents can use switch-project?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is switch-project safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains switch-project?
It is published by mem0ai in mem0ai/mem0. It has 94 recorded installs.
More from mem0ai/mem0
mem0
mem0ai/mem0
Mem0 Platform SDK for adding persistent memory to AI applications. TRIGGER when: user mentions "mem0", "MemoryClient", "memory layer", "remember user preferences", "persistent context", "personalization", or needs to add long-term memory to chatbots, agents, or AI apps. Covers Python SDK (mem0ai), TypeScript SDK (mem0ai), and framework integrations (LangChain, CrewAI, OpenAI Agents SDK, Pipecat, LlamaIndex, AutoGen, LangGraph). Also covers the open-source self-hosted Memory class. This is the DEFAULT mem0 skill for ambiguous queries. DO NOT TRIGGER when: user asks about CLI commands, terminal usage, or shell scripts (use mem0-cli), or Vercel AI SDK / @mem0/vercel-ai-provider / createMem0 (use mem0-vercel-ai-sdk).
mem0-cli
mem0ai/mem0
Mem0 CLI -- the command-line interface for mem0 memory operations. TRIGGER when: user mentions "mem0 cli", "mem0 command line", "@mem0/cli", "mem0-cli", "pip install mem0-cli", "npm install -g @mem0/cli", or is running mem0 commands in a terminal/shell (mem0 add, mem0 search, mem0 list, mem0 get, mem0 init, mem0 config, mem0 import). Also triggers when query includes CLI flags like --user-id, --output, --json, --agent, or describes bash/zsh/terminal/shell usage. DO NOT TRIGGER when: user asks about programmatic SDK integration in Python/TS code (use mem0 skill), or Vercel AI SDK provider (use mem0-vercel-ai-sdk skill).
mem0-vercel-ai-sdk
mem0ai/mem0
Mem0 provider for Vercel AI SDK (@mem0/vercel-ai-provider). TRIGGER when: user mentions "vercel ai sdk", "@mem0/vercel-ai-provider", "createMem0", "retrieveMemories", "addMemories", "getMemories", "searchMemories", "mem0 vercel", "AI SDK provider", "AI SDK memory", or is using generateText/streamText with mem0. Also triggers for Next.js apps needing memory-augmented AI. DO NOT TRIGGER when: user asks about direct Python/TS SDK calls without Vercel (use mem0 skill), or CLI terminal commands (use mem0-cli skill).
mem0-integrate
mem0ai/mem0
Integrate Mem0 into an existing repository using a goal-driven, TDD pipeline. Detects the repo's language automatically and asks the user to pick between Mem0 Platform (managed) and Mem0 Open Source (self-hosted). Writes failing tests before any implementation. Produces a local feature branch plus .mem0-integration/ artifacts consumed by the paired verification skill. TRIGGER when: user says "integrate mem0", "add mem0 to this repo", "wire mem0 into ", or asks how to add memory to an existing project. DO NOT TRIGGER when: the user wants general SDK usage (use skill:mem0), CLI usage (use skill:mem0-cli), or Vercel AI SDK (use skill:mem0-vercel-ai-sdk). After success, invoke skill:mem0-test-integration to verify in the same workspace (loose coupling).
mem0-test-integration
mem0ai/mem0
Open the skill to read its SKILL.md instructions.
mem0-oss-to-platform
mem0ai/mem0
Plan, then execute, a migration of a project from the mem0 open-source / self-hosted SDK (local Memory class) to the mem0 Platform / hosted SDK (MemoryClient). TRIGGER when: the developer wants to move, switch, or migrate mem0 off OSS/self-hosted to the hosted API, e.g. "migrate my mem0 setup to the platform", "switch from self-hosted mem0 to MemoryClient", "use my mem0 API key instead of a local Qdrant", "replace my local vector store + embedder config with the platform", even without the word "migrate". Covers Python (Memory to MemoryClient) and TypeScript (mem0ai/oss to mem0ai). Produces a reviewable plan, then executes it after approval. Touches only the mem0 integration. DO NOT TRIGGER when: adding mem0 to a project that has none (use mem0-integrate) or answering SDK usage questions (use mem0).
Popular other skills
hyperframes-cli
heygen-com/hyperframes
The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.
triage
mattpocock/skills
Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
ask-matt
mattpocock/skills
Ask which skill or flow fits your situation. A router over the skills in this repo.
to-questionnaire
mattpocock/skills
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
loop-me
mattpocock/skills
Grill me about specs for the workflows I want to build, within this workspace.