Cc launch workspace
Personal agent skills (Claude Code / Codex) — SKILL.md collection
npx -y skills add YosukeIida/personal-agent-skills --skill cc-launch-workspaceAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
3 things to look at
- 20 days oldThe repository was created 20 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Launch Claude Code in a new cmux terminal workspace for a specified repository or path. Use when the user asks to open a repo in cmux and start a Claude session, such as "cmux で repo の Claude session を起動して", "新しい workspace で Claude Code を開いて", or "s-code の Claude session を cmux terminal で起動して".
SKILL.md
4.7 KB, as published. Nobody here has run it
cc-launch-workspace
Overview
Open a target repository/path as a new cmux workspace, start Claude Code there, and verify the session. This skill is Claude Code only; do not generalize it to Codex or opencode unless the user explicitly asks for a different skill.
Workflow
-
Resolve the target from the user's request.
- If the user gives an absolute path, use that path.
- If the user gives a repo name, search
~/workspace/github.com/*/<repo>. - If there are zero or multiple matches, stop and ask the user to choose.
-
Confirm the tools exist:
command -v cmux command -v claude -
Run the helper script from this skill directory:
scripts/launch_cc_workspace.sh <repo-or-path> scripts/launch_cc_workspace.sh <repo-or-path> --name "<workspace name>" -
Report the result concisely: target path, cmux workspace id, TTY, and Claude session id if available.
Helper Behavior
The helper script performs the fragile sequence:
- Create a workspace with
cmux new-workspace --cwd <path> --focus true, then confirm it in the cmux session JSON. If cmux RPC returns an error, still inspect the session JSON because workspace creation can succeed before the socket write fails. - Fall back to
cmux <path>only ifnew-workspacedid not create a new workspace. - Identify the matching workspace and terminal TTY from the cmux session JSON.
- Launch Claude by sending
claude\ninto the workspace's terminal:cmux send --workspace <id> "claude\n". This runs the claude CLI in the interactive login shell, yielding an operable terminal Claude that inherits the shell environment (direnv/devshell, PATH). It goes through the cmux socket, so unlike AppleScript it does NOT depend on OS window focus. - Do NOT use
cmux new-surface --type agent-session --provider claude. That creates a cmux-managed React agent surface (shows as "Claude Code · React"), which is not a normal operable terminal and does not give you the shell's environment. - Only if
cmux senddoes not yield a running Claude, fall back to AppleScript (activate cmux → keystrokeclaude→ key code 36). AppleScript is focus-dependent and can silently miss the embedded terminal, so it is a last resort. - Verify startup through the cmux session JSON (
terminal.agent.kind == "claude", label shows "Claude Code" not "Claude Code · React") andps -t <tty>.
Manual Fallback
If the helper script fails after creating the workspace, use this sequence:
# 1) Create the workspace
cmux new-workspace --cwd <absolute-target-path> --focus true
# 2) Find the new workspace id + terminal tty
jq -r '.windows[0].tabManager.workspaces[] | [.workspaceId,.currentDirectory,.panels[0].ttyName] | @tsv' \
"$HOME/Library/Application Support/cmux/session-com.cmuxterm.app.json"
# 3) Launch Claude deterministically by sending it into the workspace terminal
cmux send --workspace <workspace-id> "claude\n"
# 4) Verify
ps -t <tty> -o pid,ppid,stat,command
# Last resort only (focus-dependent, may silently miss the terminal):
# osascript -e 'tell application "cmux" to activate' \
# -e 'delay 0.5' \
# -e 'tell application "System Events" to keystroke "claude"' \
# -e 'tell application "System Events" to key code 36'
Treat the launch as successful when ps shows /opt/homebrew/bin/claude or cmux session JSON shows terminal.agent.kind == "claude" for the workspace (label "Claude Code", not "Claude Code · React").
Notes
- The
--nameoption is best effort; if cmux RPC is unavailable, the workspace is left with cmux's default title. - Prefer
cmux send --workspace <id> "claude\n"(terminal launch) over--type agent-session. The agent-session surface is a cmux-managed React panel, not an operable interactive terminal; the terminal-launched Claude is operable AND inherits the workspace shell's environment — verified that the repo's nix devshellnode/npx(via direnv) are available to the launched Claude, which matters for MCP servers it spawns. cmux sendescape sequences:\n/\rsend Enter,\tsends Tab.cmux send-key <key>sends a discrete key (e.g.enter,ctrl+c).- Do not use
tmuxfallback for this skill. The point is to launch inside cmux terminal workspace. - The helper script has side effects: it opens a cmux workspace and may start a Claude session.