[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CTDWHERCXPQCP0K03A86AS":3,"skill-same:01M7CTDWHERCXPQCP0K03A86AS":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7CTDWHERCXPQCP0K03A86AS","vercel-sandbox",null,"Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"microVM Chrome\", \"agent-browser in sandbox\", \"browser automation on Vercel\", or any task requiring Chrome in a Vercel Sandbox.","YYC-Cube\u002FYYC3-Knowledge-Base","YYC-Cube","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235006543?v=4","01M79J2PH4SWD2X0825X6PN748","yyc3","01M79J2PHVK3F6ZBYT8K2SCZCW",1,"MIT","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fvercel-sandbox\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: vercel-sandbox\ndescription: Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"microVM Chrome\", \"agent-browser in sandbox\", \"browser automation on Vercel\", or any task requiring Chrome in a Vercel Sandbox.\n---\n\n# Browser Automation with Vercel Sandbox\n\nRun agent-browser + headless Chrome inside ephemeral Vercel Sandbox microVMs. A Linux VM spins up on demand, executes browser commands, and shuts down. Works with any Vercel-deployed framework (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.).\n\n## Dependencies\n\n```bash\npnpm add @vercel\u002Fsandbox\n```\n\nThe sandbox VM needs system dependencies for Chromium plus agent-browser itself. Use sandbox snapshots (below) to pre-install everything for sub-second startup.\n\n## Core Pattern\n\n```ts\nimport { Sandbox } from \"@vercel\u002Fsandbox\";\n\n\u002F\u002F System libraries required by Chromium on the sandbox VM (Amazon Linux \u002F dnf)\nconst CHROMIUM_SYSTEM_DEPS = [\n  \"nss\", \"nspr\", \"libxkbcommon\", \"atk\", \"at-spi2-atk\", \"at-spi2-core\",\n  \"libXcomposite\", \"libXdamage\", \"libXrandr\", \"libXfixes\", \"libXcursor\",\n  \"libXi\", \"libXtst\", \"libXScrnSaver\", \"libXext\", \"mesa-libgbm\", \"libdrm\",\n  \"mesa-libGL\", \"mesa-libEGL\", \"cups-libs\", \"alsa-lib\", \"pango\", \"cairo\",\n  \"gtk3\", \"dbus-libs\",\n];\n\nfunction getSandboxCredentials() {\n  if (\n    process.env.VERCEL_TOKEN &&\n    process.env.VERCEL_TEAM_ID &&\n    process.env.VERCEL_PROJECT_ID\n  ) {\n    return {\n      token: process.env.VERCEL_TOKEN,\n      teamId: process.env.VERCEL_TEAM_ID,\n      projectId: process.env.VERCEL_PROJECT_ID,\n    };\n  }\n  return {};\n}\n\nasync function withBrowser\u003CT>(\n  fn: (sandbox: InstanceType\u003Ctypeof Sandbox>) => Promise\u003CT>,\n): Promise\u003CT> {\n  const snapshotId = process.env.AGENT_BROWSER_SNAPSHOT_ID;\n  const credentials = getSandboxCredentials();\n\n  const sandbox = snapshotId\n    ? await Sandbox.create({\n        ...credentials,\n        source: { type: \"snapshot\", snapshotId },\n        timeout: 120_000,\n      })\n    : await Sandbox.create({ ...credentials, runtime: \"node24\", timeout: 120_000 });\n\n  if (!snapshotId) {\n    await sandbox.runCommand(\"sh\", [\n      \"-c\",\n      `sudo dnf clean all 2>&1 && sudo dnf install -y --skip-broken ${CHROMIUM_SYSTEM_DEPS.join(\" \")} 2>&1 && sudo ldconfig 2>&1`,\n    ]);\n    await sandbox.runCommand(\"npm\", [\"install\", \"-g\", \"agent-browser\"]);\n    await sandbox.runCommand(\"npx\", [\"agent-browser\", \"install\"]);\n  }\n\n  try {\n    return await fn(sandbox);\n  } finally {\n    await sandbox.stop();\n  }\n}\n```\n\n## Screenshot\n\nThe `screenshot --json` command saves to a file and returns the path. Read the file back as base64:\n\n```ts\nexport async function screenshotUrl(url: string) {\n  return withBrowser(async (sandbox) => {\n    await sandbox.runCommand(\"agent-browser\", [\"open\", url]);\n\n    const titleResult = await sandbox.runCommand(\"agent-browser\", [\n      \"get\", \"title\", \"--json\",\n    ]);\n    const title = JSON.parse(await titleResult.stdout())?.data?.title || url;\n\n    const ssResult = await sandbox.runCommand(\"agent-browser\", [\n      \"screenshot\", \"--json\",\n    ]);\n    const ssPath = JSON.parse(await ssResult.stdout())?.data?.path;\n    const b64Result = await sandbox.runCommand(\"base64\", [\"-w\", \"0\", ssPath]);\n    const screenshot = (await b64Result.stdout()).trim();\n\n    await sandbox.runCommand(\"agent-browser\", [\"close\"]);\n\n    return { title, screenshot };\n  });\n}\n```\n\n## Accessibility Snapshot\n\n```ts\nexport async function snapshotUrl(url: string) {\n  return withBrowser(async (sandbox) => {\n    await sandbox.runCommand(\"agent-browser\", [\"open\", url]);\n\n    const titleResult = await sandbox.runCommand(\"agent-browser\", [\n      \"get\", \"title\", \"--json\",\n    ]);\n    const title = JSON.parse(await titleResult.stdout())?.data?.title || url;\n\n    const snapResult = await sandbox.runCommand(\"agent-browser\", [\n      \"snapshot\", \"-i\", \"-c\",\n    ]);\n    const snapshot = await snapResult.stdout();\n\n    await sandbox.runCommand(\"agent-browser\", [\"close\"]);\n\n    return { title, snapshot };\n  });\n}\n```\n\n## Multi-Step Workflows\n\nThe sandbox persists between commands, so you can run full automation sequences:\n\n```ts\nexport async function fillAndSubmitForm(url: string, data: Record\u003Cstring, string>) {\n  return withBrowser(async (sandbox) => {\n    await sandbox.runCommand(\"agent-browser\", [\"open\", url]);\n\n    const snapResult = await sandbox.runCommand(\"agent-browser\", [\n      \"snapshot\", \"-i\",\n    ]);\n    const snapshot = await snapResult.stdout();\n    \u002F\u002F Parse snapshot to find element refs...\n\n    for (const [ref, value] of Object.entries(data)) {\n      await sandbox.runCommand(\"agent-browser\", [\"fill\", ref, value]);\n    }\n\n    await sandbox.runCommand(\"agent-browser\", [\"click\", \"@e5\"]);\n    await sandbox.runCommand(\"agent-browser\", [\"wait\", \"--load\", \"networkidle\"]);\n\n    const ssResult = await sandbox.runCommand(\"agent-browser\", [\n      \"screenshot\", \"--json\",\n    ]);\n    const ssPath = JSON.parse(await ssResult.stdout())?.data?.path;\n    const b64Result = await sandbox.runCommand(\"base64\", [\"-w\", \"0\", ssPath]);\n    const screenshot = (await b64Result.stdout()).trim();\n\n    await sandbox.runCommand(\"agent-browser\", [\"close\"]);\n\n    return { screenshot };\n  });\n}\n```\n\n## Sandbox Snapshots (Fast Startup)\n\nA **sandbox snapshot** is a saved VM image of a Vercel Sandbox with system dependencies + agent-browser + Chromium already installed. Think of it like a Docker image -- instead of installing dependencies from scratch every time, the sandbox boots from the pre-built image.\n\nThis is unrelated to agent-browser's *accessibility snapshot* feature (`agent-browser snapshot`), which dumps a page's accessibility tree. A sandbox snapshot is a Vercel infrastructure concept for fast VM startup.\n\nWithout a sandbox snapshot, each run installs system deps + agent-browser + Chromium (~30s). With one, startup is sub-second.\n\n### Creating a sandbox snapshot\n\nThe snapshot must include system dependencies (via `dnf`), agent-browser, and Chromium:\n\n```ts\nimport { Sandbox } from \"@vercel\u002Fsandbox\";\n\nconst CHROMIUM_SYSTEM_DEPS = [\n  \"nss\", \"nspr\", \"libxkbcommon\", \"atk\", \"at-spi2-atk\", \"at-spi2-core\",\n  \"libXcomposite\", \"libXdamage\", \"libXrandr\", \"libXfixes\", \"libXcursor\",\n  \"libXi\", \"libXtst\", \"libXScrnSaver\", \"libXext\", \"mesa-libgbm\", \"libdrm\",\n  \"mesa-libGL\", \"mesa-libEGL\", \"cups-libs\", \"alsa-lib\", \"pango\", \"cairo\",\n  \"gtk3\", \"dbus-libs\",\n];\n\nasync function createSnapshot(): Promise\u003Cstring> {\n  const sandbox = await Sandbox.create({\n    runtime: \"node24\",\n    timeout: 300_000,\n  });\n\n  await sandbox.runCommand(\"sh\", [\n    \"-c\",\n    `sudo dnf clean all 2>&1 && sudo dnf install -y --skip-broken ${CHROMIUM_SYSTEM_DEPS.join(\" \")} 2>&1 && sudo ldconfig 2>&1`,\n  ]);\n  await sandbox.runCommand(\"npm\", [\"install\", \"-g\", \"agent-browser\"]);\n  await sandbox.runCommand(\"npx\", [\"agent-browser\", \"install\"]);\n\n  const snapshot = await sandbox.snapshot();\n  return snapshot.snapshotId;\n}\n```\n\nRun this once, then set the environment variable:\n\n```bash\nAGENT_BROWSER_SNAPSHOT_ID=snap_xxxxxxxxxxxx\n```\n\nA helper script is available in the demo app:\n\n```bash\nnpx tsx examples\u002Fenvironments\u002Fscripts\u002Fcreate-snapshot.ts\n```\n\nRecommended for any production deployment using the Sandbox pattern.\n\n## Authentication\n\nOn Vercel deployments, the Sandbox SDK authenticates automatically via OIDC. For local development or explicit control, set:\n\n```bash\nVERCEL_TOKEN=\u003Cpersonal-access-token>\nVERCEL_TEAM_ID=\u003Cteam-id>\nVERCEL_PROJECT_ID=\u003Cproject-id>\n```\n\nThese are spread into `Sandbox.create()` calls. When absent, the SDK falls back to `VERCEL_OIDC_TOKEN` (automatic on Vercel).\n\n## Scheduled Workflows (Cron)\n\nCombine with Vercel Cron Jobs for recurring browser tasks:\n\n```ts\n\u002F\u002F app\u002Fapi\u002Fcron\u002Froute.ts  (or equivalent in your framework)\nexport async function GET() {\n  const result = await withBrowser(async (sandbox) => {\n    await sandbox.runCommand(\"agent-browser\", [\"open\", \"https:\u002F\u002Fexample.com\u002Fpricing\"]);\n    const snap = await sandbox.runCommand(\"agent-browser\", [\"snapshot\", \"-i\", \"-c\"]);\n    await sandbox.runCommand(\"agent-browser\", [\"close\"]);\n    return await snap.stdout();\n  });\n\n  \u002F\u002F Process results, send alerts, store data...\n  return Response.json({ ok: true, snapshot: result });\n}\n```\n\n```json\n\u002F\u002F vercel.json\n{ \"crons\": [{ \"path\": \"\u002Fapi\u002Fcron\", \"schedule\": \"0 9 * * *\" }] }\n```\n\n## Environment Variables\n\n| Variable | Required | Description |\n|---|---|---|\n| `AGENT_BROWSER_SNAPSHOT_ID` | No (but recommended) | Pre-built sandbox snapshot ID for sub-second startup (see above) |\n| `VERCEL_TOKEN` | No | Vercel personal access token (for local dev; OIDC is automatic on Vercel) |\n| `VERCEL_TEAM_ID` | No | Vercel team ID (for local dev) |\n| `VERCEL_PROJECT_ID` | No | Vercel project ID (for local dev) |\n\n## Framework Examples\n\nThe pattern works identically across frameworks. The only difference is where you put the server-side code:\n\n| Framework | Server code location |\n|---|---|\n| Next.js | Server actions, API routes, route handlers |\n| SvelteKit | `+page.server.ts`, `+server.ts` |\n| Nuxt | `server\u002Fapi\u002F`, `server\u002Froutes\u002F` |\n| Remix | `loader`, `action` functions |\n| Astro | `.astro` frontmatter, API routes |\n\n## Example\n\nSee `examples\u002Fenvironments\u002F` in the agent-browser repo for a working app with the Vercel Sandbox pattern, including a sandbox snapshot creation script, streaming progress UI, and rate limiting.\n","# Browser Automation with Vercel Sandbox\n\nRun agent-browser + headless Chrome inside ephemeral Vercel Sandbox microVMs. A Linux VM spins up on demand, executes browser commands, and shuts down. Works with any Vercel-deployed framework (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.).\n\n## Dependencies\n\n```bash\npnpm add @vercel\u002Fsandbox\n```\n\nThe sandbox VM needs system dependencies for Chromium plus agent-browser itself. Use sandbox snapshots (below) to pre-install everything for sub-second startup.\n\n## Core Pattern\n\n```ts\nimport { Sandbox } from \"@vercel\u002Fsandbox\";\n\n\u002F\u002F System libraries required by Chromium on the sandbox VM (Amazon Linux \u002F dnf)\nconst CHROMIUM_SYSTEM_DEPS = [\n  \"nss\", \"nspr\", \"libxkbcommon\", \"atk\", \"at-spi2-atk\", \"at-spi2-core\",\n  \"libXcomposite\", \"libXdamage\", \"libXrandr\", \"libXfixes\", \"libXcursor\",\n  \"libXi\", \"libXtst\", \"libXScrnSaver\", \"libXext\", \"mesa-libgbm\", \"libdrm\",\n  \"mesa-libGL\", \"mesa-libEGL\", \"cups-libs\", \"alsa-lib\", \"pango\", \"cairo\",\n  \"gtk3\", \"dbus-libs\",\n];\n\nfunction getSandboxCredentials() {\n  if (\n    process.env.VERCEL_TOKEN &&\n    process.env.VERCEL_TEAM_ID &&\n    process.env.VERCEL_PROJECT_ID\n  ) {\n    return {\n      token: process.env.VERCEL_TOKEN,\n      teamId: process.env.VERCEL_TEAM_ID,\n      projectId: process.env.VERCEL_PROJECT_ID,\n    };\n  }\n  return {};\n}\n\nasync function withBrowser\u003CT>(\n  fn: (sandbox: InstanceType\u003Ctypeof Sandbox>) => Promise\u003CT>,\n): Promise\u003CT> {\n  const snapshotId = process.env.AGENT_BROWSER_SNAPSHOT_ID;\n  const credentials = getSandboxCredentials();\n\n  const sandbox = snapshotId\n    ? await Sandbox.create({\n        ...credentials,\n        source: { type: \"snapshot\", snapshotId },\n        timeout: 120_000,\n      })\n    : await Sandbox.create({ ...credentials, runtime: \"node24\", timeout: 120_000 });\n\n  if (!snapshotId) {\n    await sandbox.runCommand(\"sh\", [\n      \"-c\",\n      `sudo dnf clean all 2>&1 && sudo dnf install -y --skip-broken ${CHROMIUM_SYSTEM_DEPS.join(\" \")} 2>&1 && sudo ldconfig 2>&1`,\n    ]);\n    await sandbox.runCommand(\"npm\", [\"install\", \"-g\", \"agent-browser\"]);\n    await sandbox.runCommand(\"npx\", [\"agent-browser\", \"install\"]);\n  }\n\n  try {\n    return await fn(sandbox);\n  } finally {\n    await sandbox.stop();\n  }\n}\n```\n\n## Screenshot\n\nThe `screenshot --json` command saves to a file and returns the path. Read the file back as base64:\n\n```ts\nexport async function screenshotUrl(url: string) {\n  return withBrowser(async (sandbox) => {\n    await sandbox.runCommand(\"agent-browser\", [\"open\", url]);\n\n    const titleResult = await sandbox.runCommand(\"agent-browser\", [\n      \"get\", \"title\", \"--json\",\n    ]);\n    const title = JSON.parse(await titleResult.stdout())?.data?.title || url;\n\n    const ssResult = await sandbox.runCommand(\"agent-browser\", [\n      \"screenshot\", \"--json\",\n    ]);\n    const ssPath = JSON.parse(await ssResult.stdout())?.data?.path;\n    const b64Result = await sandbox.runCommand(\"base64\", [\"-w\", \"0\", ssPath]);\n    const screenshot = (await b64Result.stdout()).trim();\n\n    await sandbox.runCommand(\"agent-browser\", [\"close\"]);\n\n    return { title, screenshot };\n  });\n}\n```\n\n## Accessibility Snapshot\n\n```ts\nexport async function snapshotUrl(url: string) {\n  return withBrowser(async (sandbox) => {\n    await sandbox.runCommand(\"agent-browser\", [\"open\", url]);\n\n    const titleResult = await sandbox.runCommand(\"agent-browser\", [\n      \"get\", \"title\", \"--json\",\n    ]);\n    const title = JSON.parse(await titleResult.stdout())?.data?.title || url;\n\n    const snapResult = await sandbox.runCommand(\"agent-browser\", [\n      \"snapshot\", \"-i\", \"-c\",\n    ]);\n    const snapshot = await snapResult.stdout();\n\n    await sandbox.runCommand(\"agent-browser\", [\"close\"]);\n\n    return { title, snapshot };\n  });\n}\n```\n\n## Multi-Step Workflows\n\nThe sandbox persists between commands, so you can run full automation sequences:\n\n```ts\nexport async function fillAndSubmitForm(url: string, data: Record\u003Cstring, string>) {\n  return withBrowser(async (sandbox) => {\n    await sandbox.runCommand(\"agent-browser\", [\"open\", url]);\n\n    const snapResult = await sandbox.runCommand(\"agent-browser\", [\n      \"snapshot\", \"-i\",\n    ]);\n    const snapshot = await snapResult.stdout();\n    \u002F\u002F Parse snapshot to find element refs...\n\n    for (const [ref, value] of Object.entries(data)) {\n      await sandbox.runCommand(\"agent-browser\", [\"fill\", ref, value]);\n    }\n\n    await sandbox.runCommand(\"agent-browser\", [\"click\", \"@e5\"]);\n    await sandbox.runCommand(\"agent-browser\", [\"wait\", \"--load\", \"networkidle\"]);\n\n    const ssResult = await sandbox.runCommand(\"agent-browser\", [\n      \"screenshot\", \"--json\",\n    ]);\n    const ssPath = JSON.parse(await ssResult.stdout())?.data?.path;\n    const b64Result = await sandbox.runCommand(\"base64\", [\"-w\", \"0\", ssPath]);\n    const screenshot = (await b64Result.stdout()).trim();\n\n    await sandbox.runCommand(\"agent-browser\", [\"close\"]);\n\n    return { screenshot };\n  });\n}\n```\n\n## Sandbox Snapshots (Fast Startup)\n\nA **sandbox snapshot** is a saved VM image of a Vercel Sandbox with system dependencies + agent-browser + Chromium already installed. Think of it like a Docker image -- instead of installing dependencies from scratch every time, the sandbox boots from the pre-built image.\n\nThis is unrelated to agent-browser's *accessibility snapshot* feature (`agent-browser snapshot`), which dumps a page's accessibility tree. A sandbox snapshot is a Vercel infrastructure concept for fast VM startup.\n\nWithout a sandbox snapshot, each run installs system deps + agent-browser + Chromium (~30s). With one, startup is sub-second.\n\n### Creating a sandbox snapshot\n\nThe snapshot must include system dependencies (via `dnf`), agent-browser, and Chromium:\n\n```ts\nimport { Sandbox } from \"@vercel\u002Fsandbox\";\n\nconst CHROMIUM_SYSTEM_DEPS = [\n  \"nss\", \"nspr\", \"libxkbcommon\", \"atk\", \"at-spi2-atk\", \"at-spi2-core\",\n  \"libXcomposite\", \"libXdamage\", \"libXrandr\", \"libXfixes\", \"libXcursor\",\n  \"libXi\", \"libXtst\", \"libXScrnSaver\", \"libXext\", \"mesa-libgbm\", \"libdrm\",\n  \"mesa-libGL\", \"mesa-libEGL\", \"cups-libs\", \"alsa-lib\", \"pango\", \"cairo\",\n  \"gtk3\", \"dbus-libs\",\n];\n\nasync function createSnapshot(): Promise\u003Cstring> {\n  const sandbox = await Sandbox.create({\n    runtime: \"node24\",\n    timeout: 300_000,\n  });\n\n  await sandbox.runCommand(\"sh\", [\n    \"-c\",\n    `sudo dnf clean all 2>&1 && sudo dnf install -y --skip-broken ${CHROMIUM_SYSTEM_DEPS.join(\" \")} 2>&1 && sudo ldconfig 2>&1`,\n  ]);\n  await sandbox.runCommand(\"npm\", [\"install\", \"-g\", \"agent-browser\"]);\n  await sandbox.runCommand(\"npx\", [\"agent-browser\", \"install\"]);\n\n  const snapshot = await sandbox.snapshot();\n  return snapshot.snapshotId;\n}\n```\n\nRun this once, then set the environment variable:\n\n```bash\nAGENT_BROWSER_SNAPSHOT_ID=snap_xxxxxxxxxxxx\n```\n\nA helper script is available in the demo app:\n\n```bash\nnpx tsx examples\u002Fenvironments\u002Fscripts\u002Fcreate-snapshot.ts\n```\n\nRecommended for any production deployment using the Sandbox pattern.\n\n## Authentication\n\nOn Vercel deployments, the Sandbox SDK authenticates automatically via OIDC. For local development or explicit control, set:\n\n```bash\nVERCEL_TOKEN=\u003Cpersonal-access-token>\nVERCEL_TEAM_ID=\u003Cteam-id>\nVERCEL_PROJECT_ID=\u003Cproject-id>\n```\n\nThese are spread into `Sandbox.create()` calls. When absent, the SDK falls back to `VERCEL_OIDC_TOKEN` (automatic on Vercel).\n\n## Scheduled Workflows (Cron)\n\nCombine with Vercel Cron Jobs for recurring browser tasks:\n\n```ts\n\u002F\u002F app\u002Fapi\u002Fcron\u002Froute.ts  (or equivalent in your framework)\nexport async function GET() {\n  const result = await withBrowser(async (sandbox) => {\n    await sandbox.runCommand(\"agent-browser\", [\"open\", \"https:\u002F\u002Fexample.com\u002Fpricing\"]);\n    const snap = await sandbox.runCommand(\"agent-browser\", [\"snapshot\", \"-i\", \"-c\"]);\n    await sandbox.runCommand(\"agent-browser\", [\"close\"]);\n    return await snap.stdout();\n  });\n\n  \u002F\u002F Process results, send alerts, store data...\n  return Response.json({ ok: true, snapshot: result });\n}\n```\n\n```json\n\u002F\u002F vercel.json\n{ \"crons\": [{ \"path\": \"\u002Fapi\u002Fcron\", \"schedule\": \"0 9 * * *\" }] }\n```\n\n## Environment Variables\n\n| Variable | Required | Description |\n|---|---|---|\n| `AGENT_BROWSER_SNAPSHOT_ID` | No (but recommended) | Pre-built sandbox snapshot ID for sub-second startup (see above) |\n| `VERCEL_TOKEN` | No | Vercel personal access token (for local dev; OIDC is automatic on Vercel) |\n| `VERCEL_TEAM_ID` | No | Vercel team ID (for local dev) |\n| `VERCEL_PROJECT_ID` | No | Vercel project ID (for local dev) |\n\n## Framework Examples\n\nThe pattern works identically across frameworks. The only difference is where you put the server-side code:\n\n| Framework | Server code location |\n|---|---|\n| Next.js | Server actions, API routes, route handlers |\n| SvelteKit | `+page.server.ts`, `+server.ts` |\n| Nuxt | `server\u002Fapi\u002F`, `server\u002Froutes\u002F` |\n| Remix | `loader`, `action` functions |\n| Astro | `.astro` frontmatter, API routes |\n\n## Example\n\nSee `examples\u002Fenvironments\u002F` in the agent-browser repo for a working app with the Vercel Sandbox pattern, including a sandbox snapshot creation script, streaming progress UI, and rate limiting.\n",{"name":5,"description":7},"main","87afe6ce96220accf50a345dea46784c8c9f210e","YYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fvercel-sandbox",0,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base","https:\u002F\u002Fkb.yyc3.top\u002F","https:\u002F\u002Fgithub.com\u002FYYC-Cube","万象归元于云枢 | 深栈智启新纪元","2026-11-10 10:37:32",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill vercel-sandbox",{"tool":39,"command":40},"bunx","bunx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill vercel-sandbox",{"tool":42,"command":43},"pnpm","pnpm dlx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill vercel-sandbox","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fvercel-sandbox\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7CTD8D2BNJY54S65M47HEJA","slack","Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include \"check my Slack\", \"what channels have unreads\", \"send a message to\", \"search Slack for\", \"extract from Slack\", \"find who said\", or any task requiring programmatic Slack interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fslack\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7CTCSSB8ZP3Q58C3YZDZK1W","electron","Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include \"automate Slack app\", \"control VS Code\", \"interact with Discord app\", \"test this Electron app\", \"connect to desktop app\", or any task requiring automation of a native Electron application.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Felectron\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7CTCBJY76688V4DCZGWFHGQ","dogfood","Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to \"dogfood\", \"QA\", \"exploratory test\", \"find issues\", \"bug hunt\", \"test this app\u002Fsite\u002Fplatform\", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fdogfood\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7CTC4H0FFGVEAQR9PA4GA1A","agent-browser","Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to \"open a website\", \"fill out a form\", \"click a button\", \"take a screenshot\", \"scrape data from a page\", \"test this web app\", \"login to a site\", \"automate browser actions\", or any task requiring programmatic web interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fagent-browser\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7CTBKVFYBG78FDSABSDJTTQ","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn\u002Fui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for \"shadcn init\", \"create an app with --preset\", \"switch to --preset\", and for building a design system or applying a DESIGN.md or brand spec to shadcn\u002Fui.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-UI-界面组件\u002FYYC3-UI-界面组件-ui\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7CTBG2B6WQATMN8EZ11YE3E","migrate-radix-to-base","Migrates React projects and components from Radix UI to Base UI. Use when asked to migrate from radix, move to base-ui, convert radix primitives, or switch a shadcn project's base library. Handles single components (\"migrate accordion\") and whole projects.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-UI-界面组件\u002FYYC3-UI-界面组件-ui\u002Fskills\u002Fmigrate-radix-to-base\u002FSKILL.md",[],[]]