Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Cdc Pipeline Setup

ASecurity

Step-by-step playbook for standing up a Change Data Capture pipeline with Debezium — source connector configuration, slot management, snapshot strategy, and handling common failure modes.

7 stars
0 votes
0 copies
0 views
Added 9/23/2026
ai-agentsgosqldatabase

Security Analysis

A100/100

Scanned 9/23/2026

$npx -y skills add mcorbett51090/RavenClaude --skill cdc-pipeline-setup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cdc Pipeline Setup?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Cdc Pipeline Setup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mcorbett51090-cdc-pipeline-setup/badge)](https://www.skillsdirectory.com/skills/mcorbett51090-cdc-pipeline-setup)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: cdc-pipeline-setup
description: "Step-by-step playbook for standing up a Change Data Capture pipeline with Debezium — source connector configuration, slot management, snapshot strategy, and handling common failure modes."
---

# CDC Pipeline Setup (Debezium)

## When to Use This Skill

When a team needs to stream database changes (inserts, updates, deletes) into Kafka from PostgreSQL, MySQL, or SQL Server using Debezium. Covers initial connector setup through production hardening.

## Pre-flight Checklist

Before deploying the connector:

- [ ] Source DB has logical replication enabled (`wal_level = logical` for Postgres)
- [ ] Debezium DB user has `REPLICATION` role + `SELECT` on all captured tables
- [ ] A **dedicated replication slot** name is chosen (not shared with another tool)
- [ ] Kafka topic naming convention decided (default: `<server>.<schema>.<table>`)
- [ ] Schema registry is running and subjects are pre-created if using AVRO
- [ ] Snapshot strategy chosen (see table below)

## Connector Configuration — PostgreSQL

```json
{
  "name": "postgres-cdc-orders",
  "config": {
    "connector.class": "io.debezium.connector.postgresql.PostgresConnector",
    "database.hostname": "db.internal",
    "database.port": "5432",
    "database.user": "debezium",
    "database.password": "${file:/secrets/debezium.properties:db.password}",
    "database.dbname": "orders",
    "database.server.name": "orders-db",
    "slot.name": "debezium_orders_slot",
    "plugin.name": "pgoutput",
    "table.include.list": "public.orders,public.order_items",
    "snapshot.mode": "initial",
    "key.converter": "io.confluent.kafka.serializers.KafkaAvroSerializer",
    "value.converter": "io.confluent.kafka.serializers.KafkaAvroSerializer",
    "schema.registry.url": "http://schema-registry:8081",
    "heartbeat.interval.ms": "30000",
    "slot.max.retries": "5",
    "slot.retry.delay.ms": "10000"
  }
}
```

## Snapshot Mode Decision

| Mode | When to choose |
|---|---|
| `initial` | First deployment — captures full table state before streaming changes |
| `never` | Topic already has historical data; only want new changes |
| `always` | Connector restart always re-snapshots (only for small tables) |
| `exported` (Postgres) | Large tables: uses a transaction export for consistent point-in-time |
| `initial_only` | One-shot migration: snapshot then stop (use with care — no streaming) |

**Default for new pipelines:** `initial` + monitor snapshot lag via `kafka_connect_snapshot_total_records_remaining`.

## Replication Slot Management

A Debezium replication slot holds WAL until the connector acknowledges it. An idle or stopped connector causes WAL accumulation — monitor slot lag daily:

```sql
SELECT slot_name, pg_size_pretty(pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn)) AS lag
FROM pg_replication_slots
WHERE active = false;
```

**Action thresholds:**

| Lag | Action |
|---|---|
| < 1 GB | Normal |
| 1–5 GB | Alert on-call; investigate why connector is stopped |
| > 5 GB | Emergency: restart connector or drop slot to protect DB disk |

To safely drop a stuck slot: `SELECT pg_drop_replication_slot('debezium_orders_slot');` — the connector will re-snapshot on next start if mode is `initial`.

## Handling Schema Changes on the Source

1. Capture the DDL change timestamp from the Debezium `ddl` event (only in schema change topics).
2. Evolve the schema in the registry using the `schema-registry-evolution` skill before the DDL runs if possible.
3. For `ADD COLUMN`: Debezium propagates automatically — new field appears in events after the DDL.
4. For `DROP COLUMN` or type changes: treat as a breaking schema change — create a new Kafka subject.

## Pitfalls

- Sharing a replication slot with another tool (e.g., a read-replica streaming setup) — two consumers on one slot cause duplicate events and undefined ordering.
- Not setting `heartbeat.interval.ms` on a low-traffic table — the slot doesn't advance and WAL accumulates silently until disk fills.
- Running Debezium with `snapshot.mode=always` on a large table — every connector restart triggers a full table scan, flooding the topic and the DB.
- Storing DB credentials in the connector JSON checked into source control — always use `${file:...}` or a secrets provider.

## See also

- [../../agents/kafka-pipeline-engineer.md](../../agents/kafka-pipeline-engineer.md) — CDC pipelines and Debezium configuration
- [../../agents/streaming-architect.md](../../agents/streaming-architect.md) — CDC topology and delivery semantics decisions
- [../../CLAUDE.md](../../CLAUDE.md) — house opinions on schemas and delivery guarantees

Attribution

mcorbett51090mcorbett51090
View sourceSee grades on GitHubMore from mcorbett51090 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →