Skip to content

secondsky/claude-skills / plugins/cloudflare-hyperdrive/skills/cloudflare-hyperdrive

cloudflare-hyperdrive

Verified

Cloudflare Hyperdrive for Workers-to-database connections with pooling and caching. Use for PostgreSQL/MySQL, Drizzle/Prisma, or encountering pool errors, TLS issues, connection refused.

templates/wrangler-hyperdrive-config.jsonc

View on GitHub
{
  "name": "my-worker-with-hyperdrive",
  "main": "src/index.ts",
  "compatibility_date": "2024-09-23",
  "compatibility_flags": [
    "nodejs_compat"  // REQUIRED for database drivers (pg, postgres, mysql2)
  ],
  "hyperdrive": [
    {
      // Binding name - access as env.HYPERDRIVE in your Worker
      "binding": "HYPERDRIVE",

      // Hyperdrive configuration ID from: wrangler hyperdrive create
      "id": "<your-hyperdrive-id-here>",

      // (Optional) Local development connection string
      // Alternative: Use CLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_HYPERDRIVE env var
      "localConnectionString": "postgres://user:password@localhost:5432/local_db"
    }
  ],

  // Example: Multiple Hyperdrive configurations
  // "hyperdrive": [
  //   {
  //     "binding": "POSTGRES_DB",
  //     "id": "postgres-hyperdrive-id"
  //   },
  //   {
  //     "binding": "MYSQL_DB",
  //     "id": "mysql-hyperdrive-id"
  //   }
  // ],

  // Optional: Enable observability
  "observability": {
    "enabled": true
  }
}
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall