cloudflare-d1-query-tuning
Installation
SKILL.md
Cloudflare D1 query tuning
Use this skill when
- A Cloudflare Workers repo has a slow D1 query and the task is to tune query shape or repository logic without touching schema or migration files.
- A D1-backed adapter or repository is over-fetching, doing N+1 lookups, or filtering/paginating in application code when SQL should do the work.
- You need D1-specific inspection such as
wrangler d1 execute,EXPLAIN QUERY PLAN, or environment-aware repro steps before rewriting the query path.
Do not use this skill when
- The task changes schema, indexes, constraints, or migration files; use
database-migrations. - The repository does not use Cloudflare D1 and the main work is a generic adapter/query change; use
repository-adapters. - The problem is D1 binding setup,
preview_database_id, or Wrangler environment drift rather than runtime query behavior; useconfiguration-env. - The main request is caching, HTTP contract changes, or higher-level service behavior rather than the D1 query path itself.
Inputs to gather
Required before editing