Agent skill

Cloudflare D1

by secondsky in secondsky/claude-skills

Cloudflare D1 serverless SQLite on edge. An agent skill from secondsky/claude-skills.

MITAuto-check passedBackend & APIs

Install Cloudflare D1

skills CLI
$ npx skills add secondsky/claude-skills --skill cloudflare-d1 -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install secondsky/claude-skills cloudflare-d1 --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/cloudflare-d1/skills/cloudflare-d1 .claude/skills/cloudflare-d1 && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cloudflare-d1
GitHub stars
227
Token cost
~3.9k tokens
SKILL.md length
920 words
Files
11 (incl. references)
Skills in repo
169
Repo updated
First seen
Licence
MIT

At a glance

Cloudflare D1 serverless SQLite on edge. An agent skill from secondsky/claude-skills.

  • Works in 9 steps: Create Database → Configure Binding → Create Migration → …
  • Encountering D1ERROR
  • SKILL.md covers Table of Contents, What Is D1?, 🆕 New in 2025 and Quick Start (5 Minutes), plus 4 more sections
  • Runs Shell and TypeScript scripts from its folder; calls bunx, wrangler and npm

What it does

Cloudflare D1 is an agent skill from secondsky/claude-skills. Cloudflare D1 serverless SQLite on edge. Use for databases, migrations, bindings, or encountering D1ERROR, statement too long, too many requests queued errors.

Its SKILL.md is about 3.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 12 other files, including reference files (for example `references/2025-features.md`, `references/best-practices.md` and `references/limits.md`).

It sits in Backend & APIs, covering Serverless. It works with Cloudflare, SQLite, SQL and Cloudflare Workers. The repository describes itself as: Production-ready skills for Claude Code CLI - Cloudflare, React, Tailwind v4, and AI integrations. The licence is MIT.

When your agent uses it

  • Encountering D1ERROR
  • Statement too long
  • Too many requests queued errors

Example prompts

  • “/cloudflare-d1”

Requirements

  • Node.js
  • A Bash shell

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. Create Database
  2. Configure Binding
  3. Create Migration
  4. Apply Migration
  5. Query from Worker
  6. Always Use Migrations
  7. Make Migrations Idempotent
  8. Test Locally First
  9. Add PRAGMA optimize

What it can do on your machine

Read from SKILL.md and the folder at commit 8837836. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Shell and TypeScript), which the agent can run.

    Shell commands in SKILL.md call:

    • bunx
    • wrangler
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • developers.cloudflare.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cloudflare D1 loads about 3.9k tokens when it runs, and up to ~36k if it reads all its reference files. Until then it costs about 44 tokens; SKILL.md has 920 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~44
When it runs · the whole SKILL.md, loaded when a task matches
~3.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~36k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from secondsky/claude-skills at commit 8837836, republished under its MIT licence (© secondsky). 920 words, ~3,937 tokens.

Download SKILL.mdSave it as .claude/skills/cloudflare-d1/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
cloudflare-d1
description
Cloudflare D1 serverless SQLite on edge. Use for databases, migrations, bindings, or encountering D1_ERROR, statement too long, too many requests queued errors.
license
MIT
metadata.version
3.0.0
metadata.last_verified
2025-01-15
metadata.production_tested
true
metadata.token_savings
~58%
metadata.errors_prevented
8
metadata.templates_included
3
metadata.references_included
4
metadata.wrangler_version
4.81.0
metadata.workers_types_version
4.20260408.0

Cloudflare D1 Database

Status: Production Ready ✅ | Last Verified: 2025-01-15

Table of Contents

  1. What Is D1?
  2. Quick Start
  3. Critical Rules
  4. D1 API Methods
  5. Top 5 Use Cases
  6. Migrations Best Practices
  7. Common Patterns
  8. SQLite Type Affinity
  9. Top 5 Errors Prevented

What Is D1?

Cloudflare D1 is serverless SQLite on the edge:

  • SQL database without servers
  • Global distribution
  • Zero cold starts
  • Standard SQLite syntax
  • Read replication for global performance

🆕 New in 2025

D1 received major updates throughout 2025:

Performance (January 2025)
  • 40-60% latency reduction globally (P50 query times)
  • Optimized SQLite engine for edge execution
  • Reduced cold start impact for databases <100 MB
Reliability (September 2025)
  • Automatic query retries: Read queries retry up to 2x on transient failures
  • Transparent to application code (logged in wrangler tail)
Scalability (April 2025)
  • Read Replication (Public Beta): Deploy read replicas globally
  • Up to 2x read throughput for read-heavy workloads
  • Sessions API for read-write separation
Compliance (November 2025)
  • Data Localization: Specify EU/US jurisdiction for GDPR/data sovereignty
  • Configure via --jurisdiction flag or wrangler.jsonc
⚠️ Breaking Change (February 10, 2025)
  • Free tier hard limits enforced: 10 DBs, 500 MB each, 50 queries/invocation
  • Exceeding limits = 429 errors (previously warnings only)
  • Action: Review usage with wrangler d1 list and upgrade if needed

Full details: Load references/2025-features.md


Quick Start (5 Minutes)

1. Create Database
bash
bunx wrangler d1 create my-database

Save the database_id from output!

2. Configure Binding

Add to wrangler.jsonc:

jsonc
{
  "name": "my-worker",
  "main": "src/index.ts",
  "compatibility_date": "2025-10-11",
  "d1_databases": [
    {
      "binding": "DB",                    // env.DB
      "database_name": "my-database",
      "database_id": "<UUID>",
      "preview_database_id": "local-db"
    }
  ]
}
3. Create Migration
bash
bunx wrangler d1 migrations create my-database create_users

Edit migrations/0001_create_users.sql:

sql
CREATE TABLE IF NOT EXISTS users (
  user_id INTEGER PRIMARY KEY AUTOINCREMENT,
  email TEXT NOT NULL UNIQUE,
  username TEXT NOT NULL,
  created_at INTEGER NOT NULL
);

CREATE INDEX IF NOT EXISTS idx_users_email ON users(email);

PRAGMA optimize;
4. Apply Migration
bash
# Local
bunx wrangler d1 migrations apply my-database --local

# Production
bunx wrangler d1 migrations apply my-database --remote
5. Query from Worker
typescript
import { Hono } from 'hono';

type Bindings = {
  DB: D1Database;
};

const app = new Hono<{ Bindings: Bindings }>();

app.get('/users/:email', async (c) => {
  const { results } = await c.env.DB.prepare(
    'SELECT * FROM users WHERE email = ?'
  )
    .bind(c.req.param('email'))
    .all();

  return c.json(results);
});

export default app;

Load references/setup-guide.md for complete walkthrough.


Critical Rules

Always Do ✅
  1. Use prepared statements with .bind() (never string concatenation)
  2. Create indexes for WHERE/JOIN/ORDER BY columns
  3. Use migrations for schema changes (never manual SQL)
  4. Batch queries for multiple operations (.batch())
  5. Run PRAGMA optimize after schema changes
  6. Handle errors explicitly (try/catch)
  7. Use INTEGER for timestamps (Date.now())
  8. Test locally before deploying migrations
  9. Use read replicas for global read performance
  10. Validate input before SQL queries
Never Do ❌
  1. Never concatenate user input into SQL
  2. Never commit database_id to public repos
  3. Never skip migrations for schema changes
  4. Never use VARCHAR (use TEXT instead)
  5. Never skip indexes for filtered columns
  6. Never ignore SQLite type affinity rules
  7. **Never use SELECT *** without LIMIT
  8. Never run migrations without testing locally
  9. Never exceed 1MB per row
  10. Never use DATETIME (use INTEGER for timestamps)

D1 API Methods

prepare() - Execute Queries
typescript
// Single result
const { results } = await env.DB.prepare(
  'SELECT * FROM users WHERE email = ?'
)
  .bind(email)
  .all();

// First result only
const user = await env.DB.prepare(
  'SELECT * FROM users WHERE user_id = ?'
)
  .bind(userId)
  .first();

// Raw results (faster)
const { results } = await env.DB.prepare(
  'SELECT username FROM users'
)
  .raw();  // Returns arrays instead of objects
