Cloudflare D1
Cloudflare D1 SQLite database setup with Drizzle ORM, schema definitions, and version-controlled migrations for Workers.
- CCM score
- 54 of 100
- skills.sh installs
- 327
- GitHub stars
- 712
- last updated
- Jun 3, 2026
Own this skill? Claim it
What it does
- Covers project setup, D1 database creation,
wrangler.tomlconfiguration, and generating Worker environment types - Includes Drizzle schema definitions,
drizzle.config.ts, a typed database client, and a Hono-based CRUD Worker example - Guides migration generation with
drizzle-kit generateand applies them locally or remotely viawrangler d1 migrations apply - Designed for developers building serverless Workers applications that need SQLite storage with type-safe queries
Install
$ npx -y skills add alinaqi/maggy --skill cloudflare-d1 -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Cloudflare D1 Skill
Cloudflare D1 is a serverless SQLite database designed for Cloudflare Workers with global distribution and zero cold starts.
Sources: D1 Docs | Drizzle + D1 | Wrangler CLI
Core Principle
SQLite at the edge, migrations in version control, Drizzle for type safety.
D1 brings SQLite's simplicity to serverless. Design for horizontal scale (multiple small databases) rather than vertical (one large database). Use Drizzle ORM for type-safe queries and migrations.
D1 Stack
| Component | Purpose |
|---|---|
| D1 | Serverless SQLite database |
| Workers | Edge runtime for your application |
| Wrangler | CLI for development and deployment |
| Drizzle ORM | Type-safe ORM with migrations |
| Drizzle Kit | Migration tooling |
| Hono | Lightweight web framework (optional) |
Project Setup
Create Worker Project
# Create new project
npm create cloudflare@latest my-app -- --template "worker-typescript"
cd my-app
Details
- Repository
- github.com/alinaqi/maggy
- Categories
- Databases, Backend & APIs
- First seen
- Jun 3, 2026
Questions
What does the cloudflare-d1 skill do?
The cloudflare-d1 skill covers Cloudflare D1, a serverless SQLite database for Cloudflare Workers. It sets up Drizzle ORM for type-safe queries and migrations, with wrangler commands for local and remote databases.
How do I install the cloudflare-d1 skill?
Run npx -y skills add alinaqi/maggy --skill cloudflare-d1 -y in your project. Once installed, the agent can help you create a D1 database, configure wrangler.toml and write Drizzle schemas and migrations.
What does the cloudflare-d1 skill need to work?
The skill assumes a Cloudflare Workers project using wrangler and Drizzle ORM. Drizzle Kit needs CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_DATABASE_ID and CLOUDFLARE_D1_TOKEN environment variables for remote migrations.
Which other database skills sit next to cloudflare-d1?
Cloudflare-d1 is in the Databases category alongside supabase-postgres-best-practices and several prisma skills. Where those target Postgres and Prisma, this skill focuses on SQLite at the edge with Workers.
More from alinaqi/maggy
All 54- React Web312
- Site Architecture307
- Commit Hygiene306
- Web Content298
- Codex Review296
- Team Coordination286
- Typescript286
- Reddit Api282
- Ms Teams Apps276
- Database Schema275
- Session Management273
- Ai Models271
- Firebase268
- Web Payments267
- Llm Patterns266
- Supabase Python264
- Agent Teams261
- Supabase Node258
- Existing Repo256
- Credentials254
- Aws Aurora252
- Medusa252
- Reddit Ads251
- Iterative Development250
Similar to Cloudflare D1
More Databasesdrizzle-orm-d1secondsky/claude-skills445 installsType-safe Drizzle ORM setup for Cloudflare D1 covering schemas, migrations, queries, and batch transactions.
hono-cloudflarebobmatnyc/claude-mpm-skills661 installsHono on Cloudflare Workers with typed bindings for KV, D1, R2, Durable Objects, and edge deployment.
d1-drizzle-schemajezweb/claude-skills1.7K installsGenerate Drizzle ORM schemas for Cloudflare D1 with D1-specific column patterns, migrations, and docs.
d1-migrationjezweb/claude-skills1.2K installsMigration workflow for Cloudflare D1 that generates with Drizzle and flags destructive SQL before applying.
cloudflarehoodini/ai-agents-skills147 installsCloudflare edge platform skill covering Workers, KV, D1, R2, Cloudflare AI, and Durable Objects with runnable code.
drizzle-ormmindrally/skills1.1K installsLightweight type-safe TypeScript ORM guidelines covering schemas, connections, queries, migrations, and performance.