comeonoliver/skillshub/cloudflare-workers-runtime-apis
Claude Code and agent skill by comeonoliver/skillshub
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Cloudflare Workers Runtime APIs including Fetch, Streams, Crypto, Cache, WebSockets, and Encoding. Use for HTTP requests, streaming, encryption, caching, real-time connections, or encountering API compatibility, response handling, stream processing errors.
Install
npx vskill@latest install comeonoliver/skillshub/cloudflare-workers-runtime-apisSKILL.md
The same SKILL.md was published earlier as comeonoliver/skillshub/cloudflare-workers-runtime-apis.
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
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 |
Fetch API Patterns
With Timeout
With Retry
Streams API
Transform Stream
Stream Large Response
Crypto API
Hashing
HMAC Signing
Cache API
WebSockets (Durable Objects)
When to Load References
Load specific references based on the task:
- Making HTTP requests? → Load
references/fetch-api.mdfor timeout, retry, proxy patterns - Processing large data? → Load
references/streams-api.mdfor TransformStream, chunking - Encryption/signing? → Load
references/crypto-api.mdfor AES, RSA, JWT verification - Caching responses? → Load
references/cache-api.mdfor Cache API patterns, TTL strategies - Real-time features? → Load
references/websockets.mdfor WebSocket patterns, Durable Objects - Text encoding? → Load
references/encoding-api.mdfor TextEncoder, Base64, Unicode
Templates
| Template | Purpose | Use When | |
|---|---|---|---|
templates/fetch-patterns.ts | HTTP request utilities | Building API clients | |
templates/stream-processing.ts | Stream transformation | Processing large files | |
templates/crypto-operations.ts | Crypto utilities | Signing, hashing, encryption | |
templates/websocket-handler.ts | WebSocket DO | Real-time applications |
Resources
- Runtime APIs: https://developers.cloudflare.com/workers/runtime-apis/
- Fetch API: https://developers.cloudflare.com/workers/runtime-apis/fetch/
- Streams API: https://developers.cloudflare.com/workers/runtime-apis/streams/
- Web Crypto: https://developers.cloudflare.com/workers/runtime-apis/web-crypto/
- Cache API: https://developers.cloudflare.com/workers/runtime-apis/cache/
- WebSockets: https://developers.cloudflare.com/workers/runtime-apis/websockets/
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/secondsky/claude-skills/cloudflare-workers-runtime-apis/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/comeonoliver/skillshub/cloudflare-workers-runtime-apis)