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-workers-runtime-apisgit 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-workers-runtime-apis)<a href="https://agentmods.dev/skills/secondsky/claude-skills/cloudflare-workers-runtime-apis"><img src="https://agentmods.dev/badge/skills/secondsky/claude-skills/cloudflare-workers-runtime-apis/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-workers-runtime-apis"><img src="https://agentmods.dev/badge/skills/secondsky/claude-skills/cloudflare-workers-runtime-apis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 3 findings, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Data Exfiltration · line 28 Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
- medium Data Exfiltration · line 31 Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
- medium Data Exfiltration · line 31 Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
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.00054 | $0.02122 |
| Opus 5.5 | $0.00022 | $0.00849 |
| Sonnet 5.5 | $0.00011 | $0.00424 |
| Haiku 4.5 | $0.00005 | $0.00212 |
Grade B, and why
cloudflare-workers-runtime-apis scanned grade B with 2 findings 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.
Sends data to an external URLmediumData exfiltration
A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.
const postResponse = await fetch('https://api.example.com/users', { method: 'POST', Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
async fetch(request: Request, env: Env): Promise<Response> { How it starts
The opening of the file, as written. The whole thing — 291 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cloudflare Workers Runtime APIs
Master the Workers runtime APIs: Fetch, Streams, Crypto, Cache, WebSockets, and text encoding.
Quick Reference
| API | Purpose | Common Use |
|---|---|---|
| Fetch | HTTP requests | External APIs, proxying |
| Streams | Data streaming | Large files, real-time |
| Crypto | Cryptography | Hashing, signing, encryption |
| Cache | Response caching | Performance optimization |
| WebSockets | Real-time connections | Chat, live updates |
| Encoding | Text encoding | UTF-8, Base64 |
Quick Start: Fetch API
export default {
async fetch(request: Request, env: Env): Promise<Response> {
// Basic fetch
const response = await fetch('https://api.example.com/data');
// With options
const postResponse = await fetch('https://api.example.com/users', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${env.API_KEY}`,
},
body: JSON.stringify({ name: 'John' }),
});
// Clone for multiple reads
const clone = response.clone();
const json = await response.json();
const text = await clone.text();
return Response.json(json);
}
};
Critical Rules
- Always set timeouts for external requests - Workers have a 30s limit, external APIs can hang
- Clone responses before reading body - Body can only be read once
- Use streaming for large payloads - Don't buffer entire response in memory
- Cache external API responses - Reduce latency and API costs
- Handle Crypto operations in try/catch - Invalid inputs throw errors
- WebSocket hibernation for cost - Use Durable Objects with hibernation
Top 10 Errors Prevented
| Error | Symptom | Prevention |
|---|---|---|
| Body already read | TypeError: Body has already been consumed |
Clone response before reading |
| Fetch timeout | Request hangs, worker times out | Use AbortController with timeout |
| Invalid JSON | SyntaxError: Unexpected token |
Check content-type before parsing |
| Stream locked | TypeError: ReadableStream is locked |
Don't read stream multiple times |
| Crypto key error | DOMException: Invalid keyData |
Validate key format and algorithm |
| Cache miss | Returns undefined instead of response |
Check cache before returning |
| WebSocket close | Connection drops unexpectedly | Handle close event, implement reconnect |
| Encoding error | TypeError: Invalid code point |
Use TextEncoder/TextDecoder properly |
| CORS blocked | Browser rejects response | Add proper CORS headers |
| Request size | 413 Request Entity Too Large |
Stream large uploads |
What ships with it
10 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/cache-api.md 6.9 KB
- references/crypto-api.md 8.7 KB
- references/encoding-api.md 7.4 KB
- references/fetch-api.md 8.5 KB
- references/streams-api.md 8.9 KB
- references/websockets.md 8.7 KB
- templates/crypto-operations.ts 9.7 KB runs code
- templates/fetch-patterns.ts 8.6 KB runs code
- templates/stream-processing.ts 8.8 KB runs code
- templates/websocket-handler.ts 8.6 KB runs code
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 · 291 lines · 54 tokens per session scan B f4a3c1bed4b3
cloudflare-workers-runtime-apis is a skill published in the GitHub repository secondsky/claude-skills (257 stars, last pushed 8d ago), licensed MIT. It adds 54 tokens to every session and 2,122 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
cloudflare-workers-runtime-apis compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cloudflare-workers-runtime-apissecondsky/claude-skills | Skill | 257 | 8d ago | MIT | B | 54 | Claude Code |
| imagegenopenai/codex | Skill | 137k | today | Apache-2.0 | A | 113 | Codex |
| playwright-climicrosoft/playwright | Skill | 101k | today | 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 |