cdc
БесплатноБез исполняемых скриптовНе проверенChange Data Capture (PRAGMA capture_data_changes_conn, the turso_cdc table) - schema versions, COMMIT records, MVCC behavior, how the sync engine reads it…
от tursodatabase★ 25 410 звёзд на GitHubОб этом скилле
CDC (Change Data Capture)
CDC is per connection: PRAGMA capture_data_changes_conn(...) makes each write also insert a row into a CDC table (default name turso_cdc).
Schema versions
- v1 columns: change_id, change_time, change_type, table_name, id, before, after, updates.
- v2 columns: change_id, change_time, change_txn_id, change_type, table_name, id, before, after, updates. v2 is the current version.
- change_type is 1 (insert), 0 (update), -1 (delete), 2 (COMMIT record, v2 only).
- The version of each CDC table is a row in the
turso_cdc_versiontable (columns table_name, version). turso_cdc_versionhas one row for each spelling of the table name that the pragma got (mycdc,MYCDC). A new spelling takes the version of a row that matches without case.DROP TABLEremoves the rows of all spellings.- When the pragma is enabled and the CDC table already exists without a version row, the version is set to v1. A new CDC table gets the requested version (v2 by default).
- Writes to the CDC table and to
turso_cdc_versionare not captured.
COMMIT records (v2)
- A statement running in autocommit mode ends by inserting one COMMIT record, and only when it captured something.
- Only the root statement writes it. Trigger and foreign key action subprograms do not.
- change_txn_id comes from the connection's CDC transaction id, which is reset to -1 after commit.
Pragma changes apply at Halt
PRAGMA capture_data_changes_conn stores the new setting on the running statement. It is copied to the connection only when the statement halts after a successful commit, so a failed or rolled back statement leaves the old setting.
MVCC
- CDC works under MVCC.
- In MVCC mode change ids come from the CDC table's AUTOINCREMENT sequence, so they are not reused after rows are pruned. In WAL mode the rowid is max rowid + 1.
PRAGMA journal_modereturns an error while CDC is on for the connection. Turn CDC off first.
Sync engine
The sync engine (sync/engine/) reads the CDC table. With ignore_schema_changes set (the default), it skips changes whose table_name is sqlite_schema.
Установить cdc в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл cdc?
Change Data Capture (PRAGMA capture_data_changes_conn, the turso_cdc table) - schema versions, COMMIT records, MVCC behavior, how the sync engine reads it. Use when changing CDC or code that writes CDC rows.
Как установить скилл cdc?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cdc запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic