Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Build AI agents with Cloudflare Agents SDK on Workers + Durable Objects. Provides WebSockets, state persistence, scheduling, and multi-agent coordination. Prevents 23 documented errors. Use when: building WebSocket agents, RAG with Vectorize, MCP servers, or troubleshooting "Agent class must extend", "new_sqlite_classes", binding errors, WebSocket payload limits.
.claude/skills/majiayu000-cloudflare-agents/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | -57% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -18% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -46% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -45% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -27% | 0% |
Last Updated: 2025-11-21
typescriptexport default { async fetch(request, env, ctx) { const agent = { tools: [ { name: 'getTodo', handler: async ({id}) => ({id, title: 'Task'}) } ], async run(input) { return await processWithLLM(input, this.tools); } }; return Response.json(await agent.run(await request.text())); } };
typescriptconst agent = { tools: [...], systemPrompt: 'You are a helpful assistant', model: 'gpt-4o', async run(input) { // Process with LLM } };
references/patterns-concepts.md (317 lines) - What is Cloudflare Agents, patterns & concepts, critical rules, known issues preventionreferences/configuration-guide.md (152 lines) - Complete configuration deep divereferences/agent-api.md (115 lines) - Complete Agent Class API referencereferences/http-sse-guide.md (74 lines) - HTTP & Server-Sent Eventsreferences/websockets-guide.md (110 lines) - WebSocket integrationreferences/state-management.md (388 lines) - State management, scheduled tasks, workflowsreferences/mcp-integration.md (130 lines) - Model Context Protocol integrationreferences/advanced-features.md (637 lines) - Browser automation, RAG, AI model integration, calling agents, client APIsreferences/error-catalog.md (10 lines) - Common errors and solutionstemplates/basic-agent.ts - Basic agent setuptemplates/browser-agent.ts - Browser automationtemplates/calling-agents-worker.ts - Calling other agentstemplates/chat-agent-streaming.ts - Streaming chat agenttemplates/hitl-agent.ts - Human-in-the-looptemplates/mcp-server-basic.ts - MCP server integrationtemplates/rag-agent.ts - RAG implementationtemplates/react-useagent-client.tsx - React client integrationtemplates/scheduled-agent.ts - Scheduled taskstemplates/state-sync-agent.ts - State synchronizationtemplates/websocket-agent.ts - WebSocket agenttemplates/workflow-agent.ts - Workflows integrationtemplates/wrangler-agents-config.jsonc - Wrangler configurationOfficial Docs: https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-agents/
Other measured skills in the registry, with their headline benchmark lift.