Build with the D1 serverless SQLite database on Cloudflare’s edge. Use when creating databases, writing SQL migrations, querying D1 from Workers, handling relational data, or troubleshooting D1_ERROR, statements that are too long, migration failures, or query performance issues.
Auto-Discovery Skill for Claude Code CLI
Complete knowledge domain for working with Cloudflare D1 - serverless SQLite database on Cloudflare's edge network.
Claude will automatically suggest this skill when you mention any of these keywords:
| Issue | Error Message | How Skill Prevents |
|-------|---------------|-------------------|
| SQL Injection | - | Always uses prepared statements with .bind() |
| Statement Too Long | "statement too long" | Templates show batching inserts (100-250 rows) |
| Transaction Conflicts | "cannot start a transaction within a transaction" | Migrations don't include BEGIN TRANSACTION |
| Type Mismatch | "D1_TYPE_ERROR" | Uses null instead of undefined for optional values |
| Rate Limiting | "too many requests queued" | Uses .batch() instead of individual queries |
| Memory Exceeded | "DB's isolate exceeded its memory limit" | Adds LIMIT clauses and pagination patterns |
| Foreign Key Violations | "foreign key constraint failed" | Uses PRAGMA defer_foreign_keys = true |
| Index Not Used | Slow queries | Templates include EXPLAIN QUERY PLAN examples |
Savings: ~58% token reduction (3,500 tokens saved)
# Create database
npx wrangler d1 create my-app-db
# Create migration
npx wrangler d1 migrations create my-app-db create_users_table
# Apply migration
npx wrangler d1 migrations apply my-app-db --local
// Query from Worker
const user = await env.DB.prepare('SELECT * FROM users WHERE email = ?')
.bind('user@example.com')
.first();
~/.claude/skills/cloudflare-d1/
├── SKILL.md # Complete D1 documentation
├── README.md # This file (auto-trigger keywords)
├── templates/
│ ├── d1-setup-migration.sh # Complete workflow script
│ ├── schema-example.sql # Production-ready schema
│ └── d1-worker-queries.ts # TypeScript query examples
└── reference/
├── query-patterns.md # All D1 API methods
└── best-practices.md # Performance & security tips
cloudflare-worker-base - Base Worker + Hono setupcloudflare-kv - Key-value storage (simpler than D1)cloudflare-r2 - Object storage for fileshono-routing - Advanced Hono patternsStatus: Production Ready ✅ Last Updated: 2025-10-21 Maintainer: Jeremy Dawes (Jezweb)
npx skills add ovachiever/Cloudflare D1 数据库下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer