From ts-dev-kit
Sets up and launches a Docker devcontainer running Claude Code with --dangerously-skip-permissions for autonomous sandboxed coding without prompts. Triggers on 'yolo' or 'autonomous mode'.
npx claudepluginhub jgamaraalv/ts-dev-kit --plugin ts-dev-kit[optional: path to project root — defaults to current directory]This skill is limited to using the following tools:
<live_context>
Sets up VS Code .devcontainer with Docker, configurable Node/Bun base images, package managers (bun/npm/pnpm/yarn), ports, mounts, and Claude Code CLI support. Use for devcontainer setup requests.
Creates devcontainers with Claude Code, Python/Node/Rust/Go tooling, and persistent volumes for isolated development environments and sandboxed workspaces.
Generates .devcontainer configs for Python/Node/Rust/Go projects with Claude Code plugins, language tooling (uv/fnm), and persistent volumes for isolated dev environments.
Share bugs, ideas, or general feedback.
<live_context>
Project root:
!pwd
Devcontainer present:
!ls -la .devcontainer/devcontainer.json 2>/dev/null && echo "YES" || echo "NO"
Docker daemon status:
!docker info --format '{{.ServerVersion}}' 2>/dev/null && echo "RUNNING" || echo "NOT RUNNING"
Docker Desktop installed:
!command -v docker 2>/dev/null || echo "NOT FOUND"
VS Code installed:
!command -v code 2>/dev/null || echo "NOT FOUND"
</live_context>
<trigger_examples>
IMPORTANT SECURITY NOTE: While the devcontainer provides substantial protections (network firewall, isolation), it is NOT immune to all attacks. Only use devcontainers with trusted repositories. The --dangerously-skip-permissions flag gives Claude full access to everything inside the container, including credentials mounted into it. Always inform the user of this trade-off.
START
│
├─ Phase 1: Detect devcontainer
│ ├─ EXISTS → Phase 1.5
│ └─ MISSING → Phase 5 (install) → Phase 1.5
│
├─ Phase 1.5: Ensure plugin availability
│ └─ Copy agents/skills/agent-memory into project if missing → Phase 2
│
├─ Phase 2: Check Docker
│ ├─ RUNNING → Phase 3
│ └─ NOT RUNNING → Phase 4 (start Docker) → Phase 3
│
├─ Phase 3: Launch devcontainer
│ └─ claude --dangerously-skip-permissions
│
├─ Phase 4: Start Docker
│ └─ Start Docker Desktop/daemon → Phase 3
│
└─ Phase 5: Install devcontainer
└─ Scaffold .devcontainer/ → Phase 1.5
<phase_1_detect>
Check whether .devcontainer/devcontainer.json exists in the project root.
<live_context> above for the pre-injected detection result.DEVCONTAINER DETECTED —
.devcontainer/found. Checking plugin availability...
NO DEVCONTAINER FOUND — I'll set one up using the Claude Code reference implementation.
</phase_1_detect>
<phase_1_5_ensure_plugin>
The devcontainer mounts only the project directory at /workspace. If ts-dev-kit is installed as a plugin (outside the project), its agents, skills, and agent-memory won't be available inside the container. This phase copies them into the project so they're accessible.
ls .claude/agents/*.md 2>/dev/null && echo "AGENTS_PRESENT" || echo "AGENTS_MISSING"
ls .claude/skills/*/SKILL.md 2>/dev/null && echo "SKILLS_PRESENT" || echo "SKILLS_MISSING"
If both are present, skip to Phase 2:
PLUGIN FILES PRESENT — agents and skills found in project. Checking Docker status...
If agents or skills are missing, search for the plugin in these locations (in order):
node_modules/@jgamaraalv/ts-dev-kit/ (npm-installed plugin)# Try npm location
PLUGIN_SRC="node_modules/@jgamaraalv/ts-dev-kit"
if [ ! -d "$PLUGIN_SRC/agents" ]; then
echo "Plugin not found in node_modules"
PLUGIN_SRC=""
fi
If the plugin source cannot be found, inform the user and proceed to Phase 2 (the devcontainer will work but without ts-dev-kit agents):
PLUGIN NOT FOUND — Could not locate ts-dev-kit plugin files. The devcontainer will work but agents and skills won't be available. Install the plugin with
npm install -D @jgamaraalv/ts-dev-kitto fix this.
# Copy agents
mkdir -p .claude/agents
cp "$PLUGIN_SRC"/agents/*.md .claude/agents/
# Copy skills (symlink directories to save space)
mkdir -p .claude/skills
for skill_dir in "$PLUGIN_SRC"/skills/*/; do
skill_name=$(basename "$skill_dir")
if [ ! -e ".claude/skills/$skill_name" ]; then
cp -r "$skill_dir" ".claude/skills/$skill_name"
fi
done
# Copy agent-memory scaffolds (don't overwrite existing memories)
if [ -d "$PLUGIN_SRC/agent-memory" ]; then
for mem_dir in "$PLUGIN_SRC"/agent-memory/*/; do
mem_name=$(basename "$mem_dir")
if [ ! -d "agent-memory/$mem_name" ]; then
mkdir -p "agent-memory/$mem_name"
cp -n "$mem_dir"* "agent-memory/$mem_name/" 2>/dev/null || true
fi
done
fi
Check if these copied directories are already in .gitignore. If not, inform the user:
PLUGIN FILES COPIED — Agents, skills, and agent-memory copied into the project for devcontainer access.
Consider adding these to
.gitignoreif you don't want to commit them:# ts-dev-kit plugin files (copied for devcontainer) .claude/agents/ .claude/skills/ agent-memory/
Proceed to Phase 2.
</phase_1_5_ensure_plugin>
<phase_2_check_docker>
Verify the Docker daemon is running and accessible.
<live_context> above for the pre-injected Docker status.docker command is NOT FOUND:DOCKER NOT INSTALLED — Docker Desktop is required for devcontainers. Please install it from https://www.docker.com/products/docker-desktop/ and re-run
/yolo.
Stop here. Do not proceed.
DOCKER RUNNING (version X.X.X) — Ready to launch devcontainer.
</phase_2_check_docker>
<phase_3_launch>
Open the project in VS Code with the devcontainer.
Prerequisites check:
command -v code).VS Code is required for devcontainer support. Install it from https://code.visualstudio.com/ and re-run
/yolo.
Stop here. Do not proceed.
code --install-extension ms-vscode-remote.remote-containers
This is idempotent — if already installed, VS Code simply reports it and moves on.
Launch sequence:
code .
LAUNCHING DEVCONTAINER
VS Code is opening your project. Follow these steps:
- VS Code should prompt "Reopen in Container" — click it.
- If no prompt appears: open Command Palette (
Cmd+Shift+P/Ctrl+Shift+P) → type "Dev Containers: Reopen in Container" → select it.- Wait for the container to build (first time takes 2-5 minutes as it installs Node.js 20, Claude Code, ZSH, and configures the firewall).
- Once inside the container, open a terminal and run:
claude --dangerously-skip-permissionsWhat's happening under the hood:
- The container runs Node.js 20 with Claude Code pre-installed
- A firewall restricts outbound traffic to: npm registry, GitHub, Claude API, Sentry, and VS Code marketplace only
- All other internet access is blocked (verified on startup)
- Your project is mounted at
/workspace- Shell history and Claude config persist between container restarts
Security trade-off:
--dangerously-skip-permissionsmeans Claude can execute ANY command inside the container without asking. The firewall and container isolation are your safety net. Only use this with trusted code.
</phase_3_launch>
<phase_4_start_docker>
The Docker daemon is installed but not running.
macOS:
open -a Docker
Linux:
sudo systemctl start docker
After issuing the start command:
for i in $(seq 1 15); do
docker info --format '{{.ServerVersion}}' 2>/dev/null && break
sleep 2
done
docker info --format '{{.ServerVersion}}' 2>/dev/null
DOCKER STARTED — Docker daemon is now running. Launching devcontainer...
DOCKER FAILED TO START — Please start Docker Desktop manually and re-run
/yolo.
Stop here.
</phase_4_start_docker>
<phase_5_install_devcontainer>
Scaffold the .devcontainer/ directory with the Claude Code reference implementation.
mkdir -p .devcontainer
devcontainer.jsonWrite the file using the reference config. See references/devcontainer-json.md for the full file content.
Key settings:
"Claude Code Sandbox"NET_ADMIN + NET_RAW capabilities (required for firewall)postStartCommand/workspaceDockerfileWrite the file using the reference Dockerfile. See references/dockerfile.md for the full file content.
Key features:
node:20@anthropic-ai/claude-code globallynode userinit-firewall.shWrite the file using the reference firewall script. See references/init-firewall.sh.md for the full file content.
Key security features:
set -euo pipefail — exits immediately on any error (strict mode)api.github.com/meta), Claude API, Sentry, StatsIG, VS Code marketplaceipset hash:net for efficient CIDR matching (required — do NOT add fallback logic)example.com is blocked and api.github.com is reachableCritical anti-patterns to avoid in this script:
exec > >(tee ...) for logging — process substitutions run via sudo never receive EOF, causing the script to hang indefinitely and VS Code to fail with "Unable to resolve resource"-e flag from set -euo pipefail — silent error handling masks failures|| true fallbacks for core iptables/ipset commandsCritical anti-pattern to avoid in devcontainer.json:
postStartCommand through tee (e.g., ... | tee /tmp/firewall-init.log) — this hides the script's real exit code and creates redundant I/O. The correct value is simply: "postStartCommand": "sudo /usr/local/bin/init-firewall.sh".devcontainer to .gitignore (optional)Check if .gitignore exists and whether .devcontainer/ is already listed. If not, ask the user:
Should I add
.devcontainer/to.gitignore?
- Yes — keep devcontainer config local to your machine
- No — commit it so the whole team can use it (recommended for teams)
ls -la .devcontainer/
cat .devcontainer/devcontainer.json | head -5
Announce completion:
DEVCONTAINER INSTALLED —
.devcontainer/is ready with Dockerfile, firewall script, and configuration. Checking plugin availability...
Return to Phase 1.5.
</phase_5_install_devcontainer>
<customization_notes>
After installation, the user may want to customize:
Adding allowed domains to the firewall:
Edit .devcontainer/init-firewall.sh and add domains to the for domain in loop:
for domain in \
"registry.npmjs.org" \
"api.anthropic.com" \
"your-custom-domain.com" \ # <-- add here
...
Adding VS Code extensions:
Edit .devcontainer/devcontainer.json → customizations.vscode.extensions[]:
"extensions": [
"anthropic.claude-code",
"your-extension.id"
]
Changing Node.js version:
Edit .devcontainer/Dockerfile — change the FROM line:
FROM node:22
Adding project-specific dependencies:
Add RUN commands to the Dockerfile before the USER node line:
RUN apt-get update && apt-get install -y your-package
</customization_notes>