[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MDAN715SCPRS528A607N91":3,"skill-same:01M6MDAN715SCPRS528A607N91":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":54,"ownerHtmlUrl":55,"ownerBlogUrl":56,"ownerDescription":57,"updatedAt":58,"install":59,"resources":72},"01M6MDAN715SCPRS528A607N91","data-migration",null,"Hard gate before any database schema change or data transformation in production. Requires a written migration plan with rollback strategy, dry run, and verification steps before execution. Prevents data loss, downtime, and irreversible schema changes.","hashgraph-online\u002Fawesome-codex-plugins","hashgraph-online","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160371962?v=4","01M6CNB6NRJVNNGN14TR01Q6D3","HOL (Hashgraph Online)","01M6JT1HSKKG9V68KQAQGBA7XP",1575,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FRBraga01\u002Fa-team\u002Fskills\u002Fdata-migration\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"data","data migration","migration","schema","changes","rollback strategy","with","dry","database schema","transformation","gate","change","strategy","rollback","plan","execution","Production","database","verification","run","2026-11-10 10:12:30",false,"---\nname: data-migration\ndescription: Hard gate before any database schema change or data transformation in production. Requires a written migration plan with rollback strategy, dry run, and verification steps before execution. Prevents data loss, downtime, and irreversible schema changes.\n---\n\n# Data Migration\n\n## The Law\n\n```\nEVERY MIGRATION NEEDS A ROLLBACK.\nA migration without a rollback plan is a one-way door.\nBefore you open it, know how to close it.\n```\n\n## When to Use\n\nUse this skill before:\n- Any `ALTER TABLE` in production\n- Any column rename, type change, or removal\n- Any large `UPDATE` or `DELETE` (more than 1000 rows)\n- Any index creation on a large table\n- Any data backfill or transformation script\n\n## The Migration Process\n\n### Step 1: Classify the Migration\n\n| Type | Risk | Strategy |\n|------|------|---------|\n| Additive (new table, new nullable column) | Low | Single deploy |\n| Non-breaking change (add index, add constraint) | Low–Medium | Verify impact first |\n| Column rename or type change | High | Multi-phase deploy |\n| Column or table removal | High | Multi-phase deploy |\n| Large data backfill (>100k rows) | Medium | Batched, off-peak |\n| Destructive (DROP TABLE, DELETE) | Critical | Backup + explicit approval |\n\n### Step 2: Write the Migration Plan\n\nSave to `docs\u002Fmigrations\u002FYYYY-MM-DD-description.md`:\n\n```markdown\n# Migration: [Title]\n\n## Summary\n[What changes and why]\n\n## Risk Level\n[Low \u002F Medium \u002F High \u002F Critical]\n\n## Migration Steps\n\n### UP (apply)\n\\```sql\n-- Step 1: Add new column (nullable — safe, no lock)\nALTER TABLE orders ADD COLUMN discount_amount NUMERIC(10,2);\n\n-- Step 2: Backfill (batched — see script)\n-- Run: scripts\u002Fmigrations\u002Fbackfill-discount.sql\n\n-- Step 3: Add NOT NULL constraint after backfill\nALTER TABLE orders ALTER COLUMN discount_amount SET NOT NULL;\n\\```\n\n### DOWN (rollback)\n\\```sql\nALTER TABLE orders DROP COLUMN IF EXISTS discount_amount;\n\\```\n\n## Rollback Plan\n[How to revert if something goes wrong — step by step]\n\n## Estimated Duration\n[How long will the migration take? Any locking risk?]\n\n## Verification\n- [ ] Row count before: SELECT COUNT(*) FROM orders;\n- [ ] Row count after matches\n- [ ] Sample rows spot-checked: SELECT * FROM orders LIMIT 10;\n- [ ] Application queries tested against migrated schema\n- [ ] No errors in application logs after deploy\n```\n\n### Step 3: Zero-Downtime Patterns\n\n**Column rename** — never rename directly; multi-phase:\n```\nPhase 1: Add new column (old and new both exist)\nPhase 2: Deploy app that writes to BOTH columns, reads from old\nPhase 3: Backfill new column from old\nPhase 4: Deploy app that writes to BOTH, reads from new\nPhase 5: Drop old column\n```\n\n**Type change** — same multi-phase approach; never `ALTER COLUMN TYPE` on large tables in production directly.\n\n**Index creation on large table** — always `CREATE INDEX CONCURRENTLY`:\n```sql\n-- [INVALID] — takes full table lock\nCREATE INDEX idx_orders_user ON orders(user_id);\n\n-- [VALID] — non-blocking on PostgreSQL\nCREATE INDEX CONCURRENTLY idx_orders_user ON orders(user_id);\n```\n\n**Large backfill** — never in one transaction; batch it:\n```sql\n-- Process in batches of 1000 rows until done\nDO $$\nDECLARE\n  batch_size INT := 1000;\n  rows_updated INT;\nBEGIN\n  LOOP\n    UPDATE orders\n    SET discount_amount = 0\n    WHERE discount_amount IS NULL\n    LIMIT batch_size;\n\n    GET DIAGNOSTICS rows_updated = ROW_COUNT;\n    EXIT WHEN rows_updated = 0;\n    PERFORM pg_sleep(0.1);  -- yield between batches\n  END LOOP;\nEND $$;\n```\n\n### Step 4: Pre-Migration Checklist\n\nBefore executing in production:\n\n- [ ] Migration tested in staging with production-sized dataset\n- [ ] DOWN migration tested — rollback actually works\n- [ ] Row counts recorded (before state documented)\n- [ ] Backup taken or verified recent backup exists\n- [ ] Maintenance window announced if locking is expected\n- [ ] Application can tolerate both old and new schema simultaneously (for multi-phase migrations)\n- [ ] Monitoring alerts active during migration\n\n### Step 5: Execute\n\n```bash\n# Dry run first (PostgreSQL)\npsql $DATABASE_URL --dry-run -f migration.sql\n\n# Real run with timing\npsql $DATABASE_URL -f migration.sql --echo-all\n\n# Check for locks during execution\nSELECT pid, query, state, wait_event_type, wait_event\nFROM pg_stat_activity\nWHERE state != 'idle';\n```\n\n### Step 6: Verify\n\n```sql\n-- Row count matches expectations\nSELECT COUNT(*) FROM affected_table;\n\n-- Sample spot-check\nSELECT * FROM affected_table LIMIT 20;\n\n-- No NULL where NOT NULL expected\nSELECT COUNT(*) FROM affected_table WHERE new_column IS NULL;\n\n-- No application errors in logs for 10 minutes post-migration\n```\n\n## Rollback Decision Tree\n\n```\nMigration complete?\n  └── No errors in monitoring for 10 minutes? → DONE\n  └── Errors found?\n      ├── Can app tolerate the error state? → Fix forward (hotfix)\n      └── Cannot tolerate? → ROLLBACK IMMEDIATELY\n          ├── Run DOWN migration\n          ├── Verify application recovers\n          └── Document in post-mortem\n```\n\n## Hard Rules\n\n- **Never DROP a column in the same deploy as the last code that reads it** — always separate by at least one deploy\n- **Never run destructive migrations (DROP TABLE, DELETE) without an explicit human approval step** — not just a code review\n- **Never skip the DOWN migration** — \"we can recreate it\" is not a rollback strategy\n- **Never migrate in peak traffic hours** — schedule for the lowest-traffic window\n","# Data Migration\n\n## The Law\n\n```\nEVERY MIGRATION NEEDS A ROLLBACK.\nA migration without a rollback plan is a one-way door.\nBefore you open it, know how to close it.\n```\n\n## When to Use\n\nUse this skill before:\n- Any `ALTER TABLE` in production\n- Any column rename, type change, or removal\n- Any large `UPDATE` or `DELETE` (more than 1000 rows)\n- Any index creation on a large table\n- Any data backfill or transformation script\n\n## The Migration Process\n\n### Step 1: Classify the Migration\n\n| Type | Risk | Strategy |\n|------|------|---------|\n| Additive (new table, new nullable column) | Low | Single deploy |\n| Non-breaking change (add index, add constraint) | Low–Medium | Verify impact first |\n| Column rename or type change | High | Multi-phase deploy |\n| Column or table removal | High | Multi-phase deploy |\n| Large data backfill (>100k rows) | Medium | Batched, off-peak |\n| Destructive (DROP TABLE, DELETE) | Critical | Backup + explicit approval |\n\n### Step 2: Write the Migration Plan\n\nSave to `docs\u002Fmigrations\u002FYYYY-MM-DD-description.md`:\n\n```markdown\n# Migration: [Title]\n\n## Summary\n[What changes and why]\n\n## Risk Level\n[Low \u002F Medium \u002F High \u002F Critical]\n\n## Migration Steps\n\n### UP (apply)\n\\```sql\n-- Step 1: Add new column (nullable — safe, no lock)\nALTER TABLE orders ADD COLUMN discount_amount NUMERIC(10,2);\n\n-- Step 2: Backfill (batched — see script)\n-- Run: scripts\u002Fmigrations\u002Fbackfill-discount.sql\n\n-- Step 3: Add NOT NULL constraint after backfill\nALTER TABLE orders ALTER COLUMN discount_amount SET NOT NULL;\n\\```\n\n### DOWN (rollback)\n\\```sql\nALTER TABLE orders DROP COLUMN IF EXISTS discount_amount;\n\\```\n\n## Rollback Plan\n[How to revert if something goes wrong — step by step]\n\n## Estimated Duration\n[How long will the migration take? Any locking risk?]\n\n## Verification\n- [ ] Row count before: SELECT COUNT(*) FROM orders;\n- [ ] Row count after matches\n- [ ] Sample rows spot-checked: SELECT * FROM orders LIMIT 10;\n- [ ] Application queries tested against migrated schema\n- [ ] No errors in application logs after deploy\n```\n\n### Step 3: Zero-Downtime Patterns\n\n**Column rename** — never rename directly; multi-phase:\n```\nPhase 1: Add new column (old and new both exist)\nPhase 2: Deploy app that writes to BOTH columns, reads from old\nPhase 3: Backfill new column from old\nPhase 4: Deploy app that writes to BOTH, reads from new\nPhase 5: Drop old column\n```\n\n**Type change** — same multi-phase approach; never `ALTER COLUMN TYPE` on large tables in production directly.\n\n**Index creation on large table** — always `CREATE INDEX CONCURRENTLY`:\n```sql\n-- [INVALID] — takes full table lock\nCREATE INDEX idx_orders_user ON orders(user_id);\n\n-- [VALID] — non-blocking on PostgreSQL\nCREATE INDEX CONCURRENTLY idx_orders_user ON orders(user_id);\n```\n\n**Large backfill** — never in one transaction; batch it:\n```sql\n-- Process in batches of 1000 rows until done\nDO $$\nDECLARE\n  batch_size INT := 1000;\n  rows_updated INT;\nBEGIN\n  LOOP\n    UPDATE orders\n    SET discount_amount = 0\n    WHERE discount_amount IS NULL\n    LIMIT batch_size;\n\n    GET DIAGNOSTICS rows_updated = ROW_COUNT;\n    EXIT WHEN rows_updated = 0;\n    PERFORM pg_sleep(0.1);  -- yield between batches\n  END LOOP;\nEND $$;\n```\n\n### Step 4: Pre-Migration Checklist\n\nBefore executing in production:\n\n- [ ] Migration tested in staging with production-sized dataset\n- [ ] DOWN migration tested — rollback actually works\n- [ ] Row counts recorded (before state documented)\n- [ ] Backup taken or verified recent backup exists\n- [ ] Maintenance window announced if locking is expected\n- [ ] Application can tolerate both old and new schema simultaneously (for multi-phase migrations)\n- [ ] Monitoring alerts active during migration\n\n### Step 5: Execute\n\n```bash\n# Dry run first (PostgreSQL)\npsql $DATABASE_URL --dry-run -f migration.sql\n\n# Real run with timing\npsql $DATABASE_URL -f migration.sql --echo-all\n\n# Check for locks during execution\nSELECT pid, query, state, wait_event_type, wait_event\nFROM pg_stat_activity\nWHERE state != 'idle';\n```\n\n### Step 6: Verify\n\n```sql\n-- Row count matches expectations\nSELECT COUNT(*) FROM affected_table;\n\n-- Sample spot-check\nSELECT * FROM affected_table LIMIT 20;\n\n-- No NULL where NOT NULL expected\nSELECT COUNT(*) FROM affected_table WHERE new_column IS NULL;\n\n-- No application errors in logs for 10 minutes post-migration\n```\n\n## Rollback Decision Tree\n\n```\nMigration complete?\n  └── No errors in monitoring for 10 minutes? → DONE\n  └── Errors found?\n      ├── Can app tolerate the error state? → Fix forward (hotfix)\n      └── Cannot tolerate? → ROLLBACK IMMEDIATELY\n          ├── Run DOWN migration\n          ├── Verify application recovers\n          └── Document in post-mortem\n```\n\n## Hard Rules\n\n- **Never DROP a column in the same deploy as the last code that reads it** — always separate by at least one deploy\n- **Never run destructive migrations (DROP TABLE, DELETE) without an explicit human approval step** — not just a code review\n- **Never skip the DOWN migration** — \"we can recreate it\" is not a rollback strategy\n- **Never migrate in peak traffic hours** — schedule for the lowest-traffic window\n",{"name":5,"description":7},"main","2b63f856ce19c2a797929cacabd9e0fc936812fa","plugins\u002FRBraga01\u002Fa-team\u002Fskills\u002Fdata-migration",491,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins","https:\u002F\u002Fhol.org\u002Fplugins\u002Fbest-codex-plugins","https:\u002F\u002Fgithub.com\u002Fhashgraph-online","https:\u002F\u002Fhol.org","Open-source standards and developer tools for interoperable AI agents: discovery, identity, communication, payments, privacy and security.","2026-11-14 14:06:13",{"source":8,"skillName":5,"commands":60,"prompt":70,"zipAvailable":71},[61,64,67],{"tool":62,"command":63},"npx","npx skills add hashgraph-online\u002Fawesome-codex-plugins --skill data-migration",{"tool":65,"command":66},"bunx","bunx skills add hashgraph-online\u002Fawesome-codex-plugins --skill data-migration",{"tool":68,"command":69},"pnpm","pnpm dlx skills add hashgraph-online\u002Fawesome-codex-plugins --skill data-migration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FRBraga01\u002Fa-team\u002Fskills\u002Fdata-migration\u002FSKILL.md",true,[],[74,84,92,100,108,116],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":79,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":83},"01M7DV332YQMGD8WTRJ9DZQXTB","worktable-review-with-annotations","Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.","MIT","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":88,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":83},"01M7DV2YGHCZVBEB1AHYB6CGHE","worktable-find-and-synthesize-context","Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":96,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":83},"01M7DV2TQN1H11ME2SAF9MXN7V","worktable-create-or-update-docs","Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":104,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":83},"01M7DV2NE452NEA8TXATKSNAJH","worktable-create-or-manage-records","Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":112,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":83},"01M7DV2HENRBR2KSCVM064WH0Y","worktable-create-or-manage-interactive-html","Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FSKILL.md",[],[],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":120,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":83},"01M7DV2CADR5R7RQFFYPNAGR9Y","worktable-collaborate-threads","Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FSKILL.md",[],[]]