Skip to content
Back to skills

Safeclaw Integration

ASecurity

Docker-based isolated sessions for YOLO mode with resource limits

  • 6 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 27, 2026
developmentrustgobashdockerapifrontendbackenddevops

Works with

  • claude code
  • api

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add KevinZai/commander --skill safeclaw-integration --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Safeclaw Integration?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Safeclaw Integration
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/kevinzai-safeclaw-integration/badge)](https://www.skillsdirectory.com/skills/kevinzai-safeclaw-integration)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: safeclaw-integration
description: Docker-based isolated sessions for YOLO mode with resource limits
version: 1.0.0
category: devops
---

# SafeClaw Integration

Run isolated Claude Code sessions inside Docker containers for YOLO mode, overnight builds, and untrusted code execution.

## Why SafeClaw

- **Isolation**: Code runs in a container, not on your host
- **Resource limits**: CPU, memory, and disk caps prevent runaway sessions
- **Reproducibility**: Same container image every time
- **Safety**: YOLO mode (`--dangerously-skip-permissions`) is safe inside a container
- **Cleanup**: Container is destroyed after session ends

## Single Container Session

```bash
docker run --rm -it \
  --name safeclaw-session \
  --cpus="2" \
  --memory="4g" \
  --pids-limit=256 \
  -v "$(pwd):/workspace:rw" \
  -v "$HOME/.claude:/home/coder/.claude:ro" \
  -e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
  -w /workspace \
  ghcr.io/anthropics/claude-code:latest \
  claude -p "Execute the plan in tasks/plan.md" \
  --dangerously-skip-permissions \
  --max-turns 100
```

## Parallel Containers

Run multiple isolated sessions simultaneously:

```bash
# Session 1: Frontend
docker run --rm -d \
  --name safeclaw-frontend \
  --cpus="1.5" --memory="3g" \
  -v "$(pwd):/workspace:rw" \
  -v "$HOME/.claude:/home/coder/.claude:ro" \
  -e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
  -w /workspace \
  ghcr.io/anthropics/claude-code:latest \
  claude -p "Build the frontend components" --dangerously-skip-permissions

# Session 2: Backend
docker run --rm -d \
  --name safeclaw-backend \
  --cpus="1.5" --memory="3g" \
  -v "$(pwd):/workspace:rw" \
  -v "$HOME/.claude:/home/coder/.claude:ro" \
  -e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
  -w /workspace \
  ghcr.io/anthropics/claude-code:latest \
  claude -p "Build the API endpoints" --dangerously-skip-permissions

# Monitor
docker logs -f safeclaw-frontend &
docker logs -f safeclaw-backend &
```

## Overnight Build with Resource Limits

```bash
docker run --rm -d \
  --name safeclaw-overnight \
  --cpus="2" \
  --memory="6g" \
  --pids-limit=512 \
  --storage-opt size=10G \
  --restart=on-failure:3 \
  -v "$(pwd):/workspace:rw" \
  -v "$HOME/.claude:/home/coder/.claude:ro" \
  -e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
  -w /workspace \
  ghcr.io/anthropics/claude-code:latest \
  claude -p "Full implementation plan. Checkpoint after each phase." \
  --dangerously-skip-permissions \
  --max-turns 200

# Set a timeout kill (8 hours)
(sleep 28800 && docker kill safeclaw-overnight 2>/dev/null) &
```

## Resource Limit Reference

| Resource | Development | Overnight | Parallel (each) |
|----------|-------------|-----------|-----------------|
| CPUs | 2 | 2 | 1.5 |
| Memory | 4GB | 6GB | 3GB |
| PIDs | 256 | 512 | 256 |
| Disk | 5GB | 10GB | 5GB |
| Max Turns | 50 | 200 | 100 |
| Timeout | 2h | 8h | 4h |

## Safety Checklist

- [ ] Never mount host `/` or sensitive directories
- [ ] Mount `.claude` as read-only (`:ro`)
- [ ] Set `--pids-limit` to prevent fork bombs
- [ ] Set memory limits to prevent OOM on host
- [ ] Use `--rm` to auto-cleanup containers
- [ ] Set `--restart=on-failure:N` with a retry cap
- [ ] Use named containers for easy monitoring
- [ ] Kill containers with timeout for overnight runs

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.