cloudflare-kv
This skill streamlines setup and configuration of Cloudflare Workers KV storage namespaces, handling bindings and environment integration for Claude Code CLI. Part of a vetted collection of 142 production-ready skills designed for immediate deployment in Claude Code and Factory Droid environments.
cloudflare-kv streamlines the setup and configuration of Cloudflare Workers KV storage namespaces. To set up a KV namespace, you first create it using Wrangler with `wrangler kv:namespace create "my-namespace"`, then add the binding to your `wrangler.toml` file under the `[[kv_namespaces]]` section, specifying both the binding name and namespace ID. In your Worker code, access the namespace through the binding (e.g., `NAMESPACE.get()`, `NAMESPACE.put()`, `NAMESPACE.delete()`) to perform key-value operations. Proper bindings and environment integration ensure your namespace is correctly connected for immediate deployment in Claude Code and Factory Droid environments.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-25
cloudflare-kv streamlines the setup and configuration of Cloudflare Workers KV storage namespaces. To set up a KV namespace, you first create it using Wrangler with `wrangler kv:namespace create "my-namespace"`, then add the binding to your `wrangler.toml` file under the `[[kv_namespaces]]` section, specifying both the binding name and namespace ID. In your Worker code, access the namespace through the binding (e.g., `NAMESPACE.get()`, `NAMESPACE.put()`, `NAMESPACE.delete()`) to perform key-value operations. Proper bindings and environment integration ensure your namespace is correctly connected for immediate deployment in Claude Code and Factory Droid environments.
Use it when
- cloudflare-kv supports implementing caching and TTL patterns for API responses and temporary data.
- cloudflare-kv helps debug KV errors, rate limits, and eventual consistency issues that may arise in production.
Verify before relying
Read SKILL.md below before installing (31 files). Open directory: indexed for reading, not audited.
Install
secondsky/claude-skills/cloudflare-kv · repository language: TypeScript
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I set up a KV namespace in Cloudflare Workers?
cloudflare-kv streamlines the setup and configuration of Cloudflare Workers KV storage namespaces. To set up a KV namespace, you first create it using Wrangler with `wrangler kv:namespace create "my-namespace"`, then add the binding to your `wrangler.toml` file under the `[[kv_namespaces]]` section, specifying both the binding name and namespace ID. In your Worker code, access the namespace through the binding (e.g., `NAMESPACE.get()`, `NAMESPACE.put()`, `NAMESPACE.delete()`) to perform key-value operations. Proper bindings and environment integration ensure your namespace is correctly connected for immediate deployment in Claude Code and Factory Droid environments.
What is the best way to implement caching with TTL expiration in KV?
cloudflare-kv supports implementing caching and TTL patterns for API responses and temporary data. When storing data, use the `expirationTtl` parameter in your `put()` call to set an automatic expiration time in seconds—for example, `await NAMESPACE.put(key, value, { expirationTtl: 3600 })` caches data for one hour. This pattern is ideal for API response caching, session tokens, and temporary computation results. By leveraging TTL expiration, you reduce storage costs and ensure stale data is automatically removed without manual cleanup, making your edge caching strategy both efficient and maintainable.
How do I troubleshoot KV rate limiting and 429 errors?
cloudflare-kv helps debug KV errors, rate limits, and eventual consistency issues that may arise in production. Rate limiting (HTTP 429 errors) typically occurs when you exceed Cloudflare's request limits per namespace. To troubleshoot, implement exponential backoff retry logic in your Worker, batch multiple operations where possible, and distribute requests across multiple namespaces if your workload permits. Monitor your request patterns and consider caching frequently accessed keys in memory within your Worker to reduce KV calls. If errors persist, verify your namespace quota and review Cloudflare's current rate limit documentation for your plan tier.
What are the key limits and best practices for optimizing KV performance?
cloudflare-kv optimizes KV performance and helps you understand limits, quotas, and best practices for production use. Key limits include a 25MB maximum value size per key, eventual consistency across Cloudflare's global network, and rate limits that vary by plan. Best practices include: batch operations to reduce round trips, use metadata storage patterns for indexing, implement pagination with cursors when listing keys, and design your schema to avoid hot keys. For session management and edge caching of API responses, structure your data to minimize lookups and leverage TTL expiration to keep your namespace lean and performant.
How do I handle eventual consistency issues in KV storage?
cloudflare-kv addresses eventual consistency issues that arise because KV is a globally distributed, eventually consistent store. After a write operation, the new value may not be immediately available at all edge locations; reads may temporarily return stale or missing data. To handle this, design your application to tolerate brief inconsistencies—for example, add a small retry delay or cache-aside pattern. For critical data, consider using Cloudflare D1 (a distributed SQL database) instead of KV, or structure your workflow so that immediate read-after-write consistency is not required. Document your consistency expectations and test failover scenarios to ensure your Worker behaves correctly during propagation delays.
How do I migrate from other storage solutions to Cloudflare KV?
cloudflare-kv facilitates migration from other storage solutions to Cloudflare KV by providing clear setup and configuration guidance. Begin by exporting your existing data in a format compatible with KV (key-value pairs), then use a migration Worker or script to batch-import data using `put()` operations, respecting the 25MB value limit. Create a new KV namespace alongside your existing storage, run a parallel test phase to validate data integrity, then gradually shift traffic to KV. Plan for eventual consistency during the transition—reads may hit the old system briefly while KV propagates globally. This phased approach minimizes downtime and lets you verify performance before fully committing to KV as your primary store.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
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
```bash bunx wrangler kv namespace create MY_NAMESPACE bunx wrangler kv namespace create MY_NAMESPACE
(truncated - see the full file via the links below)
File tree — 15 files
plugins/cloudflare-kv/skills/cloudflare-kv/SKILL.md
plugins/cloudflare-kv/skills/cloudflare-kv/agents/kv-debugger.md
plugins/cloudflare-kv/skills/cloudflare-kv/agents/kv-optimizer.md
plugins/cloudflare-kv/skills/cloudflare-kv/commands/optimize-kv.md
plugins/cloudflare-kv/skills/cloudflare-kv/commands/setup-kv.md
plugins/cloudflare-kv/skills/cloudflare-kv/commands/test-kv.md
plugins/cloudflare-kv/skills/cloudflare-kv/examples/api-caching/index.ts
plugins/cloudflare-kv/skills/cloudflare-kv/examples/api-caching/wrangler.jsonc
plugins/cloudflare-kv/skills/cloudflare-kv/examples/config-management/index.ts
plugins/cloudflare-kv/skills/cloudflare-kv/examples/config-management/wrangler.jsonc
plugins/cloudflare-kv/skills/cloudflare-kv/examples/rate-limiting/index.ts
plugins/cloudflare-kv/skills/cloudflare-kv/examples/rate-limiting/wrangler.jsonc
plugins/cloudflare-kv/skills/cloudflare-kv/examples/session-management/index.ts
plugins/cloudflare-kv/skills/cloudflare-kv/examples/session-management/wrangler.jsonc
plugins/cloudflare-kv/skills/cloudflare-kv/references/best-practices.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Set up and configure Cloudflare Workers KV namespaces with proper bindings”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
This skill guides you through building production edge APIs with Cloudflare Workers, KV storage for caching and state, and Durable Objects for real-time coordination. It covers request routing, CORS handling, geohash-based caching patterns, IP rate limiting, and wrangler configuration to deploy across environments.
Cloudflare Expert provides in-depth knowledge for building serverless applications on Cloudflare's edge platform. Learn to deploy code globally with Workers, optimize caching and CDN performance, implement security features like WAF and DDoS protection, and manage distributed state using Workers KV and Durable Objects.
This skill covers development patterns and architectural guidance for Cloudflare's edge platform, including Workers for compute, Pages for frontend hosting, KV for caching, D1 for databases, R2 for object storage, and Durable Objects for stateful coordination. Learn optimization techniques, security practices, and configuration strategies to build performant serverless applications at the edge.
This skill equips you to build and deploy serverless functions directly on Cloudflare's global edge infrastructure using JavaScript or TypeScript. Execute compute workloads with minimal latency by leveraging Cloudflare's distributed network, ideal for APIs, middleware, and real-time request handling.
Cloudflare R2 provides production-ready patterns for S3-compatible object storage within Workers. Configure buckets and bindings, then use core APIs like put(), get(), delete(), and list() to manage files, with built-in support for multipart uploads, presigned URLs, CORS, and metadata handling.
Cloudflare Manager automates deployment and configuration of Workers, KV Storage, R2 buckets, Pages, DNS records, and routing through Cloudflare's API. It validates credentials, extracts deployment URLs, and provides clear error messages for troubleshooting common setup issues.
More skills Cloudflare Worker (NOASSERTION) · Nuxthub (unlicensed) · cloudflare-zero-trust-access (MIT)