batch() - Multiple Queries
typescript
const results = await env.DB.batch([
  env.DB.prepare('INSERT INTO users (email, username, created_at) VALUES (?, ?, ?)')
    .bind('user1@example.com', 'user1', Date.now()),
  env.DB.prepare('INSERT INTO users (email, username, created_at) VALUES (?, ?, ?)')
    .bind('user2@example.com', 'user2', Date.now()),
  env.DB.prepare('SELECT COUNT(*) as count FROM users')
]);

console.log('Users count:', results[2].results[0].count);

All queries execute in single transaction (all succeed or all fail).

exec() - Run SQL String
typescript
// For migrations/setup only
await env.DB.exec(`
  CREATE TABLE IF NOT EXISTS users (
    user_id INTEGER PRIMARY KEY,
    email TEXT NOT NULL
  );
  CREATE INDEX idx_email ON users(email);
`);

NEVER use for queries with user input!

Load references/query-patterns.md for complete API reference.


Top 5 Use Cases

Use Case 1: User CRUD
typescript
// Create
app.post('/users', async (c) => {
  const { email, username } = await c.req.json();

  const { results } = await c.env.DB.prepare(
    'INSERT INTO users (email, username, created_at) VALUES (?, ?, ?) RETURNING *'
  )
    .bind(email, username, Date.now())
    .all();

  return c.json(results[0]);
});

// Read
app.get('/users/:id', async (c) => {
  const user = await c.env.DB.prepare(
    'SELECT * FROM users WHERE user_id = ?'
  )
    .bind(c.req.param('id'))
    .first();

  if (!user) {
    return c.json({ error: 'Not found' }, 404);
  }

  return c.json(user);
});

// Update
app.patch('/users/:id', async (c) => {
  const { username } = await c.req.json();

  await c.env.DB.prepare(
    'UPDATE users SET username = ?, updated_at = ? WHERE user_id = ?'
  )
    .bind(username, Date.now(), c.req.param('id'))
    .run();

  return c.json({ success: true });
});

// Delete
app.delete('/users/:id', async (c) => {
  await c.env.DB.prepare(
    'DELETE FROM users WHERE user_id = ?'
  )
    .bind(c.req.param('id'))
    .run();

  return c.json({ success: true });
});
Use Case 2: Batch Operations
typescript
app.post('/users/bulk', async (c) => {
  const users = await c.req.json();  // Array of users

  const statements = users.map(user =>
    c.env.DB.prepare(
      'INSERT INTO users (email, username, created_at) VALUES (?, ?, ?)'
    ).bind(user.email, user.username, Date.now())
  );

  const results = await c.env.DB.batch(statements);

  return c.json({ inserted: results.length });
});
Use Case 3: Read Replication (Global Reads)
typescript
// Configure read replica (any region)
const session = c.env.DB.withSession({
  preferredRegion: 'auto'  // or 'weur', 'wnam', 'enam', 'apac'
});

// Read from nearest replica
const { results } = await session.prepare(
  'SELECT * FROM users WHERE email = ?'
)
  .bind(email)
  .all();

// Check which region served request
console.log('Served by:', results[0].served_by_region);

Load references/read-replication.md for complete guide.

Use Case 4: Transactions with Batch
typescript
// Transfer credits between users (atomic)
const results = await c.env.DB.batch([
  c.env.DB.prepare(
    'UPDATE users SET credits = credits - ? WHERE user_id = ?'
  ).bind(amount, fromUserId),
  c.env.DB.prepare(
    'UPDATE users SET credits = credits + ? WHERE user_id = ?'
  ).bind(amount, toUserId),
  c.env.DB.prepare(
    'INSERT INTO transactions (from_user, to_user, amount, created_at) VALUES (?, ?, ?, ?)'
  ).bind(fromUserId, toUserId, amount, Date.now())
]);

// All succeed or all fail (transaction)
Use Case 5: Pagination
typescript
app.get('/users', async (c) => {
  const page = parseInt(c.req.query('page') || '1');
  const limit = 20;
  const offset = (page - 1) * limit;

  const { results } = await c.env.DB.prepare(
    'SELECT * FROM users ORDER BY created_at DESC LIMIT ? OFFSET ?'
  )
    .bind(limit, offset)
    .all();

  return c.json({
    users: results,
    page,
    limit
  });
});

