Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
mem0ai avatar

Switch Project

  • 66 installs
  • 62.5k repo stars
  • Updated August 5, 2026
  • mem0ai/mem0

Helps with ai & agent building tasks during AI-assisted development.

About

switch-project is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • switch-project
  • AI & Agent Building
  • AI-coding skill

Switch Project by the numbers

  • 66 all-time installs (skills.sh)
  • +13 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #6,006 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/mem0ai/mem0 --skill switch-project

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs66
repo stars62.5k
Last updatedAugust 5, 2026
Repositorymem0ai/mem0

What it does

Helps with ai & agent building tasks during AI-assisted development.

Files

SKILL.mdMarkdownGitHub ↗

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:

1. Set global_search: true in ~/.mem0/settings.json using 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')
   "

2. 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:

1. Set global_search: false in ~/.mem0/settings.json using 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')
   "

2. 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):

1. If no project name was given, ask: "What project_id should this directory use?"

2. Write the mapping to ~/.mem0/project_map.json using 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.)

3. Verify by searching for existing memories:

  • Call search_memories with query="project", filters={"AND": [{"user_id": "<active_user_id>"}, {"app_id": "<PROJECT_NAME>"}]}, top_k=1

4. Print:

   Switched to project <PROJECT_NAME>.
   <N> memories found for this project.
   Note: This override persists across sessions for this directory.

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.