Claude-skills cloudflare-agents
Build AI agents on Cloudflare Workers with MCP integration, tool use, and LLM providers.
install
source · Clone the upstream repo
git clone https://github.com/secondsky/claude-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/secondsky/claude-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/plugins/cloudflare-agents/skills/cloudflare-agents" ~/.claude/skills/secondsky-claude-skills-cloudflare-agents && rm -rf "$T"
manifest:
plugins/cloudflare-agents/skills/cloudflare-agents/SKILL.mdsource content
Cloudflare Agents
Last Updated: 2025-11-21
Quick Start
export 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())); } };
Core Features
- Tool Integration: Register and execute tools
- LLM Providers: OpenAI, Anthropic, Google Gemini
- MCP Protocol: Model Context Protocol support
- Cloudflare Bindings: D1, KV, R2, Durable Objects
Agent Pattern
const agent = { tools: [...], systemPrompt: 'You are a helpful assistant', model: 'gpt-4o', async run(input) { // Process with LLM } };
Resources
Core Documentation
(317 lines) - What is Cloudflare Agents, patterns & concepts, critical rules, known issues preventionreferences/patterns-concepts.md
(152 lines) - Complete configuration deep divereferences/configuration-guide.md
(115 lines) - Complete Agent Class API referencereferences/agent-api.md
Integration Guides
(74 lines) - HTTP & Server-Sent Eventsreferences/http-sse-guide.md
(110 lines) - WebSocket integrationreferences/websockets-guide.md
(388 lines) - State management, scheduled tasks, workflowsreferences/state-management.md
(130 lines) - Model Context Protocol integrationreferences/mcp-integration.md
Advanced Features
(637 lines) - Browser automation, RAG, AI model integration, calling agents, client APIsreferences/advanced-features.md
Error Reference
(10 lines) - Common errors and solutionsreferences/error-catalog.md
Templates
- Basic agent setuptemplates/basic-agent.ts
- Browser automationtemplates/browser-agent.ts
- Calling other agentstemplates/calling-agents-worker.ts
- Streaming chat agenttemplates/chat-agent-streaming.ts
- Human-in-the-looptemplates/hitl-agent.ts
- MCP server integrationtemplates/mcp-server-basic.ts
- RAG implementationtemplates/rag-agent.ts
- React client integrationtemplates/react-useagent-client.tsx
- Scheduled taskstemplates/scheduled-agent.ts
- State synchronizationtemplates/state-sync-agent.ts
- WebSocket agenttemplates/websocket-agent.ts
- Workflows integrationtemplates/workflow-agent.ts
- Wrangler configurationtemplates/wrangler-agents-config.jsonc
Official Docs: https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-agents/