Token导航 LogoToken导航TokenDH.com
待分类需要联网github未标认证来源可访问许可证需确认审计异常

molt-replicator蜕皮复制子

Agent Skill

molt-replicator 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

312

周安装

13

GitHub Stars

9

下载量

104
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:molt-replicator(蜕皮复制子)
来源仓库:https://github.com/cockroachlabs/cockroachdb-skills
仓库路径:skills/molt-replicator
安装命令:
npx skills add https://github.com/cockroachlabs/cockroachdb-skills --skill molt-replicator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/cockroachlabs/cockroachdb-skills --skill molt-replicator

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在需要围绕仓库状态或协作事项进行整理时使用。
  • 可结合来源仓库和 README 核验具体用法。molt-replicator 属于待分类类 Skill,可作为该场景下的辅助能力补充。
  • 安装前建议确认权限范围和是否会触发联网或文件操作。
  • 注意维护状态,避免使用已废弃或不受支持的技能。

SKILL.md

molt replicator

Continuous change-data-capture (CDC) replication from source databases to CockroachDB. Run after molt fetch completes the initial bulk load.

Important: replicator is a separate binary from molt. It is not invoked by molt fetch. The data-load-and-replication mode in molt fetch is deprecated — use replicator directly instead.

Architecture

Source DB ──► [replicator] ──► Staging DB (_replicator schema) ──► Target CockroachDB
                  ▲
            Publication/
            Slot/BinLog/
            LogMiner

Replicator reads changes from the source, buffers them in a staging schema on the target CRDB cluster, and applies them to the target tables.

Subcommands by Source

SourceCommand
PostgreSQLreplicator pglogical
MySQLreplicator mylogical
Oraclereplicator oraclelogminer
Kafkareplicator kafka
Cloud storagereplicator objstore
CockroachDB CDCreplicator start

Full Fetch → Replicator Workflow

Step 1: Initial bulk load with molt fetch

molt fetch \
  --source "postgresql://user:pass@source:5432/db" \
  --target "postgresql://root@crdb:26257/db" \
  --bucket-path "s3://mybucket/migration" \
  --table-handling drop-on-target-and-recreate

Step 2: Create publication on source (PostgreSQL)

-- Run on source PostgreSQL:
CREATE PUBLICATION molt_fetch FOR ALL TABLES;
-- (molt fetch may have already created this; check first)

Step 3: Create staging database on target

-- Run on target CockroachDB:
CREATE DATABASE _replicator;

Step 4: Test connectivity

replicator preflight \
  --sourceConn "postgresql://user:pass@source:5432/db" \
  --targetConn "postgresql://root@crdb:26257/db"

Step 5: Start replicator

replicator pglogical \
  --publicationName "molt_fetch" \
  --sourceConn "postgresql://user:pass@source:5432/db" \
  --stagingConn "postgresql://root@crdb:26257/_replicator" \
  --stagingSchema "_replicator.public" \
  --targetConn "postgresql://root@crdb:26257/db" \
  --targetSchema "public" \
  --metricsAddr "0.0.0.0:8080"

Step 6: Monitor lag

curl http://localhost:8080/metrics | grep replicator_
# Watch for: mutations applied, unapplied mutations, lag

Step 7: Cutover

  1. When lag reaches ~0, redirect app writes to CockroachDB
  2. Let replicator drain remaining changes
  3. Confirm no new writes on source
  4. Stop replicator
  5. Decommission source

Source-Specific Setup

PostgreSQL (pglogical)

Source prerequisites:

  • User with REPLICATION privilege
  • Logical replication enabled (wal_level = logical)
  • Publication exists (created by molt fetch or manually)
replicator pglogical \
  --publicationName "molt_fetch" \
  --slotName "replicator" \
  --sourceConn "postgresql://..." \
  --stagingConn "postgresql://root@crdb:26257/_replicator" \
  --stagingSchema "_replicator.public" \
  --targetConn "postgresql://root@crdb:26257/db" \
  --targetSchema "public"

MySQL (mylogical)

Source prerequisites:

  • Binary logging enabled (binlog_format = ROW)
  • GTID mode on (gtid_mode=ON, enforce_gtid_consistency=ON)
  • User with REPLICATION CLIENT privilege
replicator mylogical \
  --sourceConn "mysql://root:pass@source:3306/db" \
  --stagingConn "postgresql://root@crdb:26257/_replicator" \
  --stagingSchema "_replicator.public" \
  --targetConn "postgresql://root@crdb:26257/db" \
  --targetSchema "public"

Oracle (oraclelogminer)

Source prerequisites:

  • Archive log mode enabled
  • Supplemental logging enabled
  • LogMiner permissions granted
replicator oraclelogminer \
  --sourceConn "oracle://app_user:pass@oracle:1521/db" \
  --stagingConn "postgresql://root@crdb:26257/_replicator" \
  --stagingSchema "_replicator.public" \
  --targetConn "postgresql://root@crdb:26257/db" \
  --targetSchema "public"

Key Flags

# Performance
--parallelism 16          # concurrent DB transactions (default: 16)
--flushSize 1000          # rows per batch (default: 1000)
--flushPeriod 1s          # flush interval (default: 1s)

# Staging connection pool
--stagingMaxPoolSize 128
--stagingIdleTime 1m
--stagingMaxLifetime 5m

# Target connection pool
--targetMaxPoolSize 128
--targetStatementCacheSize 128

# Retry
--maxRetries 10
--retryInitialBackoff 25ms
--retryMaxBackoff 2s

# Monitoring
--metricsAddr "0.0.0.0:8080"    # Prometheus metrics endpoint
--schemaRefresh 1m               # refresh schema cache (0 = disabled)

# Dead letter queue (failed rows instead of stopping)
--dlqTableName "replicator_dlq"

# Logging
-v                               # debug
-vv                              # trace
--logFormat fluent                # for log aggregators
--logDestination "/var/log/replicator.log"

Gotchas

  • Staging schema (_replicator.public) is auto-created by replicator, but the database (_replicator) must exist first
  • --publicationName and --slotName must match what molt fetch created (default: molt_fetch / molt_slot)
  • DLQ table grows over time — monitor and purge failed rows periodically
  • Replicator holds an open replication slot on the source — this blocks WAL cleanup; monitor source disk usage
  • Graceful shutdown respects --gracePeriod (default: 30s); don't SIGKILL without it
  • No built-in alerting — set up external alerts on the Prometheus metrics endpoint
  • Long cutover windows increase replication lag — plan for a maintenance window if needed

See flags reference for the full flag list.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.44%
按下载量换算38

Claude

28.45%
按下载量换算30

Cursor

16.47%
按下载量换算17

Gemini CLI

9.72%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills