plugins/codespaces/skills/codespaces/SKILL.md
Connect to and interact with GitHub Codespaces. Manages connections via gh ado-codespaces (port forwarding, Azure auth), runs commands via gh cs ssh, invokes Copilot CLI remotely, and supports multiple codespaces.
npx skillsauth add scaryrawr/scarypilot codespacesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use gh ado-codespaces and gh cs ssh to connect to and work inside GitHub Codespaces. One persistent background connection per codespace handles port forwarding and Azure auth; all command execution goes through gh cs ssh.
gh cs list
The output includes codespace name, repository, branch, and state. Only Running codespaces can be connected to. To start a stopped codespace:
gh cs start -c {codespace-name}
Use the helper script to start gh ado-codespaces in a background local tmux session. The script is a no-op if the session already exists (enforcing the one-connection-per-codespace rule).
./scripts/ensure-connection.sh {codespace-name}
The script creates a local tmux session named cs-{codespace-name} on the agent socket (${CLAUDE_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/claude-tmux-sockets}/claude.sock).
After starting a connection, always tell the user how to monitor it:
To monitor the connection session yourself:
SOCKET="${CLAUDE_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/claude-tmux-sockets}/claude.sock"
tmux -S "$SOCKET" attach -t cs-{codespace-name}
Use gh cs ssh directly — no new background process needed:
gh cs ssh -c {codespace-name} -- {command}
For multi-step pipelines, compose inline:
gh cs ssh -c {codespace-name} -- bash -c 'cd /workspaces/myrepo && npm test 2>&1'
Each codespace has Copilot CLI installed. Invoke it remotely via gh cs ssh:
gh cs ssh -c {codespace-name} -- copilot {args}
Examples:
# Ask a question
gh cs ssh -c {codespace-name} -- copilot ask "explain the auth module"
# Explain a specific file
gh cs ssh -c {codespace-name} -- bash -c 'cd /workspaces/myrepo && copilot explain src/auth.ts'
Each codespace is independent. Call ensure-connection.sh for each before issuing commands, then aggregate results locally.
# Connect to both codespaces
./scripts/ensure-connection.sh my-api-main
./scripts/ensure-connection.sh my-ui-main
# Query both
gh cs ssh -c my-api-main -- cat /workspaces/api/src/types.ts
gh cs ssh -c my-ui-main -- cat /workspaces/ui/src/types.ts
Then compare or synthesize the results locally.
The codespace itself may have tmux sessions running (e.g., a dev server). Access them via gh cs ssh:
# List internal tmux sessions
gh cs ssh -c {codespace-name} -- tmux list-sessions
# Capture output from an internal pane
gh cs ssh -c {codespace-name} -- tmux capture-pane -p -J -t {session}:0.0 -S -200
# Send a command to an internal tmux session
gh cs ssh -c {codespace-name} -- tmux send-keys -t {session}:0.0 'npm run dev' Enter
Note: this interacts with tmux inside the codespace, not the local agent tmux managing the connection.
Kill a codespace connection (stops port forwarding and services):
SOCKET="${CLAUDE_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/claude-tmux-sockets}/claude.sock"
tmux -S "$SOCKET" kill-session -t cs-{codespace-name}
Kill all codespace connection sessions:
SOCKET="${CLAUDE_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/claude-tmux-sockets}/claude.sock"
tmux -S "$SOCKET" list-sessions -F '#{session_name}' \
| grep '^cs-' \
| xargs -r -n1 tmux -S "$SOCKET" kill-session -t
| Symptom | Likely Cause | Action |
|---------|-------------|--------|
| gh cs ssh times out | Codespace is stopped | gh cs start -c {name}, then retry |
| gh ado-codespaces already running message | Session exists | No action needed; ensure-connection.sh is idempotent |
| Auth errors on the codespace | Azure auth not refreshed | Kill the session and re-run ensure-connection.sh |
| gh cs list shows no codespaces | Not authenticated | gh auth login |
tools
Use the local smahties MCP server when users ask for semantic code search, conceptual codebase discovery, keyword or hybrid code search, indexing files/directories, checking index status, or listing indexed code units.
testing
Use this skill for end-of-task digivolution/reflection requests that ask whether durable repo-specific guidance, AGENTS.md/Copilot instructions, or in-repo SKILL.md instructions are stale, missing, or should be updated.
testing
Manage parallel git worktrees with Worktrunk (`wt`) and enforce disk-fit preflight checks before creating new worktrees.
data-ai
Generate images from text prompts using Ollama's local image generation models.