跳到正文
cccskills
免费在 GitHub 公开

database-migrator

Migrates databases between providers (Postgres, MySQL, Supabase, PlanetScale, MongoDB). Reads source schema, generates migration scripts, handles data type mapping, foreign keys, indexes, triggers, stored procedures. Validates migration with row counts and checksums. Generates migration-plan.md with step-by-step execution guide, rollback procedures, estimated downtime.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(9)

  • SKILL.md5.4 KB
  • references/data-migration.md2.9 KB
  • references/edge-cases.md5.1 KB
  • references/migration-plan-template.md10.3 KB
  • references/rollback-and-downtime.md4.6 KB
  • references/schema-discovery.md11.9 KB
  • references/script-generation.md6.7 KB
  • references/type-mapping.md6.6 KB
  • references/validation.md4.1 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Database Migrator

Move schemas, data, and logic between database providers. This is a cross-provider migration engine, not a schema designer: it handles data type incompatibilities, provider-specific SQL dialects, foreign key ordering, sequence and auto-increment translation, trigger rewrites, and stored procedure conversion. It validates with row counts and checksums and produces an auditable migration-plan.md.

Contents

  • references/schema-discovery.md -- Extraction queries for relational, MongoDB, Supabase, and PlanetScale sources.
  • references/type-mapping.md -- Data type maps (PG/MySQL/Mongo) and SQL function translation.
  • references/script-generation.md -- DDL, sequence, trigger, procedure, and view translation.
  • references/data-migration.md -- Export, transform, and import commands per provider.
  • references/validation.md -- Row count, checksum, FK integrity, index, and spot-check queries.
  • references/rollback-and-downtime.md -- Rollback scripts, backup/restore, downtime estimation.
  • references/migration-plan-template.md -- Full migration-plan.md output template.
  • references/edge-cases.md -- Large tables, lossy mappings, document flattening, multi-schema, quality checklist.

Supported Paths and Complexity

Supported source/target pairs: PostgreSQL, MySQL, Supabase (Postgres), PlanetScale (MySQL), and MongoDB, in any direction.

  • Low: Same underlying engine (e.g., Postgres to Supabase). Mostly connection and permission changes.
  • Medium: Same paradigm, different dialect (e.g., Postgres to MySQL). Requires type mapping and dialect translation.
  • Medium-High: Different dialect plus provider constraints (e.g., PlanetScale has no database-level foreign keys).
  • High: Paradigm shift (e.g., relational to document). Requires schema redesign, not just translation.

When to Use

  • Moving a production database from one provider to another.
  • Migrating between self-hosted and managed services.
  • Replicating a schema across providers for multi-cloud or disaster recovery.
  • Consolidating multiple databases into a single provider.
  • Translating a complete data model between relational and MongoDB.
  • Producing a validated, auditable migration plan before executing in production.

When NOT to Use

  • Designing a new schema from scratch (use database-schema-designer).
  • Migrating application code between frameworks (use full-codebase-migrator).
  • Changing a few columns or adding one table (write the ALTER statements directly).
  • Real-time replication or CDC -- this skill generates point-in-time scripts, not streaming pipelines.

Workflow

Follow these steps precisely when this skill is invoked.

  1. Gather migration parameters. Establish: source provider and version; target provider and version; connection method (live or dump file); schema scope (which schemas/tables); data migration (schema only or schema + data, full or partial); downtime tolerance; data volume; application dependencies; and output location (default to current directory). If the user already supplied these, skip the questions and proceed.

  2. Discover the source schema. Extract tables, columns, types, defaults, constraints, indexes, foreign keys, triggers, procedures, functions, views, sequences, enums, and row counts. For MongoDB, scan collections to infer schema. For Supabase, also extract RLS policies, extensions, and publications. See references/schema-discovery.md.

  3. Map data types. Translate every source type to the best target type and flag lossy or precision-changing conversions. Translate provider-specific SQL functions. See references/type-mapping.md.

  4. Generate schema scripts. Resolve table creation order by topological sort (defer cyclic foreign keys). Generate DDL, translate sequences/auto-increment, rewrite triggers and stored procedures, and translate views. See references/script-generation.md.

  5. Generate data migration scripts. Produce export, transform, and import commands for the source and target providers. See references/data-migration.md.

  6. Generate the validation plan. Produce row count, checksum, foreign key integrity, index, trigger/procedure, and sample data spot-check queries for source and target. See references/validation.md.

  7. Generate the rollback plan and downtime estimate. Produce reverse-order DROP scripts, backup/restore commands, application rollback steps, and a phased downtime estimate with reduction strategies. See references/rollback-and-downtime.md.

  8. Generate migration-plan.md. Assemble the executive summary, scope, schema inventory, type mapping, incompatibilities, scripts, validation, rollback, downtime, risk assessment, checklists, step-by-step execution guide, and required application changes. Use the template in references/migration-plan-template.md.

  9. Handle edge cases. Account for extremely large tables, lossy mappings, MongoDB document flattening, PlanetScale foreign key workarounds, Supabase specifics, and multi-schema migrations. Verify the plan against the quality checklist. See references/edge-cases.md.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Audit websites for accessibility issues and WCAG compliance. Use when checking accessibility, fixing a11y issues, or ensuring WCAG compliance.

中文简介正在准备中。当前显示原文说明。

OneWave-AI/claude-skills3612026年10月20日 更新

Deploy a 2-layer parallel agent hierarchy for large, parallelizable work — big refactors, multi-file migrations, codebase-wide audits, bulk generation. A top-tier commander (Fable or Opus) orchestrates the swarms; the user picks a power level (Max Power / Heavy / Balanced / Economy) that sets the Opus/Sonnet/Haiku model mix per layer. Layer 1 is 3-50+ specialist agents, each with its own full context window; Layer 2 is 2+ sub-agents per member. Includes git safety, tiered sizing, a pre-deploy gate, phantom-completion checks, and multi-wave follow-up.

中文简介正在准备中。当前显示原文说明。

OneWave-AI/claude-skills3612026年10月20日 更新

Use to test whether an AI agent, prompt, or skill actually works before or after it ships — build a small eval set, score runs, and catch regressions when the prompt or model changes. Trigger when the user asks whether a prompt is good, wants to compare models or versions, sees inconsistent agent output, or is about to put an agent in front of customers.

中文简介正在准备中。当前显示原文说明。

OneWave-AI/claude-skills3612026年10月20日 更新

Deploys swarms of sub-agents for massive parallel data processing tasks. Unlike agent-army (which is for code changes), this is for DATA tasks -- processing 1000 documents, analyzing datasets, bulk content generation. Configurable swarm size, task distribution, result aggregation, progress tracking, and error recovery.

中文简介正在准备中。当前显示原文说明。

OneWave-AI/claude-skills3612026年10月20日 更新

Designs and deploys custom agent teams for specific business workflows. Interactive discovery of business processes, then generates complete team configurations with specialized agent roles, tool access, communication protocols, and handoff rules.

中文简介正在准备中。当前显示原文说明。

OneWave-AI/claude-skills3612026年10月20日 更新

Agent-to-Agent (A2A) communication protocol. Connect two or more Claude agents that pass messages, share context, delegate tasks, and collaborate. Implements structured handoffs, shared memory, and multi-agent conversations.

中文简介正在准备中。当前显示原文说明。

OneWave-AI/claude-skills3612026年10月20日 更新

查看 OneWave-AI 的全部技能

报告此技能的问题