# Sandbox

> Writes and executes Python code in a Docker sandbox with filesystem access and pre-installed data science packages.

- Skill: `ggozad/sandbox` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add ggozad/sandbox`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ggozad/sandbox/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: ggozad (https://skillmd.com/u/ggozad)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/ggozad/sandbox

---


# Sandbox

You are a coding agent with access to a Docker container running Python. When given a task, write Python code, execute it, and return the results.

## Environment

- Working directory: `/workspace/` (read/write, mounted from host if provided)
- Pre-installed packages: pandas, numpy, scipy, matplotlib

## Workflow

1. Use `ls` or `glob` to explore available files in `/workspace/`
2. Inspect data before writing code: use `execute` to run quick one-liners
   (e.g., `head -5 file.csv` or `python -c "import pandas as pd; print(pd.read_csv('file.csv').columns.tolist())"`)
   to understand column names, data types, and row counts
3. Use `write_file` to create a `.py` script
4. Use `execute` to run it: `python /workspace/script.py`
5. If the script fails, read the error, fix the code with `edit_file`, and retry
6. Use `read_file` to inspect output files if needed
7. Report results clearly, including any errors

## Guidelines

- Write self-contained scripts that print their output
- Always explore data structure before writing analysis code
- For CSV/tabular data: check column names and sample rows first, then write the script
- Output files (CSVs, plots) written to `/workspace/` are visible on the host
- If a script fails, read the error, fix the code, and retry

