Установка
SKILL.md
iii-sandbox
The iii-sandbox worker boots ephemeral libkrun microVMs and runs code inside them, isolated from the host. Each sandbox boots in a few hundred milliseconds, runs commands or file operations scoped to the engine it lives on, and is reaped when idle; the overlay filesystem is discarded on stop. Its sandbox::* functions are called like any other iii function.
There are two ways in. sandbox::run is the fast path: it boots a VM, runs a code snippet, captures stdout/stderr, and tears the VM down in a single call. For multi-step work — several commands, multiple files, or inspecting a VM between steps — use the sandbox::create → sandbox::exec / sandbox::fs::* → sandbox::stop lifecycle and carry the returned sandbox id across calls.
Prerequisites: the worker is enabled by adding iii-sandbox to config.yaml, and the host needs hardware virtualization (Apple Silicon, or /dev/kvm on Linux) — Intel Macs and Windows cannot boot sandboxes.
Get the contract from the engine
This page tells you WHEN and HOW to use the sandbox; the engine is the source of truth for every function's exact arguments and responses. Before you call any sandbox::* function, fetch its contract and build your payload from that — do not guess field names, types, or formats from memory:
engine::functions::info { function_id: "sandbox::<fn>" }
(e.g. { function_id: "sandbox::fs::write" }). The returned schema is authoritative; this skill never restates it.
Running an iii worker inside a sandbox
To author an iii worker (read the iii skill first), you write the worker code into the sandbox, install its deps, and run it as a process there — but the worker must still join the HOST engine bus to be useful.
- Reaching the host engine: enable networking when you create the sandbox (the field is in the
sandbox::createcontract — fetch it), AND set the worker's engine-URL env (III_ENGINE_URL, e.g.ws://localhost:49134) IN THEsandbox::createenv— NOT later at exec/run time. The localhost→host rewrite happens ONLY for the create-timeenv: alocalhost/127.0.0.1engine URL set there is rewritten to the per-sandbox gateway so the worker reaches the host bus. The samelocalhostURL passed atsandbox::exectime is NOT rewritten — it points at the sandbox's own loopback, the worker silently fails to connect, and you will waste turns debugging TCP. So: put the engine URL in the createenv; the worker process inherits it already rewritten. - Run it backgrounded, never as a foreground
exec: starting the worker withsandbox::exec "node index.mjs"blocks and times out (S200 exec timed out), because the process never returns. Launch it detached (… &,nohup, orsandbox::runshell mode) so the exec call returns while the worker keeps running — see the serialized-exec boundary below. - Find the result: once the worker connects, its functions appear in
engine::functions::listand anyhttptrigger it binds is served by theiii-httpworker; verify endpoints withweb::fetch, notcurl. - EPHEMERAL by nature: a worker hosted in a sandbox dies when the sandbox is stopped or reaped (the overlay is discarded). That is fine for a demo, test, or one-off. For a worker that must stay up, install it as a managed worker (
worker::add, see theiiiskill) instead of hosting it in a sandbox.
When to Use
- Execute untrusted or LLM-generated code without exposing the host.
- One-shot "code in, stdout out" — reach for
sandbox::run. - Spin up an ephemeral build worker, integration-test fixture, or throwaway iii worker.
- Read, write, search, or edit files inside an isolated filesystem.
Boundaries
- A sandbox is for running code and build steps, NOT for hosting a long-lived server. To expose an HTTP API or any always-on endpoint, author an iii worker and register a trigger for it (an
httptrigger is served by theiii-httpworker) — do NOT start a server process (express,http.createServer, a frameworklisten()) inside the sandbox. A server you start here is not routed by iii, is unreachable as an iii endpoint, and as a foreground process hangs the exec slot until it times out. If the task is "build an iii worker," the deliverable is registered functions plus a trigger, not a running server. - Not for long-lived services or durable state — the overlay is wiped on stop. Use a regular worker for daemons and
iii-statefor persistence. - Bootable images are catalog NAMES (
node,python, or an operator-registered custom image), never arbitrary OCI references. Discover the live set withsandbox::catalog::list; an unknown name fails fast. sandbox::execruns one command at a time per sandbox (serialized). A concurrent call is rejected, and waiting does NOT free the slot when the in-flight command is long-running or foreground (a server,npm install, a build) — it holds the slot until it exits. Run those in the background, or usesandbox::runin shell mode, or recover by replacing the sandbox (sandbox::stopthensandbox::create).sandbox::execis not a shell — for pipes,&&, redirects, or variable expansion usesandbox::runin shell mode, or wrap the command insh -c.- Requires host virtualization; boot failures on unsupported hosts are reported as errors, not silent hangs.
- Sandboxes are network-isolated by default; reaching host services is opt-in at create time — see
engine::functions::infoonsandbox::createfor how to enable it.
Functions
A map of what exists. For the arguments and response of any one, call engine::functions::info { function_id: "<id>" }.
sandbox::run— boot a VM, run a code snippet, capture output, and auto-stop, in one call.sandbox::create— boot a microVM you then drive with the lifecycle ops; returns the id every other op uses.sandbox::exec— run a single command inside a running sandbox.sandbox::stop— destroy a sandbox and reclaim its resources.sandbox::list— enumerate sandboxes currently running on this engine.sandbox::catalog::list— list bootable image names (bundled presets plus operator custom images).sandbox::fs::write— write a file into a sandbox.sandbox::fs::read— read a file out of a sandbox.sandbox::fs::ls— list the entries of a directory.sandbox::fs::stat— read metadata for a single path.sandbox::fs::mkdir— create a directory.sandbox::fs::rm— remove a file or directory.sandbox::fs::mv— move or rename a path.sandbox::fs::chmod— change a path's permissions (and optionally owner).sandbox::fs::grep— recursive regex search across files.sandbox::fs::sed— regex find-and-replace across files.
Every error comes back structured with a machine-readable hint describing how to fix it — read it and apply the fix before retrying, rather than re-sending the same call.
Вставить в README
Ссылка на карточку для вашего README — без картинок и счётчиков.
[DarkPlay: iii-sandbox](https://darkplay.ru/ai/skills/iii-hq-iii-iii-sandbox)
Из того же репозитория
Похожие скиллы и другие разделы каталога
Самые востребованные скиллов раздела по установкам и звёздам.
find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.Соседние разделы каталога: возможно, нужный инструмент живёт там.
ruflo-agentruvnet · Среды выполнения агентов: локальные агенты в песочнице WASM (rvagent) и Anthropic Claude…
togetherai-skillsanthropics · Навыки агента для платформы Together AI: инференс, обучение, эмбеддинги, аудио, видео…
context-modemksglu · MCP-плагин для Claude Code, экономящий 98% контекстного окна. Изолированное выполнение…
seatbelt-sandboxertrailofbits · Генерирует минимальные конфигурации песочницы macOS Seatbelt для приложений.
blaxelanthropics · Навык Blaxel для создания облачных песочниц (microVM) для запуска кода и dev-серверов.
claude-meta-skillsanthropics · Набор хуков надёжности: устаревший контекст Edit, защищённые пути, пустые записи…
codex-dispatchanthropics · Навык агента для Claude Code, гарантирующий корректную отправку каждого Codex MCP…
daytonaanthropics · Навык для создания и запуска песочниц на платформе Daytona.
guardanthropics · Хуки PreToolUse блокируют опасные shell-, git- и credential-команды до запуска.
healthclaw-guardrailsanthropics · HealthClaw Guardrails — слой безопасности между ИИ-агентами и клиническими данными FHIR…Лучшие ИИ-инструменты для программирования
Подборка нейросетей и ИИ-ассистентов для разработки и автоматизации кода. Сервисы, которые ускоряют написание, ревью и отладку, экономят часы рутины и снижают порог входа в сложные
GenAPIGenapi
Notepad++ AINotepad-plus-plus
Creatium MaxCremax
Emacs AIGnu
KiteKite
Amazon Q DeveloperAmazonЛучшие ИИ-инструменты для автоматизации и ассистентов
Подборка ИИ-ассистентов для автоматизации рутины и ускорения рабочих процессов. Сервисы, которые берут на себя переписку, анализ данных, ведение базы знаний и подготовку продаж, эк
Give Me Public
AITunnelAitunnel
STIVAStiva
Wikibot (Викибот)Wikibot
mymeet.aiMymeet
InsighterInsighter
TGHuntTghunt
LegiscanLegiscan
RouterAIRouterai
Wikibot 1.0 (Викибот)WikibotЛучшие ИИ-инструменты для генерации видео
Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,
VEED.IOVeed
MootionMootion
Sora (OpenAI)OpenAI
viralpulse.appViralpulse
Viral Maker AIViral-maker