# Modal sandbox

> Modal sandbox is an open-source agent skill for cloud and infrastructure. Lets an agent run code in Modal sandboxes, optionally on GPUs, via ComputeSDK. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/computesdk/computesdk/tree/main/skills/modal-sandbox
- **Repository:** https://github.com/computesdk/computesdk
- **GitHub stars:** 305
- **License:** MIT
- **Skill name:** modal-sandbox
- **Collection:** https://github.com/computesdk/computesdk
- **Categories:** [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill covers running commands inside Modal sandboxes through ComputeSDK. It describes two routes: the hosted Sandbox Router, where the agent uses the compute CLI to pick Modal, run a command and tear the sandbox down, with the option to require managed or bring-your-own-key accounts; and a direct SDK route, where the developer installs the computesdk and @computesdk/modal packages, creates a sandbox, runs a workload and destroys it.

The guidance points the agent to the sandbox-router and computesdk skills for fuller TypeScript, REST and MCP examples, and to the adapter README for credentials, the provider factory and known limitations. The included example shows a Modal token pair read from environment variables and a short Python command run through runCommand.

Expect a TypeScript project using npm, Modal token credentials, and either the compute CLI or the ComputeSDK packages. The skill is a single SKILL.md file with no bundled scripts.

## When your agent uses it

> Modal sandbox adapter for ComputeSDK. Run code in Modal sandboxes with optional GPU support. Use for Modal on the ComputeSDK Sandbox Router or @computesdk/modal in a direct SDK integration.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/computesdk/computesdk/tree/HEAD/skills/modal-sandbox)
- [License: MIT](https://github.com/computesdk/computesdk/tree/HEAD/skills/modal-sandbox)

## Features

- **Hosted router usage:** Runs a command on Modal through the ComputeSDK Sandbox Router CLI and cleans up afterward.
- **Direct SDK setup:** Steps for installing the Modal adapter and creating a sandbox from TypeScript code.
- **Account mode selection:** Explains checking available offers and choosing managed or bring-your-own-key accounts.
- **Sandbox lifecycle:** Covers creating a sandbox, running a workload and destroying it when finished.
- **Pointers to related skills:** Directs the agent to the sandbox-router and computesdk skills for fuller examples.

## Good for

- Run a Python snippet in an isolated Modal sandbox
- Execute a shell command on Modal through the compute CLI
- Set up a TypeScript project that runs code on Modal with @computesdk/modal
- Route sandbox creation to a connected Modal key in the Sandbox Router
- Check which sandbox providers and keys are available before running a job

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/modal-sandbox` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/computesdk/computesdk.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/modal-sandbox &&
cp -R "$tmp/skills/modal-sandbox" ~/.claude/skills/modal-sandbox &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/modal-sandbox` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/modal-sandbox` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/computesdk/computesdk.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/modal-sandbox &&
cp -R "$tmp/skills/modal-sandbox" ~/.agents/skills/modal-sandbox &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/modal-sandbox` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/modal-sandbox` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/computesdk/computesdk.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/modal-sandbox &&
cp -R "$tmp/skills/modal-sandbox" ~/.cursor/skills/modal-sandbox &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/modal-sandbox` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/computesdk/computesdk.git --path skills/modal-sandbox
```

Or copy the folder to `~/.gemini/skills/modal-sandbox` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/modal-sandbox`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/computesdk/computesdk.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/modal-sandbox &&
cp -R "$tmp/skills/modal-sandbox" ~/.copilot/skills/modal-sandbox &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/modal-sandbox` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/computesdk/computesdk.git
```

Then copy `computesdk/skills/modal-sandbox` into your agent's skills folder as `modal-sandbox`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Modal sandbox need to work?

A TypeScript project with npm and Modal token credentials for the direct SDK route, or the compute CLI and a connected Modal key for the hosted router.

### Does Modal sandbox support GPUs?

The description mentions optional GPU support in Modal sandboxes, but the SKILL.md itself does not detail GPU configuration; the adapter README holds those details.

### Does Modal sandbox include scripts?

No. The skill folder contains only the SKILL.md file.

### Where are credentials and limitations documented?

The skill points to the @computesdk/modal adapter README for prerequisites, credentials, the provider factory, examples and limitations.

### How do I install Modal sandbox in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/modal-sandbox to use it in all your projects, or to .claude/skills/modal-sandbox in one project.

### Does Modal sandbox run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Modal sandbox?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Modal sandbox?

The closest alternatives to Modal sandbox are Codesandbox sandbox, Namespace sandbox, Sandbox0 sandbox, Givemeanode sandbox and Sail sandbox.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Codesandbox sandbox](https://ai-powered.com/skills/codesandbox-sandbox): Codesandbox sandbox is an open-source agent skill for cloud and infrastructure.
- [Namespace sandbox](https://ai-powered.com/skills/namespace-sandbox): Namespace sandbox is an open-source agent skill for cloud and infrastructure.
- [Sandbox0 sandbox](https://ai-powered.com/skills/sandbox0-sandbox): Sandbox0 sandbox is an open-source agent skill for cloud and infrastructure.
- [Givemeanode sandbox](https://ai-powered.com/skills/givemeanode-sandbox): Givemeanode sandbox is an open-source agent skill for cloud and infrastructure.
- [Sail sandbox](https://ai-powered.com/skills/sail-sandbox): Sail sandbox is an open-source agent skill for cloud and infrastructure.
- [Createos sandbox](https://ai-powered.com/skills/createos-sandbox): Createos sandbox is an open-source agent skill for developer tools.
- [Microsandbox sandbox](https://ai-powered.com/skills/microsandbox-sandbox): Microsandbox sandbox is an open-source agent skill for developer tools.
- [Sprites sandbox](https://ai-powered.com/skills/sprites-sandbox): Sprites sandbox is an open-source agent skill for cloud and infrastructure.

---
Source: https://ai-powered.com/skills/modal-sandbox
