Use Prized from your coding agent
Updated
Teach Claude Code, Codex, Cursor, or another coding agent to run code in Prized sandboxes: install the Prized skill, or paste a short section into AGENTS.md.
With the skill, your agent runs untrusted or heavy code in a sandbox instead of on your machine, and reaches for a box when the machine should stay on, such as Claude Code working through the night with your laptop closed. It loads only when a task calls for it, with or without Prized named.
1. Export an API key
Make a key with Sandboxes: Write on the API keys page, and export it in the shell you start the agent from. New to Prized? Open Sandboxes signs you up with free credit, no card: click Create API key there, and before your first sandbox its Coding agent tab shows steps 1 to 3 with the key filled in.
export PRIZED_API_KEY=dcp_…2. Install the skill
npx skills add prized-dev/skills -g -y -a claude-code -a codex -a cursor -a github-copilotIt installs the skill for every project in Claude Code, Codex, Cursor and GitHub Copilot, and in the agents that read ~/.agents/skills, such as Gemini CLI, OpenCode, Cline and Zed. For an agent with its own skills folder, add -a with its name, such as -a windsurf or -a goose. To install it in one project instead, leave out -g and run it in the project's folder.
No Node? Unpack the skill into your agent's skills folder yourself. For Claude Code:
mkdir -p ~/.claude/skills/prized-sandboxes && curl -fsSL https://prized.dev/skills/prized-sandboxes.tar.gz | tar -xz -C ~/.claude/skills/prized-sandboxesFor Codex and the other agents that read ~/.agents/skills:
mkdir -p ~/.agents/skills/prized-sandboxes && curl -fsSL https://prized.dev/skills/prized-sandboxes.tar.gz | tar -xz -C ~/.agents/skills/prized-sandboxesFor one repo, unpack it into the repo's .claude/skills/ or .agents/skills/ instead. The skill is /SKILL.md, with a standard-library Python helper beside it.
3. Try it
Start the agent in a new session and ask:
Run python3 --version in a Prized sandbox.It creates a sandbox, prints Python 3.12.3, and deletes the sandbox.
Add it to AGENTS.md
To make sandboxes the rule in a repo, for every agent that works there, paste this section into its AGENTS.md. Claude Code reads CLAUDE.md, so add the line @AGENTS.md to that file.
## Running code in sandboxes (Prized)
Run untrusted, model-generated or heavy code in a Prized sandbox, never on this machine or the API server.
- Key: `PRIZED_API_KEY` (starts with `dcp_`) from the environment. Never commit it or put it in a command line. Missing? Ask the user to make one at https://prized.dev/dashboard/workspace/api-keys.
- Shell: `ID=$(prized sandbox create --max-runtime 30m)`, then `prized sandbox exec "$ID" -- <command>`, `prized sandbox cp ./file "${ID}:file"` (one file; tar a directory first), and `prized sandbox rm "$ID" -y`.
- Code: the SDK (`pip install prized` or `npm i @prized/sdk`, https://prized.dev/docs/sandboxes-python-typescript.md), or plain HTTPS with `Authorization: Bearer $PRIZED_API_KEY`:
1. `POST https://api.prized.dev/api/v1/sandboxes?wait=running` with `{"template":"prized-base-v1","maxRuntimeMin":30}` returns `{"sandbox":{"id","state","toolboxBase"}}`. While `state` is `starting`, poll `GET /api/v1/sandboxes/{id}`.
2. `POST {toolboxBase}/process/execute` with `{"command":"python3 main.py","cwd":"/home/prized/work","timeout":300}` returns `{"stdout","stderr","exitCode"}`. A failed command still returns 200: check `exitCode`.
3. `POST {toolboxBase}/files/upload?path=/home/prized/work/main.py` with the raw bytes; `GET {toolboxBase}/files/download?path=...`.
4. `DELETE https://api.prized.dev/api/v1/sandboxes/{id}` in a `finally`.
- Use `toolboxBase` from the response, never a URL you build. Stdlib Python and TypeScript helpers: https://prized.dev/docs/sandboxes-python-typescript.md. Everything else: https://prized.dev/llms.txt