switch-project

Overrides auto-detected project scope for Mem0 memory reads and writes.

1|Updated Jan 13, 2022
One-click install
npx skills add https://github.com/jayho-k/TIL --skill switch-project-jayho-k
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: switch-project
Source: https://github.com/jayho-k/TIL/tree/main/AI/mem0/code/mem0_code_analize/mem0/integrations/mem0-plugin/skills/switch-project
Command: npx skills add https://github.com/jayho-k/TIL --skill switch-project-jayho-k

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When working across multiple repositories or teams, Mem0's automatic project detection can scope memories to the wrong project ID, making it impossible to read or write memories under the correct context. This Skill lets you manually override the project scope or enable global search across all memories. ## Core Features & Use Cases - Project Scope Override: Map the current directory to a specific project_id by writing to ~/.mem0/project_map.json, persisting across sessions. - Global Search Mode: Toggle global_search in ~/.mem0/settings.json to search memories across all users and projects, or return to per-project scoping. - Verification: After switching, it searches existing memories to confirm how many entries exist under the new project. - Use Case: You are working in a monorepo but need to access memories stored under a different team's project. Run the switch-project command with that project name to read and write memories in the correct scope. ## Quick Start Ask the assistant to switch the Mem0 project scope for this directory to a specific project name, or to enable global memory search across all projects.

Frequently Asked Questions about switch-project

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I switch the Mem0 project scope for a directory?

Run the switch-project command with a project name. It writes a mapping from the current working directory to that project_id in ~/.mem0/project_map.json, and the override persists across sessions for that directory.

How to search Mem0 memories across all projects and users?

Use the --global flag to set global_search to true in ~/.mem0/settings.json. Searches then return memories across all users and projects, while writes still use the current user_id and app_id.

Does the Mem0 project override persist between sessions?

Yes, the directory-to-project mapping is stored in ~/.mem0/project_map.json and persists across sessions. However, changes to global search settings require a session restart to take effect.

Why is Mem0 auto-detection resolving to the wrong project?

Auto-detection derives the project_id from the current directory context, which can be wrong in monorepos or shared codebases. The switch-project skill overrides this by explicitly mapping the directory to your chosen project_id.

How do I disable global search in Mem0?

Run switch-project with the --no-global flag. It sets global_search to false in ~/.mem0/settings.json, returning searches to only memories scoped to the current project after a session restart.