From workspace
Create a lightweight workspace without an existing repo. Use when the user wants a quick isolated space for experiments, research, or a new project from scratch. Triggers on "sandbox", "quick workspace", "experiment", "scratch", "new project from scratch".
How this skill is triggered — by the user, by Claude, or both
Slash command
/workspace:start-sandboxThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Respond in the user's language.**
Respond in the user's language.
You are creating a lightweight sandbox workspace — no existing repo required. Follow the steps below in order. Never skip ahead. Never batch multiple questions in a single message.
Ask each question separately, waiting for the user's answer before asking the next.
Ask: What should this workspace be called?
research-perf-audit, experiment-new-api, scratch-oauth-flowAsk: Briefly describe the goal of this workspace (2–3 sentences). This will be written to CLAUDE.local.md to give future Claude sessions context.
Ask: Is there a spec or ticket link for this work? (optional — "no" or Enter to skip)
See references/registry-format.md for the full schema and allocation rules.
cat ~/.claude-workspaces/registry.json 2>/dev/null || echo '{"workspaces":{},"next_slot":1}'
Handle missing file gracefully — initialize empty registry if not found.
Scan keys 1, 2, 3, ... in workspaces and return the first missing key. This is the new slot number.
See references/color-palette.md. Compute: index = (slot - 1) % 8, then look up the corresponding hex color and emoji.
.claude-workspaces.json in the current directory:
cat .claude-workspaces.json 2>/dev/null
workspaces_root key, use that value.~/workspaces.Expand ~ to $HOME in workspaces_root, then:
workspace_path = <workspaces_root>/<slug>
Show a clear summary of everything that will be created. For example:
Ready to create sandbox workspace:
Name: experiment-new-api
Slot: w2
Color: 🟠 #3a2a15 (Orange)
Path: /Users/you/workspaces/experiment-new-api
Confirm? [Y/n]
Wait for the user's response. Accept: y, yes, o, oui, or empty (just Enter). Anything else cancels — tell the user the workspace was not created.
Execute the following sub-steps in order. If any step fails, stop immediately and display the error.
mkdir -p <workspace_path>
git init <workspace_path>
Write <workspace_path>/CLAUDE.local.md. See references/generated-files.md for the exact template.
sandboxN/AWrite <workspace_path>/.vscode/settings.json with the workspace color. See references/generated-files.md for the exact template.
mkdir -p <workspace_path>/.vscode
Fill in the hex color for titleBar.activeBackground, titleBar.activeForeground, statusBar.background, statusBar.foreground.
Read the registry again (always re-read before writing to avoid races), add the new workspace entry, and update next_slot.
See references/registry-format.md for the exact schema.
New entry structure for sandbox mode:
{
"<slot>": {
"slug": "<slug>",
"mode": "sandbox",
"branch": null,
"color": "<hex-color>",
"emoji": "<emoji>",
"created_at": "<ISO-8601-timestamp>",
"project_root": null,
"workspace_path": "<workspace_path>",
"repos": [
{
"name": "<slug>",
"path": "<workspace_path>",
"port": null
}
]
}
}
Write the updated registry to ~/.claude-workspaces/registry.json. Create the directory if needed:
mkdir -p ~/.claude-workspaces
Apply the workspace color to the current terminal session. See references/color-palette.md for OSC sequences.
# Detect the parent terminal device (Claude Code captures stdout)
TTY_DEV="/dev/$(ps -o tty= -p $PPID 2>/dev/null | tr -d ' ')"
# Set background color (OSC 11)
printf '\033]11;<hex-color>\007' > "$TTY_DEV" 2>/dev/null
# Set tab name (OSC 1) and window title (OSC 0)
printf '\033]1;<emoji> <slug> [w<slot>]\007' > "$TTY_DEV" 2>/dev/null
printf '\033]0;<emoji> <slug> [w<slot>]\007' > "$TTY_DEV" 2>/dev/null
Show a concise success message. For example:
✓ Sandbox workspace created!
🟠 [w2] experiment-new-api
Path: /Users/you/workspaces/experiment-new-api
Ready to go. Fresh git repo — start building!
Next steps:
• cd /Users/you/workspaces/experiment-new-api
• Open a new Claude Code session in the workspace directory
• Use /workspace:resume to reattach later
• Use /workspace:finish when done with this workspace
~ to $HOME in all paths before running shell commands or writing files.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub sommesi/claude-workspaces --plugin workspace