Migrations Best Practices

1. Always Use Migrations
bash
bunx wrangler d1 migrations create my-database add_users_avatar
2. Make Migrations Idempotent
sql
-- ✅ GOOD: Idempotent
CREATE TABLE IF NOT EXISTS users (...);
CREATE INDEX IF NOT EXISTS idx_email ON users(email);
DROP TABLE IF EXISTS old_table;

-- ❌ BAD: Fails on re-run
CREATE TABLE users (...);
CREATE INDEX idx_email ON users(email);
3. Test Locally First
bash
bunx wrangler d1 migrations apply my-database --local
bunx wrangler d1 execute my-database --local --command "SELECT * FROM users"
4. Add PRAGMA optimize
sql
-- End of migration
PRAGMA optimize;

Load templates/schema-example.sql for complete schema template.


When to Load References

Load references/setup-guide.md when:
  • First-time D1 setup
  • Creating first database
  • Configuring bindings
  • Applying first migration
Load references/query-patterns.md when:
  • Need complete API reference
  • Complex query patterns
  • Batch operations
  • Error handling
Load references/read-replication.md when:
  • Setting up global reads
  • Need low latency worldwide
  • Understanding Sessions API
  • Sequential consistency required
Load references/best-practices.md when:
  • Optimizing query performance
  • Schema design decisions
  • Index strategies
  • Production deployment checklist
Show full SKILL.md (368 more words)Show less
Load references/limits.md when:
  • Encountering 429 errors or quota warnings
  • Planning capacity for free vs paid tiers
  • Understanding database/query limits
  • Migrating to paid plan
Load references/metrics-analytics.md when:
  • Investigating performance issues
  • Setting up monitoring and alerts
  • Using wrangler d1 insights command
  • Analyzing query efficiency
Load references/2025-features.md when:
  • Upgrading from v2.x to v3.x
  • Enabling new features (auto-retry, jurisdiction, replication)
  • Understanding breaking changes (Feb 10, 2025 enforcement)
  • Migrating before deadlines
Interactive Tools

Agents (Autonomous diagnostics):

  • agents/d1-debugger.md: 9-phase diagnostic (config, migrations, queries, bindings, errors, limits, performance, Time Travel)
  • agents/d1-query-optimizer.md: Performance analysis (slow queries, missing indexes, optimization recommendations)

Commands (Interactive wizards):

  • commands/cloudflare-d1:setup.md: Interactive first-time setup wizard
  • commands/d1-create-migration.md: Guided migration creation with validation

Using Bundled Resources

References (references/)
  • setup-guide.md - Complete setup walkthrough
  • query-patterns.md - Complete API reference with examples
  • read-replication.md - Global read replicas setup
  • best-practices.md - Performance and optimization
Templates (templates/)
  • schema-example.sql - Complete schema with indexes
  • d1-worker-queries.ts - All query patterns in Workers
  • cloudflare-d1:setup-migration.sh - Complete setup script

Common Patterns

Error Handling
typescript
try {
  const { results } = await env.DB.prepare(
    'SELECT * FROM users WHERE email = ?'
  )
    .bind(email)
    .all();

  return c.json(results);
} catch (error) {
  console.error('D1 Error:', error);
  return c.json({ error: 'Database error' }, 500);
}
Raw Mode (Performance)
typescript
// Returns arrays instead of objects (faster)
const { results } = await env.DB.prepare(
  'SELECT user_id, email FROM users'
)
  .raw();

// results = [[1, 'user1@example.com'], [2, 'user2@example.com']]
COUNT Queries
typescript
const count = await env.DB.prepare(
  'SELECT COUNT(*) as count FROM users'
)
  .first('count');  // Get single column value

console.log('Total users:', count);

SQLite Type Affinity

D1 uses SQLite type affinity:

Declared TypeAffinity
INTEGER, INTINTEGER
TEXT, VARCHAR, CHARTEXT
REAL, FLOAT, DOUBLEREAL
BLOBBLOB
(no type)BLOB

