/agent-dev:cloudflare-codemodefrom agent-dev
Builds and runs sandboxed agent tools using @cloudflare/codemode. Connects Worker sandboxes, Durable Objects, OpenAPI, and MCP servers for safe agent code execution.
Ships in agent-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Build, configure, and operate sandboxed tool execution for AI agents using Cloudflare Code Mode (@cloudflare/codemode). Code Mode enables agents to execute dynamic JavaScript/TypeScript inside isolated Worker or browser sandboxes, calling typed host connectors without leaking secrets or direct host authority.
@cloudflare/codemode.McpConnector, OpenApiConnector).createCodemodeRuntime).@cloudflare/codemode/ai), TanStack AI (@cloudflare/codemode/tanstack-ai), or MCP tools.createCodemodeRuntime):
Runs inside a Cloudflare Durable Object to manage execution states, audit logs, and runtime facets.CodemodeConnector):
Bridge host-side capabilities into sandbox globals. Built-in connectors include McpConnector, OpenApiConnector, and ToolSetConnector.Executor):
Isolated execution engines:
DynamicWorkerExecutor: Ephemeral V8/Worker sandbox running generated code with strict CPU/memory limits.IframeSandboxExecutor: Browser-side sandboxed iframe for client-side tool execution.npm install @cloudflare/codemode
# For AI SDK or framework adapters:
npm install @cloudflare/codemode/ai @ai-sdk/openai ai
import { DurableObject } from "cloudflare:workers";
import { createCodemodeRuntime, DynamicWorkerExecutor, McpConnector } from "@cloudflare/codemode";
export class AgentRuntimeDO extends DurableObject {
private runtime;
constructor(ctx: DurableObjectState, env: Env) {
super(ctx, env);
this.runtime = createCodemodeRuntime({
ctx,
name: "agent-session",
maxExecutions: 50,
connectors: [
new McpConnector({
name: "tools",
client: mcpClientInstance,
}),
],
executor: new DynamicWorkerExecutor({
env,
limits: { cpuMs: 5000, subrequests: 10 },
}),
transformResult: (result) => {
// Redact internal pointers before returning to LLM
return typeof result === "object" ? { ...result, _internal: undefined } : result;
},
});
}
async executeCode(code: string) {
return await this.runtime.run({ code });
}
}
import { createCodeTool } from "@cloudflare/codemode/ai";
export const sandboxTool = createCodeTool({
runtime: runtimeHandle,
name: "run_sandboxed_code",
description: "Execute sandboxed JavaScript code with access to configured connectors (e.g. tools.*).",
});
codemode.DynamicWorkerExecutor limits (CPU milliseconds and subrequest quotas) match workload boundaries.runtime.getExecutions() to verify non-leaking error traces.codemode.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub siddu1004/sfp --plugin agent-dev104 skills in this plugin
/agent-architecture-auditFull-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack./agent-developmentThis skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins./agent-evalOther plugins' skills for the same job