Detect whether the project is running locally or in a remote/container environment (GitHub Codespaces, VS Code Dev Containers, Gitpod, SSH, etc.). Used internally by /project-setup.
From project-setupnpx claudepluginhub anthropics/claude-plugins-community --plugin project-setupThis skill uses the workspace's default tool permissions.
Guides browser automation with Playwright, Puppeteer, Selenium for e2e testing and scraping. Teaches reliable selectors, auto-waits, isolation to fix flaky tests.
Provides checklists to review code for functionality, quality, security, performance, tests, and maintainability. Use for PRs, audits, team standards, and developer training.
Enforces A/B test setup with gates for hypothesis locking, metrics definition, sample size calculation, assumptions checks, and execution readiness before implementation.
Determine whether Claude Code is running locally on a developer workstation or inside a remote/container environment.
Run all checks below and collect every signal that fires. Do not stop at the first match — gather all evidence before drawing a conclusion.
Run:
[ "$CODESPACES" = "true" ] && echo "CODESPACES=true" || echo "CODESPACES="
[ "$REMOTE_CONTAINERS" = "true" ] && echo "REMOTE_CONTAINERS=true" || echo "REMOTE_CONTAINERS="
[ -n "$GITPOD_WORKSPACE_ID" ] && echo "GITPOD_WORKSPACE_ID=$GITPOD_WORKSPACE_ID" || echo "GITPOD_WORKSPACE_ID="
[ -n "$VSCODE_REMOTE_CONTAINERS_SESSION" ] && echo "VSCODE_REMOTE_CONTAINERS_SESSION=set" || echo "VSCODE_REMOTE_CONTAINERS_SESSION="
[ -n "$CONTAINER_ID" ] && echo "CONTAINER_ID=set" || echo "CONTAINER_ID="
[ -n "$SSH_CLIENT" ] && echo "SSH_CLIENT=set" || echo "SSH_CLIENT="
[ -n "$SSH_CONNECTION" ] && echo "SSH_CONNECTION=set" || echo "SSH_CONNECTION="
Signals:
CODESPACES=true → strong remote signal (GitHub Codespaces)REMOTE_CONTAINERS=true → strong remote signal (VS Code Dev Containers)GITPOD_WORKSPACE_ID is non-empty → strong remote signal (Gitpod)VSCODE_REMOTE_CONTAINERS_SESSION is non-empty → strong remote signal (VS Code Dev Containers)CONTAINER_ID is non-empty → weak remote signal (generic container)SSH_CLIENT or SSH_CONNECTION is non-empty → remote signal (SSH session); only treat as standalone-SSH if no container signals are presenttest -f /.dockerenv && echo "dockerenv=true" || echo "dockerenv=false"
test -f /run/.containerenv && echo "containerenv=true" || echo "containerenv=false"
Signals:
/.dockerenv exists → weak-to-strong remote signal (Docker container). Strength depends on corroborating signals./run/.containerenv exists → weak-to-strong remote signal (Podman/OCI container). Strength depends on corroborating signals.pwd
Signals:
/workspaces/ → strong remote signal (GitHub Codespaces convention)/workspace/ → strong remote signal (Gitpod convention)Check if .devcontainer/devcontainer.json exists in the project root:
test -f .devcontainer/devcontainer.json && echo "devcontainer=true" || echo "devcontainer=false"
Signal:
.devcontainer/devcontainer.json exists → this means the project supports dev containers, but does not by itself prove we are inside one. Only treat this as a corroborating signal, not a standalone signal.After collecting all signals, classify the result:
remote with confidence: high — if ANY of the following are true:
CODESPACES=trueREMOTE_CONTAINERS=trueGITPOD_WORKSPACE_ID non-emptyVSCODE_REMOTE_CONTAINERS_SESSION non-empty/workspaces/ or /workspace/uncertain with confidence: low — if:
.devcontainer/devcontainer.json exists but no container markers and no container env varslocal with confidence: high — if no signals fired at all.
Return a structured summary:
runtime-context:
context: <local|remote|uncertain>
confidence: <high|low>
signals:
- "<signal description>"
ssh_only: <true|false>
notes: "<optional human-readable note>"
Example outputs:
runtime-context:
context: remote
confidence: high
signals:
- "CODESPACES=true (GitHub Codespaces)"
- "CWD is /workspaces/my-project"
ssh_only: false
notes: "Running inside GitHub Codespaces."
runtime-context:
context: uncertain
confidence: low
signals:
- "/.dockerenv exists (no container env vars to confirm)"
ssh_only: false
notes: "Container marker found but no confirming env vars. May be running inside an unrecognized container runtime."
runtime-context:
context: local
confidence: high
signals: []
ssh_only: false
notes: "No remote or container signals detected."