Agent skill · AI & Agents

building-ai-agent-on-cloudflare

Builds AI agents on Cloudflare using the Agents SDK with state management, real-time WebSockets, scheduled tasks, tool integration, and chat capabilities. Generates production-ready agent code deployed to Workers. Use when: user wants to "build an agent", "AI agent", "chat agent", "stateful agent", mentions "Agents SDK", needs "real-time AI", "WebSocket AI", or asks about agent "state management", "scheduled tasks", or "tool calling".

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill building-ai-agent-on-cloudflare --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 9 KB
Bundled scripts: none
Path: skills/agent/building-ai-agent-on-cloudflare/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Building Cloudflare Agents Creates AI-powered agents using Cloudflare's Agents SDK with persistent state, real-time communication, and tool integration. ## When to Use - User wants to build an AI agent or chatbot - User needs stateful, real-time AI interactions - User asks about the Cloudflare Agents SDK - User wants scheduled tasks or background AI work - User needs WebSocket-based AI communication ## Prerequisites - Cloudflare account with Workers enabled - Node.js 18+ and npm/pnpm/yarn - Wrangler CLI (`npm install -g wrangler`) ## Quick Start ```bash npm create cloudflare@latest -- my-agent --template=cloudflare/agents-starter cd my-agent npm start ``` Agent runs at `http://localhost:8787` ## Core Concepts ### What is an Agent? An Agent is a stateful, persistent AI service that: - Maintains state across requests and reconnections - Communicates via WebSockets or HTTP - Runs on Cloudflare's edge via Durable Objects - Can schedule tasks and call tools - Scales horizontally (each user/session gets own instance) ### Agent Lifecycle ``` Client connects → Agent.onConnect() → Agent processes messages → Agent.onMessage() → Agent.setState() (persists + syncs) Client disconnects → State

What's inside
Steps it walks through
  1. When to Use
  2. Prerequisites
  3. Quick Start
  4. Core Concepts
  5. What is an Agent?
  6. Agent Lifecycle
  7. Basic Agent Structure
  8. Entry Point Configuration
  9. Wrangler Configuration
  10. State Management
  11. Reading State
  12. Updating State
  13. SQL Storage
  14. Scheduled Tasks
Ships with 1 file
  • metadata.json
Commands it runs
npm create cloudflare@latest -- my-agent --template=cloudflare/agents-starter
cd my-agent
npm start
Deploy
npx wrangler deploy
View logs
wrangler tail
Test endpoint
curl https://my-agent.workers.dev/agents/MyAgent/test-user
More from claude-skill-registry
All skills →
About this skill
What does the building-ai-agent-on-cloudflare skill do?

Builds AI agents on Cloudflare using the Agents SDK with state management, real-time WebSockets, scheduled tasks, tool integration, and chat capabilities. Generates production-ready agent code deployed to Workers. Use when: user wants to "build an agent", "AI agent", "chat agent", "stateful agent", mentions "Agents SDK", needs "real-time AI", "WebSocket AI", or asks about agent "state management", "scheduled tasks", or "tool calling".

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill building-ai-agent-on-cloudflare --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going