ory-e2b-sandbox

A guide for creating an E2B sandbox template with Ory already installed. E2B provides isolated cloud environments where code or agents can run.

In plain words
What is it for?
Use it to publish a reusable sandbox image for Claude, Codex, Gemini, OpenClaw, or OpenCode sessions.
Why use it?
New sandboxes start with authentication, permission checks, and activity recording already set up.

Skill for Claude CodeCodex

Part of the ory-agent-plugin plugin — 10 skills, 3 commands, 9 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ory/claude-plugins/ory-e2b-sandbox
Any agent
npx skills add ory/claude-plugins --skill ory-e2b-sandbox
Clone the repo
git clone --depth 1 https://github.com/ory/claude-plugins

Made for: Claude Code, Codex.

Or install ory-agent-plugin, the plugin that ships this one along with the rest of its 10 skills, 3 commands, 9 hooks, 1 MCP server.

Per session 138 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,150 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00138 $0.02150
Opus 5 $0.00069 $0.01075
Sonnet 5 $0.00028 $0.00430
Haiku 4.5 $0.00014 $0.00215

Measured 3d ago against content hash 7b796bfc8128, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

ory-e2b-sandbox scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

.runCmd("curl -fsSL https://deb.nodesource.com/setup_20.x | bash -")

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

.aptInstall(["curl", "ca-certificates", "git", "python3"])
plugins/ory-agent-plugin/skills/ory-e2b-sandbox/SKILL.md · 225 lines

How it starts

The opening of the file, as written. The whole thing — 225 lines — stays where its author put it; the contents beside it link to each section on GitHub.

E2B sandbox with Ory agent security

You are helping the user scaffold an E2B sandbox template that preinstalls and registers the @ory/claude-code plugin. The resulting template publishes a named image; every Sandbox.create("<tag>") call from their SDK gets a runtime where the agent's tool calls are already authenticated against Ory Identities, authorized against Ory Permissions, and recorded as structured activity events — with no install step at sandbox boot.

This skill carries the full workflow and the file contents. You generate the files in the user's repo; the user runs the build.

Precondition: the user has (or will obtain) an E2B_API_KEY and has installed the E2B CLI / SDK (npm install e2b dotenv). If they haven't, point them at https://e2b.dev/docs and stop — do not fabricate credentials.

Step 1 — Confirm the target

Before writing files, confirm with the user:

  1. Where in their repo should the integration live? A common choice is integrations/e2b/ at the repo root. Use that unless they say otherwise.
  2. Template tag. Default to agent-ory (e.g. claude-code-ory, codex-ory). Operators will reference this string in Sandbox.create().
  3. Will the sandbox have network access to Ory? It must — the plugin makes live API calls to ORY_PROJECT_URL from inside the sandbox.

If the user is targeting an in-process harness (OpenClaw, OpenCode), the host binary that loads the plugin must also be available inside the sandbox. Flag this and ask how they ship that binary today — usually npm install of a project that already depends on the harness runtime.

Step 2 — Generate the files

Create these four files at the chosen location (the example uses integrations/e2b/).

integrations/e2b/template.ts

import { Template } from "e2b";

export const template = Template()
  .fromUbuntuImage("22.04")
  .aptInstall(["curl", "ca-certificates", "git", "python3"])

  // Node.js 20 (NodeSource)
  .runCmd("curl -fsSL https://deb.nodesource.com/setup_20.x | bash -")
  .aptInstall(["nodejs"])

  // Install the harness CLI globally. Replace `@anthropic-ai/claude-code` with
  // the binary that hosts the Ory plugin in this sandbox (e.g. the Codex or
  // Gemini CLI). For in-process harnesses (openclaw, opencode), `npm install`
  // the harness runtime here instead and ensure its entrypoint is on PATH.
  .npmInstall(["@anthropic-ai/claude-code"], { g: true })

  // Install the Ory plugin into the harness's discovery location.
  .setWorkdir("/root")
  .runCmd("npx -y -p @ory/claude-code ory-claude install")

  // Sandbox runtime defaults. Per-tenant secrets (project URL, tokens, client
  // IDs) MUST be passed at Sandbox.create() time, never baked into the image.
  .setEnvs({
    ORY_PERMISSION_NAMESPACE: "AgentTool",
    ORY_AGENT_DEBUG: "true",
    ORY_AGENT_LOG_FILE: "/root/ory-agent-debug.log",
  })

  .setWorkdir("/workspace");

Read the full file on GitHub · 225 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 225 lines · 138 tokens per session scan C 7b796bfc8128

Subscribe to this mod's changes

ory-e2b-sandbox is a skill published in the GitHub repository ory/claude-plugins (3 stars, last pushed 3d ago), licensed Apache-2.0. It adds 138 tokens to every session and 2,150 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

deploy-docker-compose

Run the Omnigent server as a Docker compose stack (server + Postgres) on any Docker host — your laptop, a VPS, EC2 by hand, or as the base layer of any container-platform deploy. Invoke when the user wants to build the image, bring up the compose stack, debug the stack on a host they already have, or extend the stack…

omnigent-ai/omnigent · 84 tokens

reproduce-issue

The single skill for reproducing an nx issue. Given a GitHub issue number (human entry) OR explicit repro parameters (agent entry), it runs the reproduction ENTIRELY inside an isolated Docker sandbox — gVisor on Linux, the Docker VM on macOS — so the untrusted repro's install scripts and commands never execute on the…

nrwl/nx · 91 tokens

timoni

Use when deploying applications to Kubernetes with Timoni. Covers installing and upgrading module instances from OCI registries, composing multi-app deployments with bundles, injecting values from clusters or CI with runtimes, targeting multiple clusters, and authoring, testing, signing and publishing modules with CUE.

stefanprodan/timoni · 59 tokens

atmos-aws-ecr

AWS ECR commands in Atmos: atmos aws ecr login, ECR auth integrations, Docker credential writes, registry login via identity or explicit registry.

cloudposse/atmos · 36 tokens

windows-builder

Build Windows images with Packer using WinRM communicator and PowerShell provisioners. Use when creating Windows AMIs, Azure images, or VMware templates.

hashicorp/agent-skills · 33 tokens

release-openclaw-plugin-testing

Plan and run pre-release OpenClaw plugin validation across bundled plugins, package artifacts, lifecycle commands, doctor/fix, config round-trip, gateway startup, SDK compatibility, Docker E2E, Package Acceptance, and Testbox proof.

openclaw/openclaw · 54 tokens