secondsky avatar

Cloudflare Workers Runtime Apis

A comprehensive reference for the core runtime APIs you'll use in every Cloudflare Workers project. Covers fetch with timeout and retry patterns, streaming transforms for large payloads, crypto operations like SHA-256 and HMAC signing, cache API usage with waitUntil, WebSocket handling through Durable Objects with hibernation, and text encoding. The real value is in the error prevention table that shows you how to avoid the ten most common mistakes, like trying to read response bodies twice or forgetting to set fetch timeouts before hitting the 30 second worker limit. Load this when you're debugging stream locks, setting up caching, or implementing real-time connections.

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

Install

$ npx -y skills add secondsky/claude-skills --skill cloudflare-workers-runtime-apis --agent claude-code

Installs into .claude/skills of the current project.

Files

Cloudflare Workers Runtime APIs

Master the Workers runtime APIs: Fetch, Streams, Crypto, Cache, WebSockets, and text encoding.

Quick Reference

APIPurposeCommon Use
FetchHTTP requestsExternal APIs, proxying
StreamsData streamingLarge files, real-time
CryptoCryptographyHashing, signing, encryption
CacheResponse cachingPerformance optimization
WebSocketsReal-time connectionsChat, live updates
EncodingText encodingUTF-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' }),
    });

Sponsors

Details

Repository
github.com/secondsky/claude-skills
Categories
Backend & APIs, Security, Cloud & Infrastructure, Finance & Trading
First seen
Jun 3, 2026

More from secondsky/claude-skills

All 146
1secondsky avatarswift-best-practicessecondsky/claude-skills| This skill should be used when writing or reviewing Swift code for iOS or macOS projects. Apply modern Swift 6+ best practices, concurrency patterns, API desi326skills.sh installs
2vinayakkulkarni avatarnuxt-best-practicesvinayakkulkarni/vue-nuxt-best-practicesNuxt 4 performance optimization and architecture guidelines (current through Nuxt 4.5) for building fast, maintainable full-stack applications. This skill shoul325skills.sh installs
3checkly avatarchecklycheckly/checkly-cliSet up, create, test and manage monitoring checks using the Checkly CLI. Use when working with API Checks, Browser Checks, URL Monitors, ICMP Monitors, Playwrig321skills.sh installs
4fanzhidongyzby avatarserper-scholarfanzhidongyzby/openclaw-serper使用 Google Scholar API 进行学术搜索,查找论文、研究报告、学术文献,获取引用信息、作者、发表刊物等详细信息。321skills.sh installs
5secondsky avatarcloudflare-workers-frameworkssecondsky/claude-skillsFramework integration for Cloudflare Workers. Use when building with Hono, Remix, Next.js, Astro, SvelteKit, Qwik, or Nuxt on Workers. Covers routing, SSR, stat321skills.sh installs
6dfinity avatarhttps-outcallsdfinity/icskillsMake HTTPS requests from canisters to external web APIs. Covers transform functions for consensus, cycle cost management, response size limits, and idempotency 317skills.sh installs