Agent skill · software engineering · secondsky

cloudflare-kv

Cloudflare Workers KV global key-value storage. Use for namespaces, caching, TTL, or encountering KV_ERROR, 429 rate limits, consistency issues.

Why this skill is useful

Provides specific commands and best practices for using Cloudflare Workers KV that the AI wouldn't reliably generate on its own.

What it needs

Requires bun, wrangler installed locally. Requires cloudflare account access. About 5k tokens when loaded. Last updated 2026-08-06. 204 stars on the source repository.

What this skill does

Cloudflare Workers KV Status: Production Ready ✅ Last Verified: 2025-12-27 --- What Is Workers KV? Global key-value storage on Cloudflare edge: Eventually consistent Low latency worldwide 1GB+ values supported TTL expiration Metadata support --- Quick Start (5 Minutes) 1. Create KV Namespace 2. Configure Binding 3. Basic Operations Load references/setup-guide.md for complete setup. --- KV API Methods put() - Write get() - Read delete() - Remove list() - List Keys --- Critical Rules Always Do ✅ 1. Use TTL for temporary data 2. Handle null (key might not exist) 3. Use metadata for small data 4. Paginate lists (max 1000 keys) 5. Use prefixes for organization 6. Cache in Worker (avoid multiple KV calls) 7. Use waitUntil() for async writes 8. Handle eventual consistency 9. Monitor rate limits 10. Use JSON.stringify for objects Never Do ❌ 1. Never assume instant consistency 2. Never exceed 25MB per value 3. Never list all keys without pagination 4. Never skip error handling 5. Never use for real-time data 6. Never exceed rate limits (1000 writes/second) 7. Never store secrets unencrypted 8. Never use as database (no transactions) 9. Never ignore metadata limits (1024 bytes) 10. Never skip TTL for temporary data --- Common Use Cases Use Case 1: API Response Caching Use Case 2: User Preferences Use Case 3: Rate Limiting Use Case 4: List with Prefix Use Case 5: waitUntil() Pattern --- Limits (Summary) Key Limits: Key size: 512 bytes max Value size: 25 MB max Metadata: 1024 bytes max Rate Limits: Writes: 1000/sec per key List: 100/sec per namespace Reads: Unlimited For detailed limits, pricing, and optimization strategies, load references/limits-quotas.md --- Eventual Consistency KV is eventually consistent: Writes propagate globally (~60 seconds) Not suitable for real-time data Use D1 for strong consistency Pattern: --- When to Load References Load specific reference files based on task context: For Setup & Configuration: Load references/setup-guide.md when creating namespac …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills secondsky/cloudflare-kv

View the source on GitHub

Browse the @skills marketplace