secondsky avatar

Cloudflare Agents

This is Cloudflare's official framework for building AI agents that run on Workers. You get tool registration, streaming responses, and bindings for D1, KV, R2, and Durable Objects baked in. The documentation is comprehensive with 13 templates covering everything from basic agents to browser automation, RAG, and MCP integration. It supports OpenAI, Anthropic, and Google models out of the box. If you're already on Cloudflare's platform and want to build agentic workflows without managing separate infrastructure, this gives you a batteries-included approach. The state management and workflow guides are especially thorough at 388 and 637 lines respectively, which suggests they've thought through the hard parts of running stateful agents at the edge.

skills.sh installs
389
GitHub stars
248
last updated
Aug 21, 2026

Install

$ npx -y skills add secondsky/claude-skills --skill cloudflare-agents --agent claude-code

Installs into .claude/skills of the current project.

Files

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

  • references/patterns-concepts.md (317 lines) - What is Cloudflare Agents, patterns & concepts, critical rules, known issues prevention
  • references/configuration-guide.md (152 lines) - Complete configuration deep dive
  • references/agent-api.md (115 lines) - Complete Agent Class API reference

Sponsors

Details

Repository
github.com/secondsky/claude-skills
Categories
DevOps & CI/CD, AI & Agent Building, Cloud & Infrastructure
First seen
Jun 3, 2026

More from secondsky/claude-skills

All 146
1secondsky avatarcloudflare-mcp-serversecondsky/claude-skillsBuild MCP (Model Context Protocol) servers on Cloudflare Workers with tools, resources, and prompts.388skills.sh installs
2ancoleman avatarcreating-dashboardsancoleman/ai-design-componentsCreates comprehensive dashboard and analytics interfaces that combine data visualization, KPI cards, real-time updates, and interactive layouts. Use this skill 387skills.sh installs
3syncfusion avatarsyncfusion-blazor-diagramsyncfusion/blazor-ui-components-skillsBuild and troubleshoot Syncfusion Blazor diagrams using SfDiagramComponent. Trigger for flowcharts, org charts, mind maps, BPMN, UML sequence, swimlanes, symbol387skills.sh installs
4zenmux avatarzenmux-contextzenmux/skillsAnswer ZenMux questions by reading the latest official docs. Use for product features, APIs, integration, pricing, models/providers, routing, fallback, streamin387skills.sh installs
5levnikolaevich avatarln-774-healthcheck-setuplevnikolaevich/claude-code-skillsConfigures health check endpoints for Kubernetes readiness/liveness/startup probes. Use when deploying to Kubernetes.385skills.sh installs
6pluginagentmarketplace avatarjava-gradlepluginagentmarketplace/custom-plugin-javaMaster Gradle - Kotlin DSL, task configuration, build optimization, caching385skills.sh installs