islinxu/crablet/safe-run

Claude Code and agent skill by islinxu/crablet

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Execute shell commands securely inside a Docker sandbox

Install

npx vskill@latest install islinxu/crablet/safe-run

SKILL.md

Safe Run Skill

This skill executes shell commands inside an isolated Docker container to prevent harm to the host system.

Tools

run_command

Executes a command in a sandboxed environment.

  • command (string): The shell command to execute.

Implementation

python
import subprocess
import shlex
def run_command(command: str) -> str:
"""
Executes a command inside an ephemeral Docker container (alpine).
The container is removed immediately after execution (--rm).
Network access is disabled by default (--network none) for security,
unless explicitly needed (can be configured).
"""
# Security: Use shlex to quote the user command to prevent injection outside the container command
# However, since we are passing the whole string to /bin/sh -c inside docker,
# we need to be careful. Ideally we pass it as a single argument.
# Docker command structure:
# docker run --rm --network none alpine /bin/sh -c "command"
docker_cmd = [
"docker", "run", "--rm",
"--network", "none", # Disable network for SSRF prevention
"--memory", "128m", # Limit memory
"--cpus", "0.5", # Limit CPU
"alpine:latest", # Use lightweight image
"/bin/sh", "-c", command
]
try:
# Run docker command
result = subprocess.run(
docker_cmd,
capture_output=True,
text=True,
timeout=30 # Hard timeout of 30 seconds
)
if result.returncode != 0:
return f"Error (Exit Code {result.returncode}):\n{result.stderr}"
return result.stdout if result.stdout else "(No output)"
except subprocess.TimeoutExpired:
return "Error: Command execution timed out (30s limit)."
except Exception as e:
return f"System Error: {str(e)}"
# Register the tool
register_tool("run_command", run_command)

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
55
Repository forks
13
7-day trend score
20

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/islinxu/crablet/safe-run/badge)](https://verified-skill.com/skills/islinxu/crablet/safe-run)

Something wrong with this skill or its page? Tell us.