Use when adding new error messages to React, or seeing "unknown error code" warnings.
npx skills add jonmagic/skills --skill "wm-workspace-manager"
Install specific skill from multi-skill repository
# Description
Workspace orchestration automation for the wm CLI multi-repo workflow. Use when user wants to start, resume, extend, or manage engineering workspaces with Git worktrees. Handles intent parsing ("start working on X"), repository resolution, feature slugging, branch naming, and wm command construction with proper flags and collision handling.
# SKILL.md
name: wm-workspace-manager
description: Workspace orchestration automation for the wm CLI multi-repo workflow. Use when user wants to start, resume, extend, or manage engineering workspaces with Git worktrees. Handles intent parsing ("start working on X"), repository resolution, feature slugging, branch naming, and wm command construction with proper flags and collision handling.
WM Workspace Manager
Translate natural-language requests about engineering work into concrete wm CLI actions for multi-repo worktree management.
Related Skills
Use brain-operating-system skill when:
- Including brain directory in workspace (--folder brain flag)
- Understanding brain repository structure and workflows
- Creating workspace notes or documentation
Command Overview
| Command | Use Case | Key Flags |
|---|---|---|
wm init --feature "<label>" <repos...> |
Start new workspace session | --checkout-existing, --base, --notes, --no-open |
wm open <session-id> |
Reopen existing workspace | N/A |
wm extend <session-id> <repo> |
Add repo to session | N/A |
wm list |
Show active sessions | N/A |
wm prune <session-id> |
Tear down workspace | Confirm merges first |
Intent Recognition
Treat these verbs as workspace management signals:
- "start working", "continue", "switch to", "resume", "spin up"
- "I need to migrate...", "I want to build...", "Help me with..."
Feature Label Extraction
- Quoted text: Use verbatim (
"flipper feature improvements"→ slugflipper-feature-improvements) - Trailing description: Infer from rest of sentence
- Normalization: lowercase, replace spaces/slashes with
-, drop punctuation - Branch naming:
feature/<slug>
Repository Resolution
- Search paths:
~/github/*and~/code/*/* - Tokenization: Split on commas,
and,+, or whitespace; discard filler words (on,in,for,the) - Multiple matches: Offer numbered clarification, wait for choice
- Missing repos: Provide clone command or offer to skip/replace
Command Construction
Base Command
wm init --feature "<feature label>" <repo1> <repo2> ...
Optional Flags
--primary <repo>: When user specifies different anchor--base <branch>or<repo:branch>: For custom base branches--notes "<text>": Capture kickoff context--checkout-existing: Reuse existing worktree/branch--folder brain: Include brain directory without creating worktree--dry-run,--no-open,--verbose: Only when explicitly requested
Preflight Checks
- Existing worktrees: Detect slug conflicts; ask to reuse or create timestamped variant
- Environment variables: Respect
WM_WORKTREES_ROOT,WM_WORKSPACES_ROOT,WM_HISTORY_FILE,WM_REPO_CONFIG - Collision handling: Append timestamp or numeric suffix if slug exists; log original intent
Execution Flow
- Confirm intent before running (unless clear "yes" signal)
- Run command via terminal tool
- Capture stdout/stderr for summary
- On failure: Surface error, propose remediation, ask whether to retry
Post-Execution Reporting
Identify and report:
- Session ID: <slug>--<primary-repo>+<other-repos-alphabetical>
- Worktree directories: <root>/<repo>/<slug>
- VS Code workspace: ~/code/workspaces/<session-id>.code-workspace
- Manifest: ~/code/workspaces/<session-id>.json
- Notes folder: ~/code/workspaces/<session-id>/notes.md (if created)
Follow-Up Suggestions
- "Need to reopen? →
wm open <session-id>" - "Want to attach repo? →
wm extend <session-id> <repo>" - "Check active sessions →
wm list" - "Finish session →
wm prune <session-id>" (confirm merges first)
Session Lifecycle
Start
wm init --feature "queue outcomes migration" hamzo spamurai-next
Resume
wm open <session-id>
# or
wm recent 1
Extend
wm extend <session-id> flipper
Status
wm list
Finish
wm prune <session-id>
Edge Cases
- Existing branches: Offer reuse with
--checkout-existingor create timestamped variant - Branch collisions: Append suffix, log original intent in manifest
- Missing repos: Provide clone instructions; optionally run if credentials allow
- VS Code trust: Advise on trust workflow if repeated prompts occur
- Non-interactive: Never destructive without user confirmation
Example Walkthrough
User request: "I need to start working on flipper feature improvements in hamzo and spamurai-next"
Your steps:
1. Extract feature: flipper feature improvements → slug flipper-feature-improvements → branch feature/flipper-feature-improvements
2. Identify repos: hamzo, spamurai-next (confirm directories exist)
3. Run: wm init --feature "flipper feature improvements" hamzo spamurai-next
4. Report:
- Session ID: flipper-feature-improvements--hamzo+spamurai-next
- Worktree paths: List each
- VS Code launch status
- Remind about wm open and wm prune
Including Brain Directory
When user wants the brain workspace (second-brain notes) in the session:
wm init --feature "<label>" --folder brain <repo1> <repo2>
This adds brain to the workspace without creating a worktree (brain isn't a git repo managed by wm).
Communication Guidelines
- Concise task-focused responses
- Surface critical state immediately: success/failure, workspace location, branch names
- Actionable next steps: especially for resume/finish flows
- Clarify only when required: multiple repo matches, unclear feature name
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.