Skip to content
Development
Command

/craft-project

Switch between projects in a monorepo, or show a cross-project dashboard.

From plugin
4031 skills27 agents31 commands7 hooks1 MCP
shell
$ npx -y skills add drobins25/craft --agent claude-code

Ships with craft. Installing the plugin gets this command.

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/craft-project

Context preview

What this command does when you run it.

Switch between projects in a monorepo, or show a cross-project dashboard.

Command definition

craft-project.md
name: project
description: "Switch between projects in a monorepo, or show a cross-project dashboard."

Craft Project

Manage which project is active in a multi-project monorepo.

Behavior

No arguments: Show dashboard

Run the `discover-projects.sh` script to list all projects:

bash "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/discover-projects.sh"

This returns `name|path|status|package_manager` lines.

Display a dashboard like:

┌──────────────────────────────────────────────────────┐
│  PROJECTS                                             │
├──────────────┬──────────┬───────────┬────────────────┤
│ Project      │ Cycle    │ Progress  │ Status         │
├──────────────┼──────────┼───────────┼────────────────┤
│ ● craftsman  │ 7-ext    │ 4/5 done  │ active-dev     │
│ ○ you-coded  │ —        │ —         │ pre-dev        │
│ ○ master     │ —        │ —         │ planning       │
└──────────────┴──────────┴───────────┴────────────────┘
Currently pinned: craftsman

For each project, read its `.craft/.global-state` to get ACTIVE_CYCLE, then read cycle state for progress. Mark the currently pinned project (from `$CRAFT_PROJECT_ROOT` env var) with a bullet.

With project name argument: Switch project

When the user provides a project name (e.g., `/craft:project craftsman`):

1. Validate the project exists in the registry (or is "root"/"master" for the monorepo root) 2. Resolve its absolute path 3. Update the session env via `$CLAUDE_ENV_FILE`:

   echo "export CRAFT_PROJECT_ROOT=\"/absolute/path/to/project\"" >> "$CLAUDE_ENV_FILE"
   echo "export CRAFT_PROJECT_NAME=\"craftsman\"" >> "$CLAUDE_ENV_FILE"

4. Write the persistent pin file (so hooks can resolve without env vars):

   repo_root=$(git rev-parse --show-toplevel 2>/dev/null)
   printf '%s\n%s\n' "/absolute/path/to/project" "project-name" > "$repo_root/.craft/.pinned-project"

5. Show a mini status summary for the new project (backlog count, active cycle, etc.)

Important

  • This command only applies to monorepo setups with multiple `.craft/` directories
  • In single-project repos, inform the user there's only one project and no switching needed
  • The project registry lives at the git repo root: `.craft/projects/*.md`
  • Each registry file has YAML frontmatter with `name`, `path`, `status`, `package_manager`
Read more
Read it on GitHub ↗
Ships withcraft

Stop Vibing. Start Crafting. Claude Code plugin: guided + controlled development orchestration harness with built-in workflow + state management, for designing + building durable, production-ready software through the entire product lifecycle - new projects

Get the whole plugin, auto-invoked
Stats
40
Stars
0
Views
5
Forks
Active
Maintenance
Shell
Language
MIT
License
2d ago
Last commit
3mo ago
Created

Repo: drobins25/craft