d1

Manage Cloudflare D1 databases and execute SQL queries via Wrangler bindings.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/theslashdojo/dojo --skill d1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: d1
Source: https://github.com/theslashdojo/dojo/tree/main/nodes/cloudflare/d1
Command: npx skills add https://github.com/theslashdojo/dojo --skill d1

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires wrangler, and includes scripts (resource) components.

What problem does it solve?

Provides managed, relational SQL storage at the Cloudflare edge so Workers can store, query, and migrate structured data without a centralized database, reducing latency and simplifying deployment.

Core Features & Use Cases

  • Managed serverless SQLite databases bound to Workers for low-latency reads and transactional writes.
  • File-based migrations, prepared statements with parameter binding, and transactional batch operations for safe schema and data changes.
  • Use case: store user accounts and application state for an edge-rendered app, run migrations during deploy, and execute transactional batch inserts from Worker requests.

Quick Start

Create a D1 database, add the binding to your wrangler.toml, and apply migrations using the Wrangler CLI.

Frequently Asked Questions about d1

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage Cloudflare D1 databases and execute SQL queries at the edge?

You can manage Cloudflare D1 databases and execute SQL queries by binding serverless SQLite storage to Workers via Wrangler. This enables low-latency relational reads and transactional writes directly at the edge without a centralized database.

Can I run file-based migrations on a Cloudflare D1 database?

Yes, you can run file-based migrations on a Cloudflare D1 database. Using the Wrangler CLI, you apply file-based migrations during deployment to safely manage schema changes and structured data updates for your Workers applications.

How do I execute transactional batch operations in Cloudflare Workers?

You execute transactional batch operations in Cloudflare Workers by using D1 bindings via Wrangler. This allows you to safely process transactional batch inserts and manage application state within Worker requests.

Do I need Wrangler to use SQLite with Cloudflare Workers?

Yes, Wrangler is required to use SQLite with Cloudflare Workers. You need the Wrangler CLI to create D1 databases, add bindings to your wrangler.toml configuration, and apply file-based migrations for edge-deployed applications.

What is the best way to store user accounts and application state for edge-rendered apps?

The best way to store user accounts and application state for edge-rendered apps is using serverless SQLite at the edge. Cloudflare D1 provides managed relational storage bound to Workers, reducing latency and simplifying deployment.

Does Cloudflare D1 support parameterized prepared statements?

Yes, Cloudflare D1 supports parameterized prepared statements. You can safely query and manipulate structured data in your serverless edge database using parameter binding to prevent injection vulnerabilities.