From 7925650c66b346ae83b6e1469e5105223ac2f342 Mon Sep 17 00:00:00 2001 From: Elisabeth Rulke Date: Mon, 9 Nov 2026 11:33:41 -0800 Subject: [PATCH] [skills] Add the working directory and drive guidance to the vercel-sandbox summary --- skills/vercel-sandbox/SKILL.md | 2 +- skills/vercel-sandbox/overlay.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/skills/vercel-sandbox/SKILL.md b/skills/vercel-sandbox/SKILL.md index 934d3045..9f73bedf 100644 --- a/skills/vercel-sandbox/SKILL.md +++ b/skills/vercel-sandbox/SKILL.md @@ -1,7 +1,7 @@ --- name: vercel-sandbox description: Vercel Sandbox guidance — ephemeral Firecracker microVMs for running untrusted code safely. Supports AI agents, code generation, and experimentation. Use when executing user-generated or AI-generated code in isolation. -summary: "Run untrusted/AI-generated code in ephemeral Firecracker microVMs via @vercel/sandbox. Core loop: `const s = await Sandbox.create(); try { const r = await s.runCommand('python3', ['-c', code]); } finally { await s.stop(); }`. runCommand has no shell (wrap pipes/redirects in `bash -c`) and does not throw on non-zero exit (check r.exitCode). Default image is Ubuntu (`apt-get update` before install). Persistence is on by default (auto-snapshot on stop, resume by name; only the filesystem survives). For untrusted code use `networkPolicy: 'deny-all'`, a short `timeout`, and `persistent: false`. Credential brokering: a firewall `transform` injects a secret header on egress so the VM never holds it. AI agents reach models with no API key via the AI Gateway (`https://ai-gateway.vercel.sh`, `Authorization: Bearer $VERCEL_OIDC_TOKEN`) — the token is not auto-injected, so pass it via `env` or broker it. Full docs: https://vercel.com/docs/sandbox" +summary: "Run untrusted/AI-generated code in ephemeral Firecracker microVMs via @vercel/sandbox. Core loop: `const s = await Sandbox.create(); try { const r = await s.runCommand('python3', ['-c', code]); } finally { await s.stop(); }`. runCommand has no shell (wrap pipes/redirects in `bash -c`) and does not throw on non-zero exit (check r.exitCode). Default image is Ubuntu (`apt-get update` before install). Commands start in `/vercel` (also `HOME`), not `/vercel/sandbox`. Persistence is on by default (auto-snapshot on stop, resume by name; only the filesystem survives). Put repos, caches, and datasets on a drive (`mounts: { '/data': await Drive.getOrCreate({ name }) }`, one read-write mount, `drive.snapshot()` for read-only readers); keep snapshots for startup state. For untrusted code use `networkPolicy: 'deny-all'`, a short `timeout`, and `persistent: false`. Credential brokering: a firewall `transform` injects a secret header on egress so the VM never holds it. AI agents reach models with no API key via the AI Gateway (`https://ai-gateway.vercel.sh`, `Authorization: Bearer $VERCEL_OIDC_TOKEN`) — the token is not auto-injected, so pass it via `env` or broker it. Full docs: https://vercel.com/docs/sandbox" metadata: priority: 4 docs: diff --git a/skills/vercel-sandbox/overlay.yaml b/skills/vercel-sandbox/overlay.yaml index 85171f5d..b4a4f3b3 100644 --- a/skills/vercel-sandbox/overlay.yaml +++ b/skills/vercel-sandbox/overlay.yaml @@ -1,6 +1,6 @@ name: vercel-sandbox description: Vercel Sandbox guidance — ephemeral Firecracker microVMs for running untrusted code safely. Supports AI agents, code generation, and experimentation. Use when executing user-generated or AI-generated code in isolation. -summary: "Run untrusted/AI-generated code in ephemeral Firecracker microVMs via @vercel/sandbox. Core loop: `const s = await Sandbox.create(); try { const r = await s.runCommand('python3', ['-c', code]); } finally { await s.stop(); }`. runCommand has no shell (wrap pipes/redirects in `bash -c`) and does not throw on non-zero exit (check r.exitCode). Default image is Ubuntu (`apt-get update` before install). Persistence is on by default (auto-snapshot on stop, resume by name; only the filesystem survives). For untrusted code use `networkPolicy: 'deny-all'`, a short `timeout`, and `persistent: false`. Credential brokering: a firewall `transform` injects a secret header on egress so the VM never holds it. AI agents reach models with no API key via the AI Gateway (`https://ai-gateway.vercel.sh`, `Authorization: Bearer $VERCEL_OIDC_TOKEN`) — the token is not auto-injected, so pass it via `env` or broker it. Full docs: https://vercel.com/docs/sandbox" +summary: "Run untrusted/AI-generated code in ephemeral Firecracker microVMs via @vercel/sandbox. Core loop: `const s = await Sandbox.create(); try { const r = await s.runCommand('python3', ['-c', code]); } finally { await s.stop(); }`. runCommand has no shell (wrap pipes/redirects in `bash -c`) and does not throw on non-zero exit (check r.exitCode). Default image is Ubuntu (`apt-get update` before install). Commands start in `/vercel` (also `HOME`), not `/vercel/sandbox`. Persistence is on by default (auto-snapshot on stop, resume by name; only the filesystem survives). Put repos, caches, and datasets on a drive (`mounts: { '/data': await Drive.getOrCreate({ name }) }`, one read-write mount, `drive.snapshot()` for read-only readers); keep snapshots for startup state. For untrusted code use `networkPolicy: 'deny-all'`, a short `timeout`, and `persistent: false`. Credential brokering: a firewall `transform` injects a secret header on egress so the VM never holds it. AI agents reach models with no API key via the AI Gateway (`https://ai-gateway.vercel.sh`, `Authorization: Bearer $VERCEL_OIDC_TOKEN`) — the token is not auto-injected, so pass it via `env` or broker it. Full docs: https://vercel.com/docs/sandbox" metadata: priority: 4 docs: