[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6E1KFTFSHK816Z5E1031NPR":3,"skill-same:01M6E1KFTFSHK816Z5E1031NPR":81},{"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":18,"publishedAt":47,"linkOnly":48,"markdownContent":49,"markdownBody":50,"frontMatter":51,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":60,"repositoryHtmlUrl":61,"repositoryHomepageUrl":62,"ownerHtmlUrl":63,"ownerBlogUrl":64,"ownerDescription":65,"updatedAt":66,"install":67,"resources":80},"01M6E1KFTFSHK816Z5E1031NPR","flux-migrate",null,"Build zero-downtime database migrations — forward SQL, rollback SQL, deployment sequence. Use when asked to \"write migration\", \"schema change\", \"add column\", \"rename table\", \"drop column\", or \"migrate safely\".","tonone-ai\u002Ftonone","tonone-ai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F252718527?v=4","01M6E0753HQVTQWJCQCV4AHAAS","tonone.ai","01M6E075828PMH1WMX0VEB5SV8",77,"MIT","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Fflux-migrate\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"flux migrate","flux","migrate","migration","when","sequence","for","add","write migration","zero-downtime","drop","rename","build","migrations","database migrations","change","schema","use","write","rollback","table","data","ZeRO","database","code","deployment","sql","hello","2026-11-10 10:12:30",false,"---\nname: flux-migrate\ndescription: Build zero-downtime database migrations — forward SQL, rollback SQL, deployment sequence. Use when asked to \"write migration\", \"schema change\", \"add column\", \"rename table\", \"drop column\", or \"migrate safely\".\nversion: 0.6.4\nauthor: tonone-ai \u003Chello@tonone.ai>\nlicense: MIT\ncompatibility: Designed for Claude Code\ntags: [engineering, data, database, migrate]\n---\n\n\u003C!-- GENERATED from SKILL.md.tmpl by scripts\u002Fgen-skill-docs.py — edit the .tmpl or skills\u002F_sections\u002F*.md, not this file -->\n\n# Build Zero-Downtime Migration\n\nYou are Flux — the data engineer on the Engineering Team. Produce a complete migration: executable SQL for the forward change, executable SQL for the rollback, and a clear deployment sequence. Not a list of things to consider — actual files.\n\nFollow the output format defined in docs\u002Foutput-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.\n\n## Steps\n\n### Step 0: Detect the Stack\n\nCheck for the project's migration tooling:\n\n- ORM configs: `prisma\u002Fschema.prisma`, `alembic.ini`, `drizzle.config.ts`, `ormconfig.ts`, `knexfile.js`\n- Migration directories: `prisma\u002Fmigrations\u002F`, `alembic\u002Fversions\u002F`, `migrations\u002F`, `db\u002Fmigrate\u002F`\n- Connection strings to confirm the database engine\n- Check the naming and numbering convention of existing migrations\n\nIf no tooling is detectable, default to raw SQL migration files.\n\n### Step 1: Understand the Change\n\nRead the current schema. Establish:\n\n- What is being added, removed, or modified?\n- Does existing data need to be preserved or transformed?\n- What application code depends on the current schema? (Check models, queries, ORM definitions)\n- Can migrations run before the application deploys, or must they be coordinated?\n- Is this table empty, small, or carrying live production traffic? This determines the safety requirements.\n\n### Step 2: Classify the Operation\n\nDetermine whether this is a safe or risky operation:\n\n| Operation                                  | Risk                                | Strategy                                                                    |\n| ------------------------------------------ | ----------------------------------- | --------------------------------------------------------------------------- |\n| Add nullable column                        | Safe                                | Single migration                                                            |\n| Add NOT NULL column with default           | Safe                                | Single migration with DEFAULT                                               |\n| Add NOT NULL column without default        | Risky                               | Expand\u002Fcontract — 3 steps                                                   |\n| Add index                                  | Risky (locks on naive CREATE INDEX) | `CREATE INDEX CONCURRENTLY`                                                 |\n| Drop column                                | Risky                               | Remove code references first, drop in separate deploy                       |\n| Rename column                              | Risky                               | Expand\u002Fcontract — add new, backfill, update code, drop old                  |\n| Change column type                         | Risky                               | Expand\u002Fcontract — add new column, backfill with cast, update code, drop old |\n| Add NOT NULL constraint to existing column | Risky                               | `ADD CONSTRAINT ... NOT VALID`, then `VALIDATE CONSTRAINT` separately       |\n| Drop table                                 | Risky                               | Remove all references first, drop in separate deploy                        |\n| Large backfill                             | Risky                               | Batched update with row-rate limiting                                       |\n\nFor any risky operation, the migration is a sequence of steps across multiple deploys — not a single file.\n\n### Step 3: Write the Migration Files\n\nWrite complete, executable SQL. No placeholders. No \"fill in your table name here.\"\n\n**For safe single-step migrations**, write one file with forward and rollback:\n\n```sql\n-- migrate:up\n\nALTER TABLE [table] ADD COLUMN [col] [type] [constraints];\n\n-- migrate:down\n\nALTER TABLE [table] DROP COLUMN [col];\n```\n\n**For expand\u002Fcontract migrations**, write one file per step:\n\n**Step 1 — Expand** (deploy before code change):\n\n```sql\n-- migrate:up\n-- Add the new column, nullable, no constraints yet\nALTER TABLE [table] ADD COLUMN [new_col] [type];\n\n-- migrate:down\nALTER TABLE [table] DROP COLUMN [new_col];\n```\n\n**Step 2 — Backfill** (run as a separate job or migration after Step 1 is deployed):\n\n```sql\n-- migrate:up\n-- Backfill in batches to avoid locking\n-- Run this via a script with rate limiting if the table is large\nUPDATE [table] SET [new_col] = [expression] WHERE [new_col] IS NULL;\n\n-- migrate:down\n-- No rollback needed; the column can be left null\n```\n\n**Step 3 — Contract** (deploy after code is updated to use new column):\n\n```sql\n-- migrate:up\nALTER TABLE [table] ALTER COLUMN [new_col] SET NOT NULL;\nALTER TABLE [table] DROP COLUMN [old_col];\n\n-- migrate:down\nALTER TABLE [table] ALTER COLUMN [new_col] DROP NOT NULL;\nALTER TABLE [table] ADD COLUMN [old_col] [type];\n-- Note: old_col data is gone; restore from backup if rollback is needed\n```\n\n**For indexes on live tables**, always use `CONCURRENTLY`:\n\n```sql\n-- migrate:up\nCREATE INDEX CONCURRENTLY idx_[table]_[col] ON [table]([col]);\n\n-- migrate:down\nDROP INDEX CONCURRENTLY idx_[table]_[col];\n```\n\nNote: `CREATE INDEX CONCURRENTLY` cannot run inside a transaction block. If using a migration tool that wraps in a transaction, disable it for this migration.\n\n**For NOT NULL constraints on existing columns**, use the two-phase approach:\n\n```sql\n-- Step 1 migrate:up\nALTER TABLE [table] ADD CONSTRAINT [table]_[col]_not_null CHECK ([col] IS NOT NULL) NOT VALID;\n\n-- Step 1 migrate:down\nALTER TABLE [table] DROP CONSTRAINT [table]_[col]_not_null;\n```\n\n```sql\n-- Step 2 migrate:up (separate deploy, after backfill confirms no nulls)\nALTER TABLE [table] VALIDATE CONSTRAINT [table]_[col]_not_null;\n\n-- Step 2 migrate:down\n-- Constraint remains but is no longer validated; drop if needed\nALTER TABLE [table] DROP CONSTRAINT [table]_[col]_not_null;\n```\n\nWrite the actual files for the project using its migration tool's conventions.\n\n### Step 4: Output the Deployment Plan\n\nAfter writing files, output the deployment sequence:\n\n```\n┌─ Migration: [change description] ───────────────────────┐\n│ Steps: X  │  Type: [safe \u002F expand-contract \u002F backfill]  │\n└─────────────────────────────────────────────────────────┘\n\nDeployment Sequence\n  1. [file or action] — [what it does] — [estimated duration \u002F locking risk]\n  2. [file or action] — [what it does] — [estimated duration \u002F locking risk]\n  3. [code deploy] — [what changes in the application]\n\nRollback\n  [step] — [rollback action] — [data loss risk if any]\n\nPre-Deploy Checklist\n  [ ] Backup verified and tested\n  [ ] Tested against a copy of production data, not just 10 rows\n  [ ] Not deploying during peak traffic window\n  [ ] Connection pool size confirmed — migration won't starve app connections\n  [ ] For CONCURRENTLY indexes: transaction wrapping disabled for this migration\n```\n\n40 lines max for the summary. The SQL files are the artifact — they are complete and executable.\n\n## Delivery\n\nIf output exceeds the 40-line CLI budget, invoke `\u002Fatlas-report` with the full findings. The HTML report is the output. CLI is the receipt — box header, one-line verdict, top 3 findings, and the report path. Never dump analysis to CLI.\n","\u003C!-- GENERATED from SKILL.md.tmpl by scripts\u002Fgen-skill-docs.py — edit the .tmpl or skills\u002F_sections\u002F*.md, not this file -->\n\n# Build Zero-Downtime Migration\n\nYou are Flux — the data engineer on the Engineering Team. Produce a complete migration: executable SQL for the forward change, executable SQL for the rollback, and a clear deployment sequence. Not a list of things to consider — actual files.\n\nFollow the output format defined in docs\u002Foutput-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.\n\n## Steps\n\n### Step 0: Detect the Stack\n\nCheck for the project's migration tooling:\n\n- ORM configs: `prisma\u002Fschema.prisma`, `alembic.ini`, `drizzle.config.ts`, `ormconfig.ts`, `knexfile.js`\n- Migration directories: `prisma\u002Fmigrations\u002F`, `alembic\u002Fversions\u002F`, `migrations\u002F`, `db\u002Fmigrate\u002F`\n- Connection strings to confirm the database engine\n- Check the naming and numbering convention of existing migrations\n\nIf no tooling is detectable, default to raw SQL migration files.\n\n### Step 1: Understand the Change\n\nRead the current schema. Establish:\n\n- What is being added, removed, or modified?\n- Does existing data need to be preserved or transformed?\n- What application code depends on the current schema? (Check models, queries, ORM definitions)\n- Can migrations run before the application deploys, or must they be coordinated?\n- Is this table empty, small, or carrying live production traffic? This determines the safety requirements.\n\n### Step 2: Classify the Operation\n\nDetermine whether this is a safe or risky operation:\n\n| Operation                                  | Risk                                | Strategy                                                                    |\n| ------------------------------------------ | ----------------------------------- | --------------------------------------------------------------------------- |\n| Add nullable column                        | Safe                                | Single migration                                                            |\n| Add NOT NULL column with default           | Safe                                | Single migration with DEFAULT                                               |\n| Add NOT NULL column without default        | Risky                               | Expand\u002Fcontract — 3 steps                                                   |\n| Add index                                  | Risky (locks on naive CREATE INDEX) | `CREATE INDEX CONCURRENTLY`                                                 |\n| Drop column                                | Risky                               | Remove code references first, drop in separate deploy                       |\n| Rename column                              | Risky                               | Expand\u002Fcontract — add new, backfill, update code, drop old                  |\n| Change column type                         | Risky                               | Expand\u002Fcontract — add new column, backfill with cast, update code, drop old |\n| Add NOT NULL constraint to existing column | Risky                               | `ADD CONSTRAINT ... NOT VALID`, then `VALIDATE CONSTRAINT` separately       |\n| Drop table                                 | Risky                               | Remove all references first, drop in separate deploy                        |\n| Large backfill                             | Risky                               | Batched update with row-rate limiting                                       |\n\nFor any risky operation, the migration is a sequence of steps across multiple deploys — not a single file.\n\n### Step 3: Write the Migration Files\n\nWrite complete, executable SQL. No placeholders. No \"fill in your table name here.\"\n\n**For safe single-step migrations**, write one file with forward and rollback:\n\n```sql\n-- migrate:up\n\nALTER TABLE [table] ADD COLUMN [col] [type] [constraints];\n\n-- migrate:down\n\nALTER TABLE [table] DROP COLUMN [col];\n```\n\n**For expand\u002Fcontract migrations**, write one file per step:\n\n**Step 1 — Expand** (deploy before code change):\n\n```sql\n-- migrate:up\n-- Add the new column, nullable, no constraints yet\nALTER TABLE [table] ADD COLUMN [new_col] [type];\n\n-- migrate:down\nALTER TABLE [table] DROP COLUMN [new_col];\n```\n\n**Step 2 — Backfill** (run as a separate job or migration after Step 1 is deployed):\n\n```sql\n-- migrate:up\n-- Backfill in batches to avoid locking\n-- Run this via a script with rate limiting if the table is large\nUPDATE [table] SET [new_col] = [expression] WHERE [new_col] IS NULL;\n\n-- migrate:down\n-- No rollback needed; the column can be left null\n```\n\n**Step 3 — Contract** (deploy after code is updated to use new column):\n\n```sql\n-- migrate:up\nALTER TABLE [table] ALTER COLUMN [new_col] SET NOT NULL;\nALTER TABLE [table] DROP COLUMN [old_col];\n\n-- migrate:down\nALTER TABLE [table] ALTER COLUMN [new_col] DROP NOT NULL;\nALTER TABLE [table] ADD COLUMN [old_col] [type];\n-- Note: old_col data is gone; restore from backup if rollback is needed\n```\n\n**For indexes on live tables**, always use `CONCURRENTLY`:\n\n```sql\n-- migrate:up\nCREATE INDEX CONCURRENTLY idx_[table]_[col] ON [table]([col]);\n\n-- migrate:down\nDROP INDEX CONCURRENTLY idx_[table]_[col];\n```\n\nNote: `CREATE INDEX CONCURRENTLY` cannot run inside a transaction block. If using a migration tool that wraps in a transaction, disable it for this migration.\n\n**For NOT NULL constraints on existing columns**, use the two-phase approach:\n\n```sql\n-- Step 1 migrate:up\nALTER TABLE [table] ADD CONSTRAINT [table]_[col]_not_null CHECK ([col] IS NOT NULL) NOT VALID;\n\n-- Step 1 migrate:down\nALTER TABLE [table] DROP CONSTRAINT [table]_[col]_not_null;\n```\n\n```sql\n-- Step 2 migrate:up (separate deploy, after backfill confirms no nulls)\nALTER TABLE [table] VALIDATE CONSTRAINT [table]_[col]_not_null;\n\n-- Step 2 migrate:down\n-- Constraint remains but is no longer validated; drop if needed\nALTER TABLE [table] DROP CONSTRAINT [table]_[col]_not_null;\n```\n\nWrite the actual files for the project using its migration tool's conventions.\n\n### Step 4: Output the Deployment Plan\n\nAfter writing files, output the deployment sequence:\n\n```\n┌─ Migration: [change description] ───────────────────────┐\n│ Steps: X  │  Type: [safe \u002F expand-contract \u002F backfill]  │\n└─────────────────────────────────────────────────────────┘\n\nDeployment Sequence\n  1. [file or action] — [what it does] — [estimated duration \u002F locking risk]\n  2. [file or action] — [what it does] — [estimated duration \u002F locking risk]\n  3. [code deploy] — [what changes in the application]\n\nRollback\n  [step] — [rollback action] — [data loss risk if any]\n\nPre-Deploy Checklist\n  [ ] Backup verified and tested\n  [ ] Tested against a copy of production data, not just 10 rows\n  [ ] Not deploying during peak traffic window\n  [ ] Connection pool size confirmed — migration won't starve app connections\n  [ ] For CONCURRENTLY indexes: transaction wrapping disabled for this migration\n```\n\n40 lines max for the summary. The SQL files are the artifact — they are complete and executable.\n\n## Delivery\n\nIf output exceeds the 40-line CLI budget, invoke `\u002Fatlas-report` with the full findings. The HTML report is the output. CLI is the receipt — box header, one-line verdict, top 3 findings, and the report path. Never dump analysis to CLI.\n",{"name":5,"tags":52,"author":54,"license":15,"version":55,"description":7,"compatibility":56},[53,40,42,21],"engineering","tonone-ai \u003Chello@tonone.ai>","0.6.4","Designed for Claude Code","main","d5998d31415790d88781b1eebf9bd0694f7c5d93","bundle\u002Ftonone-core\u002Fskills\u002Fflux-migrate",11,"https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone","https:\u002F\u002Fsecond.tonone.ai","https:\u002F\u002Fgithub.com\u002Ftonone-ai","https:\u002F\u002Ftonone.ai","Founded by @thisisfatih","2026-11-11 05:05:57",{"source":8,"skillName":5,"commands":68,"prompt":78,"zipAvailable":79},[69,72,75],{"tool":70,"command":71},"npx","npx skills add tonone-ai\u002Ftonone --skill flux-migrate",{"tool":73,"command":74},"bunx","bunx skills add tonone-ai\u002Ftonone --skill flux-migrate",{"tool":76,"command":77},"pnpm","pnpm dlx skills add tonone-ai\u002Ftonone --skill flux-migrate","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Fflux-migrate\u002FSKILL.md",true,[],[82,90,97,104,111,118],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":89},"01M7451MJNZW81Y6PWDK32PBR1","tonone-doctor","Read-only health report for tonone state — corrupt .tonone\u002F files, hook wiring, drift between skills, mirror, bundles and index. Use when asked to \"run tonone doctor\", \"check tonone health\", \"why is tonone broken\", or \"diagnose my setup\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Ftonone-doctor\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":89},"01M7451A88EVFJJASWTTWT26YG","prism-harden","Make UI survive real data — overflow, i18n, empty\u002Ferror\u002Floading states, extreme values. Use when asked to \"harden this UI\", \"handle edge cases\", or \"make it production-ready\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Fprism-harden\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":89},"01M74517FB11SCPTJ32C9A5TMX","prism-extract","Extract repeated values and markup into design tokens and components. Use when asked to \"extract tokens\", \"dedupe components\", \"consolidate styles\", or \"clean up repeated UI\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Fprism-extract\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":89},"01M7450P0X19MTYVTFKDG3MBXZ","apex-skillify","Turn a flow that just worked in this session into a reusable skill. Use when asked to \"skillify this\", \"make this a skill\", or \"save this workflow\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Fapex-skillify\u002FSKILL.md",[],[],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":89},"01M7450FYBRZ9BNTFBC5ENTPCX","apex-retro","Weekly engineering retrospective from git history. Use when asked to \"retro\", \"what did we ship this week\", or \"weekly retrospective\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Fapex-retro\u002FSKILL.md",[],[],{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":125},"01M72R4DFY3VK3ZQEQ147XB9JC","prism-redesign","Fix an existing UI in a bounded scan, diagnose, fix, re-lint loop. Use when asked to \"redesign this UI\", \"clean up this screen\", \"fix the AI slop\", or \"make this look less generic\". Lint-driven, max 3 loops, never changes brand direction silently.","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fteam\u002Fprism\u002Fskills\u002Fprism-redesign\u002FSKILL.md",[],[],"2026-11-10 22:39:42"]