drizzle-cube CLAUDE.md

drizzle-cube CLAUDE.md is an instructions file for coding agents from cliftonc/drizzle-cube. It costs 2,055 tokens per session, scanned A, original, MIT.

Project instructions for Drizzle Cube, a type-safe analytics layer that turns database queries into data for charts and dashboards. It includes server, client, database-adapter, command-line, and testing areas.

In plain words
What is it for?
Use them when working on query planning, chart data, React dashboards, database support, adapters, the CLI, or tests.
Why use it?
It shows where each part lives and directs agents to the project’s current documentation before making substantial changes.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/cliftonc/drizzle-cube/claude-md
Clone the repo
git clone --depth 1 https://github.com/cliftonc/drizzle-cube

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for drizzle-cube CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/cliftonc/drizzle-cube/claude-md.svg)](https://agentmods.dev/instructions/cliftonc/drizzle-cube/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/cliftonc/drizzle-cube/claude-md"><img src="https://agentmods.dev/badge/instructions/cliftonc/drizzle-cube/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,055 This file is loaded in full into every session.
When invoked 2,055 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02055 $0.02055
Opus 5 $0.01027 $0.01027
Sonnet 5 $0.00411 $0.00411
Haiku 4.5 $0.00205 $0.00205

Measured 2d ago against content hash ea70e3feac50, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

drizzle-cube CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 125 lines

How it starts

The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

Drizzle ORM-first semantic layer with Cube.js compatibility. Type-safe analytics and dashboards with SQL injection protection.

Project Structure

src/server/      # Core semantic layer — compiler, executors, query planning  → src/server/CLAUDE.md
src/client/      # React analytics dashboard components                       → src/client/CLAUDE.md
src/adapters/    # Framework adapters (Express, Fastify, Hono, Next.js)       → src/adapters/CLAUDE.md
src/i18n/        # Internationalization runtime and locale files               → src/i18n/CLAUDE.md
src/cli/         # CLI tool — `npx drizzle-cube charts init|list`            → src/cli/CLAUDE.md
src/shared/      # Shared utilities (date-range parsing)
tests/           # Multi-database testing infrastructure                      → tests/CLAUDE.md
dev/             # Development environment: example server, Docker Compose, migrations, seed
.claude/         # Agent skills

Agent Documentation Context

Before planning non-trivial changes, review the LLM-optimized documentation index at https://www.drizzle-cube.dev/llms.txt for current public docs, examples, and API context. Use it as supplementary context alongside this repository's CLAUDE.md files and source code; repository files remain the source of truth for implementation details.

Database Support

PostgreSQL · MySQL · SQLite · DuckDB · Snowflake · Databend · SingleStore

Each engine has a dedicated executor in src/server/executors/. Auto-detection resolves the engine from the Drizzle instance.

Essential Commands

Category Command Description
Dev npm run dev Start dev servers (server + client)
Dev npm run dev:server Watch server (tsx)
Dev npm run dev:client Watch client (Vite)
Dev npm run dev:setup Start Docker DBs, run migrations + seed
Build npm run build Build all (server, client, adapters, CLI)
Build npm run build:server Build server only
Build npm run build:client Build client only
Build npm run build:adapters Build adapters only
Build npm run build:cli Build CLI only
Test npm test Run all tests (Vitest) — needs Docker, see below
Test npm run test:watch Tests in watch mode
Test npm run test:postgres Run server tests (PostgreSQL, default engine) — needs Docker
Test npm run test:mysql Run server tests against MySQL — needs Docker
Test npm run test:sqlite Run server tests against SQLite — no Docker
Test npm run test:cli Run CLI / generator tests — no Docker
Test npm run test:client Run client component tests — no Docker
Test npm run test:e2e Run Playwright end-to-end tests
Test npm run test:setup Start test containers (docker-compose up)
Test npm run test:teardown Stop test containers (docker-compose down)
Quality npm run typecheck TypeScript type checking
Quality npm run lint ESLint
Quality npm run lint:fix ESLint with auto-fix

Read the full file on GitHub · 125 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago Changed · +1 lines · +86 tokens per session ea70e3feac50
  2. 5d ago First seen · 124 lines · 1,969 tokens per session scan A dde2093fe393

Subscribe to this mod's changes

drizzle-cube CLAUDE.md is an instructions file published in the GitHub repository cliftonc/drizzle-cube (60 stars, last pushed today), licensed MIT. It adds 2,055 tokens to every session, about $0.0103 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.