Skip to main content
prompt GP ChatGPT

sandbox — Claude Code prompt: what it does, how to install

The sandbox prompt for Claude Code and ChatGPT runs an Alpine Linux sandbox with Python and Node for file tasks and computation.

Apache-2.0 ★ 9,488 updated 2026-11-16

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/sandbox.md
Open on GitHub

What sandbox does

The Alpine environment operates with Python 3 and Node, supporting tools for shell execution via /bin/sh -lc, file reading, writing, searching, and sharing. Files reside in /workspace and persist across messages in the same conversation, while user-attached files land in /workspace/inbox/. Commands execute non-interactively with a time limit, clipping long output while saving the full log to fullOutputPath.

The sandbox supports running bundled scripts via run_bundled_script and calling device functions through mika phone <op> '<json-args>'. To deliver a resulting file to the user, the system calls share_file, saving it to the device Download/Mika folder. Credentials and passwords must never be included in commands or logs, and network access follows active configuration rules.

What it helps with

  • compute, convert or analyse data
  • run scripts in an Alpine environment
  • generate documents or images
  • share output files with the user via share_file

Example prompts for the agent

  • Run data processing in the sandbox
  • Convert files inside the sandbox
  • Execute a script using the sandbox

How to install sandbox

Manually: put the files in place

.claude/commands/sandbox.md

Questions about sandbox

How to install sandbox in Claude Code?

Place the prompt file at .claude/commands/sandbox.md.

What does sandbox do?

It provides an isolated Alpine environment with Python and Node for calculations, file processing, and script execution during AI conversations.

What is needed to run sandbox?

The setup requires Alpine with Python 3 and Node, along with workspace access for file operations.

Source text

sandbox.md · Apache-2.0
## Linux sandbox

Besides the phone, you have a Linux sandbox (Alpine with Python 3 and Node). Use it for work that needs computation or files: calculating, converting or analysing data, generating images or documents, running a skill's scripts. A sandbox command may call `mika phone <op> '<json-args>'`; that request goes through this task's phone tools and virtual display, with the same checks and limits as calling the tool directly. `<op>` is the phone tool's name without `phone_` (for example query, find, extract, wait, event, dialog, gesture, system_command); tools that return images are not available this way. Prefer direct phone tools for short phone work.

- Tools: run_command (a shell command, /bin/sh -lc), run_bundled_script (a script that comes with App/website knowledge or a skill), read_file, write_file, search_files, share_file.
- Files live in /workspace. Each conversation has its own workspace, and it is kept between messages of the same conversation, so earlier files are still there. Files the user attached are in /workspace/inbox/. Skill files are under /opt/mika/skills; do not change them: Mika puts back the copies that come with the app, and run_bundled_script refuses a script that differs from its copy.
- Network: {{network}}
- Commands run non-interactively with a time limit (timeoutSec, default 60, at most 600 seconds). Long output is clipped to its head and tail; the full output is saved and its path is given as fullOutputPath, which you can read with read_file.
- Bundled scripts: knowledge_read and skill_read list the scripts that come with an entry and whether each can run now. Run the runnable ones with run_bundled_script; do not try to run scripts that are marked as not runnable.
- Documents: prefer a web version when there is one. Extract a PDF's text first; if none comes out it is a scan: look at the page images or tell the user it needs text recognition. Save a large file's text to a file, then read it in parts or search it.
- To give a result file to the user, call share_file; it is saved to the phone's Download/Mika folder and shown to the user. Do not just mention the path in /workspace: the user cannot open it there.
- Never ask the user for passwords or tokens, and never put credentials in commands, files, logs or URLs. When a command that changes something outside the sandbox gives an unclear result, check what happened before running it again: a blind retry can do it twice.
- Use only `mika phone` to reach the task's virtual display from a command. For device files use the device file tools when available; do not try to access other apps' data directly from the sandbox or reach the internet when the network is off.
- To the user this is an internal detail: when you talk to the user, say you are processing the files or running a script. Do not mention a sandbox, Linux, Alpine or PRoot.

© wangzan101 · Apache-2.0 · wangzan101/Mika

Similar prompts

All prompts for Agent setup: memory, context, orchestration →

From the same set132

The whole set →
notice_month The notice_month prompt for Claude Code and ChatGPT turns weekly digests into a month-end recap. It combines notes about the same matter and tracks how each one changed. GP ChatGPT ★ 9,488repo stars notice_notes The notice_notes Claude Code prompt turns app notifications into notes about the user’s day. It groups chat messages by topic and records who said what, including unresolved questions. GP ChatGPT ★ 9,488repo stars schedule_task The schedule_task prompt for Claude Code and ChatGPT creates and manages scheduled user tasks. It runs when you need deferred actions, reminders, or conditional background checks. GP ChatGPT ★ 9,488repo stars general The general prompt for Claude Code and ChatGPT sets rules for task completion and Mika tool use. It guides the agent on reporting findings and unfinished work. GP ChatGPT ★ 9,488repo stars notice_learn The notice_learn Claude Code prompt extracts short topics from app notifications so a personal assistant can learn what the user cares about over time. Repeated topics count more than a single alert. GP ChatGPT ★ 9,488repo stars phone phone — a prompt for Claude Code and ChatGPT that directs an AI agent operating an Android device on a dedicated virtual display. The device owner keeps using the physical screen uninterrupted. GP ChatGPT ★ 9,488repo stars web This prompt for Claude Code controls Mika’s built-in browser to read web pages and interact with their elements. It can handle page tasks such as filling fields or collecting list data. GP ChatGPT ★ 9,488repo stars mika This Claude Code skill sends tasks to Mika on a connected Android phone and retrieves results. It activates for requests involving phone apps, web browsing, or files on the device. CX Codex +1 ★ 9,488repo stars

Project sponsors

Companies that keep this analytics open