Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/secondsky/claude-skills/cloudflare-hyperdrivenpx skills add secondsky/claude-skills --skill cloudflare-hyperdrivegit clone --depth 1 https://github.com/secondsky/claude-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/secondsky/claude-skills/cloudflare-hyperdrive)<a href="https://agentmods.dev/skills/secondsky/claude-skills/cloudflare-hyperdrive"><img src="https://agentmods.dev/badge/skills/secondsky/claude-skills/cloudflare-hyperdrive.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00045 | $0.01853 |
| Opus 5 | $0.00023 | $0.00927 |
| Sonnet 5 | $0.00009 | $0.00371 |
| Haiku 4.5 | $0.00005 | $0.00185 |
Grade A, and why
cloudflare-hyperdrive scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
async fetch(request, env, ctx) { How it starts
The opening of the file, as written. The whole thing — 306 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cloudflare Hyperdrive
Status: Production Ready ✅ | Last Verified: 2025-11-18
What Is Hyperdrive?
Connect Workers to existing PostgreSQL/MySQL databases:
- Global connection pooling
- Query caching
- Reduced latency
- Works with node-postgres, postgres.js, mysql2
Quick Start (5 Minutes)
1. Create Hyperdrive Config
bunx wrangler hyperdrive create my-db \
--connection-string="postgres://user:pass@host:5432/database"
Save the id!
2. Configure Binding
{
"name": "my-worker",
"main": "src/index.ts",
"compatibility_date": "2024-09-23",
"compatibility_flags": ["nodejs_compat"], // REQUIRED!
"hyperdrive": [
{
"binding": "HYPERDRIVE",
"id": "<ID_FROM_STEP_1>"
}
]
}
3. Install Driver
bun add pg # or postgres, or mysql2
4. Query Database
import { Client } from 'pg';
export default {
async fetch(request, env, ctx) {
const client = new Client({ connectionString: env.HYPERDRIVE.connectionString });
await client.connect();
const result = await client.query('SELECT * FROM users LIMIT 10');
await client.end();
return Response.json(result.rows);
}
};
Load references/setup-guide.md for complete walkthrough.
Critical Rules
Always Do ✅
- Enable nodejs_compat flag (required!)
- Use env.HYPERDRIVE.connectionString (not original DB string)
- Close connections after queries
- Handle errors explicitly
- Use connection pooling (built-in)
- Test locally with wrangler dev
- Monitor query performance
- Use prepared statements
- Enable query caching (automatic)
- Secure connection strings (use secrets)
Never Do ❌
- Never skip nodejs_compat (drivers won't work)
- Never use original DB connection string in Workers
- Never leave connections open (pool exhaustion)
- Never skip error handling (DB can fail)
- Never hardcode credentials in code
- Never exceed connection limits
- Never use eval/Function (blocked in Workers)
- Never skip TLS for production DBs
- Never use blocking queries (Worker timeout)
- Never expose DB errors to users
What ships with it
19 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/connection-pooling.md 12 KB
- references/drizzle-integration.md 12 KB
- references/prisma-integration.md 13 KB
- references/query-caching.md 12 KB
- references/setup-guide.md 2.6 KB
- references/supported-databases.md 11 KB
- references/tls-ssl-setup.md 10 KB
- references/troubleshooting.md 13 KB
- references/wrangler-commands.md 11 KB
- scripts/check-versions.sh 3.4 KB runs code
- templates/drizzle-mysql.ts 2.2 KB runs code
- templates/drizzle-postgres.ts 2.1 KB runs code
- templates/local-dev-setup.sh 2.4 KB runs code
- templates/mysql2-basic.ts 2.0 KB runs code
- templates/postgres-basic.ts 1.7 KB runs code
- templates/postgres-js.ts 2.6 KB runs code
- templates/postgres-pool.ts 2.4 KB runs code
- templates/prisma-postgres.ts 3.3 KB runs code
- templates/wrangler-hyperdrive-config.jsonc 1.0 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 306 lines · 45 tokens per session scan A 76215f2b20a8
cloudflare-hyperdrive is a skill published in the GitHub repository secondsky/claude-skills (214 stars, last pushed 2d ago), licensed MIT. It adds 45 tokens to every session and 1,853 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
remember
Record why something is the way it is — a decision and its reasoning, a lesson that cost time, or a standing constraint. Use when the reasoning behind a choice would be expensive to reconstruct later.
bootstrap
Set up chamnan in this repository for the first time — build the architecture index, measure how well the code describes itself, fill in missing file comments, and record a baseline. Run once per repo.
milestone
Record a change that reshaped the repository — what moved, why it was worth doing, and which areas it touched. Use after a migration, a rewrite, or a decision that changed how part of the system works.
resume
Write down where this stretch of work stopped, so the next session continues instead of restarting. Use at the end of a working session, or when handing the repository to someone else.
capture
Write down a procedure worth keeping — a multi-step process, a trap that cost real time, or something that has now come up three times. Use it the moment you finish such a task, while the details are still exact.
promote
Turn a scratch script into a permanent tool this repo keeps. Use when a check, report, or analysis has proved worth running more than once.