cdc
Skill by tursodatabase
Describes Change Data Capture in Turso, covering CDC table schema versions, COMMIT records, MVCC behavior and how the sync engine reads changes. Written for developers changing CDC code or code that writes CDC rows.
Install cdc
Built from the published package, never by AI.
git clone --depth 1 https://github.com/tursodatabase/turso /tmp/turso && mkdir -p ~/.claude/skills && cp -r /tmp/turso/.claude/skills/cdc ~/.claude/skills/cdcRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/tursodatabase/turso /tmp/turso && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/turso/.claude/skills/cdc ~/.gemini/antigravity-cli/skills/cdcAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The cdc skill documents Change Data Capture in Turso. It covers the PRAGMA capture_data_changes_conn setting, which makes each write also insert a row into a CDC table, by default named turso_cdc. The notes describe schema versions v1 and v2, the change types, and the COMMIT records that v2 writes for autocommit statements.
The skill also explains how pragma changes take effect when a statement halts, how CDC behaves under MVCC, and how the sync engine reads the CDC table and skips sqlite_schema changes by default. It is aimed at developers who change CDC code or code that writes CDC rows in the Turso codebase.
Written from the project's SKILL.md and checked against it.
What it can do
- Schema versionsLists the v1 and v2 CDC table columns and the version rows kept in turso_cdc_version.
- COMMIT recordsExplains the v2 COMMIT record written once per autocommit statement that captured changes.
- Pragma timingExplains that capture setting changes apply only when a statement halts after a successful commit.
- MVCC behaviorCovers how change ids are assigned under MVCC compared with WAL mode.
- Sync engine integrationDescribes how the sync engine reads the CDC table and skips sqlite_schema changes.
Try asking
- Explain how CDC schema versions v1 and v2 differ
- Walk me through when a CDC pragma change takes effect
- What happens to change ids under MVCC versus WAL mode?
Good to know
- PRAGMA journal_mode returns an error while CDC is on for a connection.
- Writes to the CDC table and turso_cdc_version are not captured.
- The sync engine skips sqlite_schema changes when ignore_schema_changes is set, which is the default.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .claude/skills/cdc/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md2 KB
Alternatives to cdc
All alternatives →Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.
Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.
Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.
Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.
Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.
Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.
Compare with hugging-face-datasets, db-repair or alloydb-basics
cdc: common questions
Which change types does the Turso CDC table record?
change_type is 1 for insert, 0 for update, -1 for delete, and 2 for a COMMIT record in v2 only.
Does Turso CDC work with MVCC?
The source says CDC works under MVCC. Change ids then come from the CDC table's AUTOINCREMENT sequence, so they are not reused after rows are pruned.
What is the default name of the CDC table?
The default name is turso_cdc. The pragma makes each write also insert a row into that table.
How do I install cdc?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is cdc free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is cdc safe to use?
It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to cdc?
Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.
