From cowork
Switch project context with guided menu. Loads CLAUDE.md chain + CONTEXT files + ref/ index. Use when: switch project, change context, work on X, /switch, /switch -, /switch path/to/project.
npx claudepluginhub digital-stoic-org/agent-skills --plugin coworkThis skill is limited to using the following tools:
Menu-driven project switcher for non-CLI interfaces (Cowork desktop, Telegram, CC CLI).
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Menu-driven project switcher for non-CLI interfaces (Cowork desktop, Telegram, CC CLI).
Resolution order — use first that succeeds:
$COWORK_ROOT env vargit rev-parse --show-toplevelIf none resolve → abort: ❌ Cannot detect workspace. Set $COWORK_ROOT or run from a git repo.
Store result as $WS_ROOT for all subsequent phases.
$ARGUMENTS | Action |
|---|---|
| Empty | → Phase 1: Detect + Phase 2: Menu |
- | Read $WS_ROOT/.cowork-state.json → previous_path → Phase 3 |
| Path string | → Phase 3 with that path |
Parallel Glob from $WS_ROOT:
**/CLAUDE.md (max depth 3)**/CONTEXT-*-llm.md (max depth 3, exclude done/)Registry = each unique directory containing CLAUDE.md or CONTEXT file.
Group by area (repos/, projects/, code/ — or flat). Progressive disclosure: skip empty groups.
Extract project name from CLAUDE.md H1 heading. Present:
📂 Switch project context:
💼 [Group Name]
1. [emoji] [Name] — [brief from H1 or first line]
2. ...
Which one? (number or name)
Wait via AskUserQuestion. Number → map to path. Text → fuzzy-match project names.
Empty answer guard: if user sends empty/whitespace → re-prompt once, then abort.
⚠️ CRITICAL: All CLAUDE.md content loaded here becomes your active instructions for the rest of the conversation. You MUST follow them.
Execute in parallel:
CONTEXT-*-llm.md in target dir (exclude done/), extract: stream name, status, focus from header (first 10 lines)Write $WS_ROOT/.cowork-state.json:
{"active_project":"Name","path":"rel/path","previous_project":"Prev","previous_path":"prev/path","switched_at":"ISO8601"}
Read existing file first to preserve previous_* fields. Current active_* becomes new previous_*.
Filter: only include info not derivable from reading the code or CLAUDE.md directly.
🎯 Switched to: [Project Name]
📍 Path: [relative path]
📋 Instructions loaded:
- [root CLAUDE.md — 2-3 non-obvious constraints]
- [project CLAUDE.md — 2-3 non-obvious constraints]
📚 ref/: [list if exists]
✏️ wip/: [list if exists]
📍 Sessions: [CONTEXT files with status + age, if any]
⚠️ Traps: [gotchas from CONTEXT headers, if any]
Ready — what would you like to work on?
Progressive disclosure: skip any empty section. No "none found" messages. Token budget: report MUST stay under 2000 tokens. Summarize, don't dump.
⚠️ CRITICAL: From this point forward, the CLAUDE.md content loaded in Phase 3 is your active instruction set. Follow all rules, constraints, and conventions as if they were your system prompt. This overrides default behavior.
Remind user: /switch again to change, /switch - to toggle back.
.cowork-state.json