Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add secondsky/claude-skills --skill cloudflare-agentsgit clone --depth 1 https://github.com/secondsky/claude-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/secondsky/claude-skills/cloudflare-agents)<a href="https://agentmods.dev/skills/secondsky/claude-skills/cloudflare-agents"><img src="https://agentmods.dev/badge/skills/secondsky/claude-skills/cloudflare-agents/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/secondsky/claude-skills/cloudflare-agents"><img src="https://agentmods.dev/badge/skills/secondsky/claude-skills/cloudflare-agents.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
- Socket pass
- Snyk warn
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00024 | $0.00674 |
| Opus 5.5 | $0.00010 | $0.00270 |
| Sonnet 5.5 | $0.00005 | $0.00135 |
| Haiku 4.5 | $0.00002 | $0.00067 |
Grade A, and why
cloudflare-agents scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
async fetch(request, env, ctx) { How it starts
The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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 preventionreferences/configuration-guide.md(152 lines) - Complete configuration deep divereferences/agent-api.md(115 lines) - Complete Agent Class API reference
Integration Guides
references/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 integration
Advanced Features
references/advanced-features.md(637 lines) - Browser automation, RAG, AI model integration, calling agents, client APIs
Error Reference
references/error-catalog.md(10 lines) - Common errors and solutions
Templates
templates/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 configuration
What ships with it
22 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/advanced-features.md 14 KB
- references/agent-api.md 2.9 KB
- references/configuration-guide.md 3.1 KB
- references/error-catalog.md 275 B
- references/http-sse-guide.md 2.0 KB
- references/mcp-integration.md 2.7 KB
- references/patterns-concepts.md 11 KB
- references/state-management.md 9.5 KB
- references/websockets-guide.md 3.0 KB
- templates/basic-agent.ts 383 B runs code
- templates/browser-agent.ts 4.9 KB runs code
- templates/calling-agents-worker.ts 3.7 KB runs code
- templates/chat-agent-streaming.ts 1.5 KB runs code
- templates/hitl-agent.ts 6.6 KB runs code
- templates/mcp-server-basic.ts 4.0 KB runs code
- templates/rag-agent.ts 4.8 KB runs code
- templates/react-useagent-client.tsx 5.5 KB
- templates/scheduled-agent.ts 4.5 KB runs code
- templates/state-sync-agent.ts 3.9 KB runs code
- templates/websocket-agent.ts 4.1 KB runs code
- templates/workflow-agent.ts 3.8 KB runs code
- templates/wrangler-agents-config.jsonc 1.9 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 85 lines · 24 tokens per session scan A 3e73ecc57a89
cloudflare-agents is a skill published in the GitHub repository secondsky/claude-skills (257 stars, last pushed 8d ago), licensed MIT. It adds 24 tokens to every session and 674 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
cloudflare-agents compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cloudflare-agentssecondsky/claude-skills | Skill | 257 | 8d ago | MIT | A | 24 | Claude Code |
| imagegenopenai/codex | Skill | 137k | today | Apache-2.0 | A | 113 | Codex |
| playwright-climicrosoft/playwright | Skill | 101k | yesterday | Apache-2.0 | A | 19 | Claude Code |
| browser-automationopenclaw/openclaw | Skill | 395k | today | MIT | A | 36 | Claude Code |
| systematic-debuggingobra/superpowers | Skill | 330k | 2d ago | MIT | A | 21 | Claude Code |
| free-llm-apismnfst/awesome-free-llm-apis | Skill | 14k | yesterday | CC0-1.0 | A | 113 | Claude Code, Codex |
| next-cache-components-adoptionvercel/next.js | Skill | 144k | today | MIT | A | 95 | Claude Code |