iii-sandbox
Ce qu’il fait
Ce skill exécute du code dans des machines virtuelles isolées de courte durée, pour que du code d'origine inconnue ne puisse pas toucher à votre système principal. Il s'adresse aux développeurs qui créent des agents ou des outils IA exécutant du code qu'ils n'ont pas écrit.
Quand l’utiliser
- ✓Quand un agent doit exécuter du code auquel vous ne faites pas entièrement confiance.
- ✓Quand vous voulez tester un extrait dans un environnement propre qui est ensuite jeté.
- ✓Quand vous avez besoin de plusieurs commandes ou modifications de fichiers dans un même bac à sable isolé.
Lien du skill
https://github.com/iii-hq/iii/blob/main/crates/iii-worker/src/sandbox_daemon/skills/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Exécute cet extrait Python non fiable dans un bac à sable isolé et montre-moi la sortie.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
Le skill démarre une petite machine virtuelle, exécute le code ou les commandes à l'intérieur, et renvoie la sortie. Pour un travail en plusieurs étapes, le bac à sable reste actif entre les appels, puis il est arrêté et ses fichiers temporaires sont supprimés.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
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: enable iii-sandbox under engine.workers (or the five-worker allowlist of a
directly supervised engine), and provide 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 the Composehttpworker; 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. Declare a long-lived worker as a Compose
containerinstead 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 the Composehttpworker) — 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 the Compose
stateworker for persistence. - Bootable images are catalog NA
Questions fréquentes
Quels ordinateurs peuvent le faire tourner ?
Les Mac à puce Apple Silicon, ou les machines Linux avec virtualisation matérielle. Les Mac Intel et Windows ne peuvent pas démarrer ces bacs à sable.
Conserve-t-il mes fichiers ensuite ?
Non. Le système de fichiers temporaire est supprimé lorsque le bac à sable s'arrête.
Dois-je connaître les détails des fonctions ?
Non. Le skill récupère les arguments exacts de chaque fonction auprès du moteur avant de l'appeler.
Détails
Description originale de l’auteur
Ephemeral microVM sandboxes for running untrusted or agent-generated code in isolation — a one-call run path, a create/exec/stop lifecycle, and a set of filesystem operations.
repo: iii-hq/iii
Popularité
- Étoiles GitHub
- 19k
- Position au classement
- #10485
- Licence
- —
- Mis à jour
- 02/11/2026
Commentaires
- …
Autres skills de ce dépôt
configuration
19kPermet à votre agent de mettre en place un registre partagé de valeurs de configuration nommées, vérifiées par un schéma, pour que les workers puissent les lire et réagir aux changements.
iii
19kApprend à votre agent comment fonctionnent les workers iii, pour qu'il puisse ajouter une capacité en vérifiant d'abord ce qui existe déjà, puis en construisant un worker.
iii-observability
19kAide votre agent à ajouter du traçage, des journaux structurés, des métriques et des alertes à un moteur iii, à l'aide d'OpenTelemetry, pour voir ce qui se passe.
iii-stream
19kExplique le worker iii-stream pour les flux de données en direct. Il est déprécié et sera supprimé dans une prochaine version, il faut donc prévoir de s'en détacher.
Skills similaires
diffs
394kPermet à votre agent de produire un diff réel et partageable de vos modifications, sous forme de lien ou d'image, plutôt qu'un résumé écrit à la main.
coding-agent
394kAide votre agent à confier une tâche de programmation plus importante à Codex, Claude Code ou OpenCode comme travailleur en arrière-plan, puis à suivre sa progression.
gh-issues
394kAide votre agent à trouver des tickets GitHub, choisir ceux à traiter et ouvrir des pull requests avec des correctifs, y compris le suivi des commentaires de relecture.