Best practices:

  • Use INTEGER for numbers
  • Use TEXT for strings (not VARCHAR)
  • Use INTEGER for timestamps (Date.now())
  • Use BLOB for binary data

Top 5 Errors Prevented

  1. SQL Injection: Use .bind(), never string concatenation
  2. Missing Indexes: Create indexes for WHERE/JOIN columns
  3. Migration Failures: Test locally first
  4. Type Confusion: Use INTEGER for timestamps
  5. Batch Size: Limit batch to <500 statements

Load references/best-practices.md for complete error prevention.


Secure Installation

When installing D1 driver packages, follow supply chain security best practices:

  • Block post-install scripts — npm config set ignore-scripts true (or Bun: disabled by default)
  • Cooldown period — Wait 7 days for new package versions to be vetted by the community
  • Audit before installing — Run socket package score npm <pkg> or use socket npm install <pkg> to check packages

Load the dependency-upgrade skill for full security configuration including Socket CLI integration, cooldown setup, lockfile validation, and CI enforcement.

Official Documentation


Questions? Issues?

  1. Check references/setup-guide.md for setup
  2. Review references/query-patterns.md for API reference
  3. See references/read-replication.md for global reads
  4. Load references/best-practices.md for optimization

© secondsky, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 10 other files (references) in plugins/cloudflare-d1/skills/cloudflare-d1 of secondsky/claude-skills.

  • SKILL.md
  • references/2025-features.md
  • references/best-practices.md
  • references/limits.md
  • references/metrics-analytics.md
  • references/query-patterns.md
  • references/read-replication.md
  • references/setup-guide.md
  • templates/d1-setup-migration.sh
  • templates/d1-worker-queries.ts
  • templates/schema-example.sql

Open the folder on GitHubat commit 8837836

Compare with similar skills

Cloudflare D1 next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cloudflare D1 compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cloudflare D1 this skillsecondsky/claude-skills227—~3.9kAutomated safety check: PassMIT
Durable Objectshodgef/apiker1274 repos~1.5kAutomated safety check: PassMIT
Apikerhodgef/apiker127—~1.4kAutomated safety check: PassMIT
Cloudflare WorkersEpicenterHQ/epicenter4.8k—~576Automated safety check: PassCustom licence
Cloudflareericrisco/rsc-harness156—~2.6kAutomated safety check: PassMIT
Cloudflareeinverne/dotfiles121—~6.7kAutomated safety check: PassMIT

Similar skills

  • Durable Objects

    hodgef/apiker

    Create and review Cloudflare Durable Objects. An agent skill from hodgef/apiker.

    127 GitHub starsUsed in 4 repos~1.5k tokens
    Backend & APIsAuto-check passed
  • Apiker

    hodgef/apiker

    Develop, review, and extend the Apiker library — a framework for building serverless REST APIs on Cloudflare Workers + Durable Objects.

    127 GitHub stars~1.4k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Cloudflare Workers

    EpicenterHQ/epicenter

    Cloudflare Workers patterns for Worker runtime APIs, Durable Objects, KV, R2, D1, Queues, WebSockets, streaming responses, bindings, wrangler configuration, and deployment limits.

    4.8k GitHub stars~576 tokensUpdated today
    Backend & APIsAuto-check passed
  • Cloudflare

    ericrisco/rsc-harness

    A skill your agent uses when working on Cloudflare's edge platform — wrangler.jsonc bindings, choosing between D1/KV/R2/Durable Objects/Queues, deploying a Worker or SPA via Static Assets, or…

    156 GitHub stars~2.6k tokensUpdated today
    Backend & APIsAuto-check passed
  • Cloudflare

    einverne/dotfiles

    Guide for building applications on Cloudflare's edge platform.

    121 GitHub stars~6.7k tokensUpdated 28 days ago
    Backend & APIsAuto-check passed
  • Blueprint Cloudflare Scaffold

    receptron/mulmoterminal

    Lay out a Worker with D1 and static Vue assets, with tests that run inside the Workers runtime.

    236 GitHub stars~782 tokensUpdated today
    Backend & APIsAuto-check passed

More from secondsky/claude-skills

