switch-project

switch-project is a command for Claude Code from YousefNabil-SOC/claude-apex. It costs 23 tokens per session (562 once invoked), scanned A, original, MIT.

A command for switching between configured projects while restoring each project's saved instructions and context.

In plain words
What is it for?
Use it to define projects and quickly open one by its short name, with its project files and active context loaded.
Why use it?
It avoids manually changing directories and reloading project notes when moving between codebases.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Good fit Use it to define projects and quickly open one by its short name, with its project files and active context loaded.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/yousefnabil-soc/claude-apex/switch-project
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/YousefNabil-SOC/claude-apex

Made for: Claude Code.

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 switch-project

README.md
[![agentmods](https://agentmods.dev/badge/commands/yousefnabil-soc/claude-apex/switch-project/github.svg)](https://agentmods.dev/commands/yousefnabil-soc/claude-apex/switch-project)
Your own site
<a href="https://agentmods.dev/commands/yousefnabil-soc/claude-apex/switch-project"><img src="https://agentmods.dev/badge/commands/yousefnabil-soc/claude-apex/switch-project/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for switch-project

Your own site · 80×15
<a href="https://agentmods.dev/commands/yousefnabil-soc/claude-apex/switch-project"><img src="https://agentmods.dev/badge/commands/yousefnabil-soc/claude-apex/switch-project.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 562 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.00023 $0.00562
Opus 5 $0.00012 $0.00281
Sonnet 5 $0.00005 $0.00112
Haiku 4.5 $0.00002 $0.00056

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

Security

Grade A, and why

switch-project 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.

commands/switch-project.md · 59 lines

How it starts

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

/switch-project

EDIT THIS FILE — replace the example projects below with your own projects. The list here is intentionally generic so everyone starts from a clean slate.

Purpose

Quick-switch between active projects with pre-loaded context. When you say /switch-project my-webapp, Claude reads the project's CLAUDE.md and MEMORY.md, changes to its directory, and restores active-project context.

Configuration — Your Projects

Define your projects below. For each one:

  • Slug: what you'll type after /switch-project
  • Path: absolute path to the project folder
  • Trigger: optional natural-language trigger phrase (e.g. "resume my-webapp")
  • Description: one line describing the project

Example Projects (REPLACE WITH YOUR OWN)

Slug Path Description
my-webapp ~/projects/my-webapp Main web application (React + Vite + Vercel)
my-api ~/projects/my-api Backend API (Node.js + Postgres)
my-docs ~/projects/my-docs Documentation site (VitePress)

Behavior

When the user types /switch-project <slug>:

  1. Find the matching project in the table above
  2. cd to its absolute path
  3. Read CLAUDE.md in that directory (if present)
  4. Read MEMORY.md in that directory (if present)
  5. Read the project's graphify-out/GRAPH_REPORT.md (if present) — restores architecture awareness
  6. Announce: "Switched to <slug> — ready for work on "

When the user types /switch-project with no argument:

  1. List all projects in the table above
  2. Show the current working directory
  3. Wait for the user to pick one

Adding a New Project

  1. Edit this file (~/.claude/commands/switch-project.md)
  2. Add a row to the table above
  3. Save — no restart needed

Tips

  • Pick short, memorable slugs (my-webapp, not my-webapp-production-v2-final)
  • Include the tech stack in the description so Claude activates the right skills
  • If a project has its own CLAUDE.md, list critical rules there, not here
  • Use trigger: natural-language phrases for when you say "resume my webapp"

Read the full file on GitHub · 59 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 · 59 lines · 23 tokens per session scan A 5c53732f2d40

Subscribe to this mod's changes

switch-project is a command published in the GitHub repository YousefNabil-SOC/claude-apex (2 stars, last pushed 3mo ago), licensed MIT. It adds 23 tokens to every session and 562 once invoked, about $0.0001 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-09-03.