Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/islinxu/crablet/safe_runnpx skills add isLinXu/crablet --skill safe_rungit clone --depth 1 https://github.com/isLinXu/crabletWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/islinxu/crablet/safe_run)<a href="https://agentmods.dev/skills/islinxu/crablet/safe_run"><img src="https://agentmods.dev/badge/skills/islinxu/crablet/safe_run.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00011 | $0.00481 |
| Opus 5 | $0.00005 | $0.00241 |
| Sonnet 5 | $0.00002 | $0.00096 |
| Haiku 4.5 | $0.00001 | $0.00048 |
Grade A, and why
safe_run scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
result = subprocess.run( What it actually says
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
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)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 72 lines · 11 tokens per session scan A bbbae963c740
safe_run is a skill published in the GitHub repository isLinXu/crablet (56 stars, last pushed 6d ago), licensed MIT. It adds 11 tokens to every session and 481 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
exec-local-docker
Execute a TensorRT-LLM workload locally in Docker. Runs a fully-resolved Docker command in background, monitors completion, reads logs, and reports results. Workflow-agnostic — does not need to know if the workload is pytest, eval, benchmark, or a custom script.
harbor
CLI toolkit for managing containerized LLM services. Use when the user wants to start, stop, configure, or manage AI/LLM services like Ollama, Open WebUI, llama.cpp, vLLM, LiteLLM, ComfyUI, and 250+ others. Triggers on requests to "run a model", "start ollama", "set up an LLM", "configure harbor", "manage services"…
new-service
Add a new service to Harbor — scaffold the compose config, environment variables, metadata, documentation, and cross-service integrations. Use this skill whenever the user wants to add a new service to Harbor, integrate a new tool/app/model server, create a compose configuration for a new project, or onboard any…
ecspresso
ECS deployment tool - deploy, manage, and troubleshoot ECS services.
hardening-docker-containers-for-production
Hardening Docker containers for production involves applying security best practices aligned with CIS Docker Benchmark v1.8.0 to minimize attack surface, prevent privilege escalation, and enforce leas.
scanning-docker-images-with-trivy
Trivy is a comprehensive open-source vulnerability scanner by Aqua Security that detects vulnerabilities in OS packages, language-specific dependencies, misconfigurations, secrets, and license violati.