Kv Hyperdrive
Use Cloudflare KV for eventually consistent global cache/config and Hyperdrive for existing Postgres/MySQL access from Workers. Use when deciding cache-aside patterns, TTLs, invalidation, external DB connectivity, and Node-compatible database drivers.
Install
npx skills add zllovesuki/cloudflare-agent-skills --skill kv-hyperdrivegit clone --depth 1 https://github.com/zllovesuki/cloudflare-agent-skills.git /tmp/cloudflare-agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/cloudflare-agent-skills/skills/kv-hyperdrive ~/.claude/skills/kv-hyperdrivePersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# KV and Hyperdrive
Use this skill for globally cached key/value data and for connecting Workers to existing relational databases.
## KV: when to use
Use KV for:
- Public configuration and feature flags.
- Cached API responses.
- Denormalized read models.
- Low-frequency writes with high read fan-out.
- Values that tolerate eventual consistency.
Do not use KV for:
- Locks.
- Counters that must be correct.
- Inventory, balances, bookings, or permissions requiring immediate consistency.
- Coordination between clients.
## KV cache-aside pattern
```ts
export interface Env {
CACHE: KVNamespace;
DB: D1Database;
}
export async function getPublicProject(env: Env, projectId: string) {
const key = `project:${projectId}:public:v1`;
const cached = await env.CACHE.get<ProjectSummary>(key, "json");
if (cached) return cached;
const project = await env.DB.prepare(
"SELECT id, name, description FROM projects WHERE id = ? AND public = 1"
).bind(projectId).first<ProjectSummary>();
if (project) {
await env.CACHE.put(key, JSON.stringify(project), { expirationTtl: 300 });
}
return project;
}
```
## KV invalidation strategy
- Use short TTLs for data that changes frequently.
- Include schema/version suffixes in keys, such as `:v1`.
- On writes, update source of truth first, then delete or replace cache.
- Design for stale reads; never rely on immediate global invalidation.
## Hyperdrive: when to use
Use Hyperdrive when:Details
- Skill name
kv-hyperdrive- Repository
- zllovesuki/cloudflare-agent-skills
- Path
skills/kv-hyperdrive/SKILL.md- Repo updated
- 28 April 2026
FAQ
What does the Kv Hyperdrive skill do?
Use Cloudflare KV for eventually consistent global cache/config and Hyperdrive for existing Postgres/MySQL access from Workers. Use when deciding cache-aside patterns, TTLs, invalidation, external DB connectivity, and Node-compatible database drivers.
How do I install the Kv Hyperdrive skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add zllovesuki/cloudflare-agent-skills --skill kv-hyperdrive. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Kv Hyperdrive popular?
It lives in zllovesuki/cloudflare-agent-skills, which has 9 GitHub stars and 0 forks.
Related skills
Agents
9zllovesuki/cloudflare-agent-skills
Build Cloudflare Agents SDK applications for autonomous multi-step tool use, AIChatAgent chat agents, Durable Object-backed state, tools, scheduling, callable methods, WebSockets, SQL state, and constrained agent behavior. Use when RAG or Workflows are not enough.
Cloudflare Architecture
9zllovesuki/cloudflare-agent-skills
Choose Cloudflare Developer Platform primitives and architecture shapes before writing code. Use for Cloudflare Workers, Durable Objects, D1, R2, Queues, Workflows, Containers, Realtime, Workers AI, Vectorize, AI Search, Agents, cost, limits, and migration decisions.
Containers
9zllovesuki/cloudflare-agent-skills
Decide when to use Cloudflare Containers instead of Workers and design container-backed workloads, native binaries, long-running processes, image processing, larger runtime shapes, and Worker frontends. Use as an escape hatch when Workers constraints do not fit.
Multi Tenant
9zllovesuki/cloudflare-agent-skills
Design multi-tenant Cloudflare applications with tenant isolation, D1 row/database boundaries, Durable Object-per-tenant patterns, R2 key prefixes, KV cache keys, authz, noisy-neighbor controls, and migration paths. Use for SaaS and platform code.
Durable Objects
9zllovesuki/cloudflare-agent-skills
Build Cloudflare Durable Objects for stateful coordination, one-per-entity actors, strong consistency, private SQLite-backed storage, RPC methods, WebSockets, alarms, sessions, rooms, rate limits, and collaborative state. Use when Workers code needs serialized state or race-free coordination.
Paddle Subscription Sync
9PaddleHQ/paddle-agent-skills
Mirror Paddle subscription and customer state into your database via webhooks — schema, upsert pattern, status semantics, scheduled changes, and access gating.
Browse the most popular Claude skills, all databases skills, or write your own with the skills generator.