All 169 skills in this repo
  • Tanstack AI

    secondsky/claude-skills

    TanStack AI (alpha) provider-agnostic type-safe chat with streaming for OpenAI, Anthropic, Gemini, Ollama.

    227 GitHub starsUsed in 1 repo~3.6k tokens
    Auto-check: notes
  • Auto Animate

    secondsky/claude-skills

    AutoAnimate (@formkit/auto-animate) zero-config animations for React.

    227 GitHub stars~2.9k tokensUpdated 9 days ago
    Auto-check passed
  • Base UI React

    secondsky/claude-skills

    MUI Base UI unstyled React components with Floating UI. An agent skill from secondsky/claude-skills.

    227 GitHub stars~1.9k tokensUpdated 9 days ago
    Auto-check passed
  • Cloudflare Images

    secondsky/claude-skills

    This skill should be used when the user asks to "upload images to Cloudflare", "implement direct creator upload", "configure image transformations", "optimize WebP/AVIF", "create image variants"…

    227 GitHub stars~3.6k tokensUpdated 9 days ago
    Auto-check: notes
  • Cloudflare Nextjs

    secondsky/claude-skills

    Deploy Next.js to Cloudflare Workers via the OpenNext adapter (@opennextjs/cloudflare).

    227 GitHub stars~5.3k tokensUpdated 9 days ago
    Auto-check: notes
  • Cloudflare Sandbox

    secondsky/claude-skills

    Cloudflare Sandboxes SDK for secure code execution in Linux containers at edge.

    227 GitHub stars~4.5k tokensUpdated 9 days ago
    Auto-check passed

Questions about Cloudflare D1

What does Cloudflare D1 do?

Cloudflare D1 serverless SQLite on edge. An agent skill from secondsky/claude-skills. Cloudflare D1 is an agent skill from secondsky/claude-skills. Cloudflare D1 serverless SQLite on edge.

When should I use Cloudflare D1?

Cloudflare D1 fits situations like: encountering D1ERROR; statement too long; too many requests queued errors.

How do I install Cloudflare D1 in Claude Code?

Run `npx skills add secondsky/claude-skills --skill cloudflare-d1 -a claude-code`. Or copy the skill folder (plugins/cloudflare-d1/skills/cloudflare-d1 in secondsky/claude-skills) into .claude/skills/cloudflare-d1 in your project. Claude Code loads it when a task matches its description.

How do I install Cloudflare D1 in Codex?

Run `npx skills add secondsky/claude-skills --skill cloudflare-d1 -a codex`. Or copy the skill folder (plugins/cloudflare-d1/skills/cloudflare-d1 in secondsky/claude-skills) into .agents/skills/cloudflare-d1 in your project. Codex loads it when a task matches its description.

Can I use Cloudflare D1 in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add secondsky/claude-skills --skill cloudflare-d1 -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cloudflare-d1, .gemini/skills/cloudflare-d1, .github/skills/cloudflare-d1 and .opencode/skills/cloudflare-d1 in your project.

What does Cloudflare D1 need to run?

Going by SKILL.md and its folder, Cloudflare D1 needs a shell and TypeScript for the scripts in its folder and the command-line tools its instructions call (bunx, wrangler and npm). Our summary lists: Node.js; A Bash shell.

Does Cloudflare D1 access the network?

SKILL.md names 1 domain. As links in the text: developers.cloudflare.com. This is read from the text; nothing was executed.

Is Cloudflare D1 safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cloudflare D1 use?

Cloudflare D1 is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cloudflare D1 use?

About 3.9k tokens (SKILL.md is roughly 16k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 32k tokens, read only when the agent opens those files.

What are the alternatives to Cloudflare D1?

Skills that share tags, products or a category with Cloudflare D1: Durable Objects (hodgef/apiker, 127 stars), Apiker (hodgef/apiker, 127 stars), Cloudflare Workers (EpicenterHQ/epicenter, 4.8k stars) and Cloudflare (ericrisco/rsc-harness, 156 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cloudflare D1?

secondsky (a GitHub user) maintains it in secondsky/claude-skills, which has 227 GitHub stars. The repository holds 169 skills in this directory. The repository was last updated on September 28, 2026.

Source: secondsky/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.