[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B301D44WB7XWPA6EP4VG3A":3,"skill-same:01M7B301D44WB7XWPA6EP4VG3A":48},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7B301D44WB7XWPA6EP4VG3A","hamster-migration-rollout-safety",null,"Rollout safety rules for every change under apps\u002Fweb\u002Fsupabase\u002Fmigrations\u002F**. Use whenever you write, review, rename, or recover a Supabase migration — especially in pre-PR review or when a deploy broke an environment. Migrations install schema and fail closed; production data repair, backfill, reconciliation, and CREATE INDEX CONCURRENTLY belong in explicit audited scripts run before\u002Fafter deployment. Trigger even if the user only says 'add a column', 'fix these legacy rows in the migration', 'add an index', 'drop this old table', or 'just edit the migration that already shipped' — those are exactly the cases that corrupt data or wedge a deploy.","gethamster\u002Fskills","gethamster","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F215697643?v=4","01M7B2R6PGB3SDZZ71E0WE2S74","Hamster","01M7B2R6Q21HWJRXZZWB78BNDG",4,"MIT","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002F.experimental\u002Fhamster-migration-rollout-safety\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: hamster-migration-rollout-safety\ndescription: \"Rollout safety rules for every change under apps\u002Fweb\u002Fsupabase\u002Fmigrations\u002F**. Use whenever you write, review, rename, or recover a Supabase migration — especially in pre-PR review or when a deploy broke an environment. Migrations install schema and fail closed; production data repair, backfill, reconciliation, and CREATE INDEX CONCURRENTLY belong in explicit audited scripts run before\u002Fafter deployment. Trigger even if the user only says 'add a column', 'fix these legacy rows in the migration', 'add an index', 'drop this old table', or 'just edit the migration that already shipped' — those are exactly the cases that corrupt data or wedge a deploy.\"\nversion: \"1.0.0\"\n---\n\n# Migration Rollout Safety\n\n## Why this skill exists\n\nA migration is not a script. It runs unattended, on every environment, at a time\nyou do not choose, against data you cannot inspect first. It has no dry run, no\nper-row audit log, no immutable reviewed plan of the rows it will touch, and no\nautomatic rollback or recovery once it has applied successfully — everything a\nrepair script gives you by construction. (A migration that raises inside an\nexplicit transaction *does* roll back — that is exactly why guards belong there;\nwhat you cannot undo is a migration that succeeded on data it should have\nrefused.) On dev and prod it runs through Supabase Branching — *outside* GitHub\nActions, before the new app code is serving — so a failure is invisible in CI\nand a silent success on wrong data is worse.\n\nRepeated failure modes this skill blocks:\n\n- An `update ... where \u003Clegacy condition>` buried in a migration, invented to\n  \"fix legacy rows\" — unbounded, and applied unattended the moment the PR\n  merges, without anyone inspecting the rows it affects or recording what it\n  changed.\n- `alter table ... add column if not exists` added to paper over a *local*\n  iteration — hiding the fact that the schema contract it depends on was never\n  merged, or was rejected.\n- `create index concurrently` inside a migration — index builds on real data\n  need an operator-controlled statement timeout, progress reporting, retry, and\n  `INVALID`-index recovery, none of which a migration can offer.\n- A blocking `create index` on a large existing table — it holds a write lock\n  for the whole build and can hit the runner's timeout. Separately, an\n  interrupted `CONCURRENTLY` build (from the out-of-band script) can leave an\n  `INVALID` index behind that `create index if not exists` will never repair.\n- `drop table` \u002F `drop column` on a state-bearing object that still has live\n  rows or still-referenced Vault secrets — data and secrets orphaned forever.\n- Editing or renaming a migration that already shipped, without knowing which\n  environments applied it.\n\n## Scope\n\nApplies to **any** change under `apps\u002Fweb\u002Fsupabase\u002Fmigrations\u002F**` — new file,\nedit to an unshipped file, emergency edit to a shipped file, or a rename.\n\nComplements, does not replace:\n\n| Need | Skill |\n| --- | --- |\n| Schema\u002FRLS\u002Ffunction conventions, diff workflow, env delivery matrix | `.agents\u002Fskills\u002Fhamster-database\u002FSKILL.md` |\n| Writing the audited repair\u002Fbackfill script this skill sends you to | `.agents\u002Fskills\u002Fbackfill-script-creator\u002FSKILL.md` |\n| Concurrent index builder scripts | `apps\u002Fweb\u002Fsupabase\u002Fscripts\u002Flib\u002Fconcurrent-index-build.sh` (header is the contract) |\n| Context-graph perf validation for index\u002FRPC changes | `.agents\u002Fskills\u002Fhamster-context-graph-perf\u002FSKILL.md` |\n\n## The core rule\n\n> **Migrations install schema and fail closed. Production data repair,\n> backfill, and reconciliation run in explicit, audited scripts — before or\n> after the deploy, never inside it.**\n\nA migration may *read* data to assert its own preconditions and postconditions.\nIt may not *fix* data it finds wrong. When the data is wrong, the migration\nraises and names the script the operator must run.\n\n## Decision table: migration or script?\n\n| What you need to do | Where it goes |\n| --- | --- |\n| Create\u002Falter table, column, constraint, enum, policy, trigger, function, view | Migration |\n| Create a small\u002Fnew-table index | Migration (`create index if not exists`) |\n| Create an index on a large existing table | `apps\u002Fweb\u002Fsupabase\u002Fscripts\u002Fbuild-*-index*.sh` (CONCURRENTLY, out of band) **before** the migration; the migration reconciles + asserts |\n| Repair legacy\u002Finvalid rows so new schema invariants hold | `apps\u002Fweb\u002Fsupabase\u002Fscripts\u002Frepair-*.ts` **before** the migration; the migration only asserts |\n| Populate a new column for existing rows (unbounded, or independent of the DDL) | `apps\u002Fweb\u002Fsupabase\u002Fscripts\u002Fbackfill-*.ts` **after** the migration |\n| Dedup rows before adding a unique constraint | `repair-*`\u002F`dedupe-*` script before; migration asserts zero duplicates, then adds the constraint |\n| Delete\u002Fcleanup obsolete rows or Vault secrets | Audited cleanup script (e.g. `cleanup-orphaned-connection-secrets.ts`); migration asserts empty and refuses otherwise |\n| Convert an existing column into its replacement, where the new schema is unusable without it and the conversion is bounded + deterministic | Migration, under the narrow exception below |\n| Reset\u002Fpatch a specific tenant's data | Script, never a migration |\n| Insert fixed-literal seed \u002F lookup rows the schema or product defines (idempotent, no dependency on existing rows) | Migration |\n\nRule of thumb: **if the statement reads or depends on production history, it\nbelongs in a script.** A statement whose row set is fixed literals, or derives\nonly from the DDL in the same file, may stay — the latter under the exception\nbelow.\n\n## Forbidden in migrations (pre-PR blockers)\n\n```sql\n-- ❌ Open-ended production repair: unbounded, no reviewed plan of the affected\n-- rows, no record of what changed, applied unattended on merge.\nupdate public.account_deletion_requests\nset lease_expires_at = coalesce(started_at, updated_at, now()) + interval '6 hours'\nwhere status = 'running' and lease_expires_at is null;\n\n-- ❌ Re-homing \u002F reparenting \u002F re-keying legacy rows by heuristic.\nupdate public.document d set parent_document_id = \u003Cguessed root> where \u003Cedge is invalid>;\n\n-- ❌ Deleting \"bad\" rows so a constraint can be added.\ndelete from public.sync_entity_mappings where \u003Cduplicate predicate>;\n\n-- ❌ Defensive DDL papering over a local revision: it hides that the schema\n-- contract it depends on was never merged (or was rejected).\nalter table public.account_deletion_requests\n  add column if not exists phase integer not null default 0;\n\n-- ❌ CREATE INDEX CONCURRENTLY: needs a dedicated session, an operator-set\n-- statement timeout, progress polling and INVALID-index recovery, so it belongs\n-- in a builder script — and it can never sit inside begin\u002Fcommit.\ncreate index concurrently idx_foo on public.big_table (account_id);\n\n-- ❌ Blocking build on a large existing table: holds a write lock for the whole\n-- build and can hit the runner's ~2 min cap, aborting the deploy.\ncreate index idx_foo on public.big_table (account_id);\n\n-- ❌ Unguarded destructive DDL on a state-bearing table that may hold live rows.\ndrop table public.job_webhook_secrets;\n```\n\n**What is not forbidden.** Inserting fixed-literal seed or lookup rows that the\nschema or product defines is ordinary migration work, provided it is idempotent\n(`on conflict do nothing` \u002F `where not exists`) and does not read existing rows.\nThe blocker targets `update`\u002F`delete` and any `insert` **derived from** existing\nrows — that is repair, not seeding.\n\nNote: `create index concurrently` is described as \"safe for large tables\" in\ngeneric Postgres advice and in older notes. **In this repo it is a blocker\ninside a migration** — not because concurrency is wrong, but because a real-data\nindex build needs an operator in the loop: a raised statement timeout, progress\nreporting, retry, and drop-and-rebuild recovery for an `INVALID` index, all of\nwhich the builder script provides and a migration cannot. On top of that, any\napply path that wraps the file in a transaction rejects `CONCURRENTLY` outright.\nUse the builder-script path.\n\nReplace each with: an assertion in the migration + a named script in the rollout\nnotes. Assertion template:\n\n```sql\ndo $$\ndeclare\n  v_invalid bigint;\nbegin\n  select count(*) into v_invalid\n  from public.document d\n  left join public.document p on p.id = d.parent_document_id\n  where d.document_type = 'blueprint'\n    and d.parent_document_id is not null\n    and (p.id is null or p.document_type \u003C> 'blueprint'\n         or p.account_id is distinct from d.account_id);\n\n  if v_invalid > 0 then\n    raise exception\n      'Cannot separate Blueprint folders: % Blueprint(s) have an invalid parent edge, which the new hierarchy reads would silently adopt into another bucket. Run supabase\u002Fscripts\u002Frepair-invalid-blueprint-parent-edges.ts --env \u003Cenv> --execute before retrying',\n      v_invalid\n      using errcode = '23514';\n  end if;\nend;\n$$;\n```\n\nAssertion quality bar — a raise that does not tell the operator what to run is\nhalf a guard:\n\n1. States the invariant that is now being trusted, and why violating it is bad.\n2. Reports the offending counts.\n3. Names the exact script + flags to fix it.\n4. Sets `using errcode = '23514'` (check violation) so it is distinguishable\n   from an incidental SQL error.\n5. Uses the **same predicate** the repair script postchecks, so \"script is\n   done\" means exactly \"migration will now pass\".\n\n## Narrow exception: schema-coupled conversion\n\nA data-touching statement may stay in the migration **only if every one of\nthese holds**. If you cannot state all five in the migration's comment header,\nit goes in a script.\n\n1. **Schema-coupled** — the new schema is unusable without it (e.g. a marker\n   column the new reads depend on), and it must be atomic with the DDL: a\n   window where the DDL has landed and the value has not is a broken product.\n2. **Bounded and derived from the DDL, not from history** — writes at most one\n   row per pre-existing logical entity (e.g. one workspace-root marker per\n   account), not \"all rows matching a legacy condition\".\n3. **Deterministic** — the source of the value is unambiguous and enforced. If\n   ambiguity is possible (two candidate roots), the migration must *refuse*, not\n   pick.\n4. **Transaction-wrapped, with the lock taken before the check** — see below.\n5. **Guarded by read-only pre- and post-assertions** — a preflight proving the\n   premise still holds *inside* the transaction, and a postcondition proving the\n   conversion actually produced the intended state.\n\nWorked example: `20260814101500_blueprint-workspace-root-marker.sql`. It adds\n`is_workspace_root`, derives it from the formerly-unique parentless root, and\nthen drops the index enforcing that uniqueness. Its preflight, inside the\ntransaction and behind the lock, proves (a) the old unique index still exists\n*and is valid*, and (b) every account owning Blueprints has exactly one\nparentless one — raising with the seeding script name when it does not. Whatever\nan operator queried before deploying is irrelevant; only a check inside the\ntransaction proves the premise still holds at apply time.\n\nMissing-vs-duplicate is worth reporting separately: they need different\nremediation (seed one, or reparent extras).\n\n## Explicit transactions and lock scope\n\n**Apply paths differ, so never rely on implicit atomicity.** A local\n`supabase migration up` may execute a migration's statements without wrapping\nthem, while remote `db push` \u002F Branching may wrap the file in a transaction. You\ncannot depend on either. Any migration that takes a lock, or performs a\nmulti-statement conversion that must be all-or-nothing, MUST open with `begin;`\nand end with `commit;` so its atomicity is a property of the file rather than of\nthe runner that happens to apply it.\n\n```sql\nbegin;\n\n-- Hold the writer lock for the whole transaction so no concurrent write can\n-- slip in between the check and the DDL. Reads are unaffected.\nlock table public.document in share row exclusive mode;\n\n-- preflight assertions (inside the transaction, behind the lock)\n-- DDL\n-- bounded conversion\n-- postcondition assertion\n\ncommit;\n```\n\nLock rules:\n\n- **Take the lock before you count.** A count outside the lock proves nothing:\n  a service-role insert between the count and the `drop`\u002F`alter` reintroduces\n  exactly the state you refused to run on.\n- **Pick the weakest lock that closes the race.** `share row exclusive` blocks\n  writers but not readers — right for a conversion. `access exclusive` (blocks\n  everything, including reads) is only for a `drop`-class change, e.g. proving\n  `public.job_webhook_secrets` is empty before dropping it.\n- **Keep the locked section short.** No unbounded scans, no per-row loops, no\n  `analyze` inside it.\n- `create index concurrently` cannot run inside a transaction block, so it can\n  never be added to a transaction-wrapped migration — and it needs\n  operator-controlled timeout, progress and `INVALID`-index recovery anyway, so\n  it moves out of band to a builder script (see below).\n\n## Concurrent index workflow\n\nNever `create index concurrently` in a migration. Never blocking-build on a\nlarge existing table. Instead:\n\n1. **Operator script**, declaring targets and delegating to the shared engine —\n   copy `apps\u002Fweb\u002Fsupabase\u002Fscripts\u002Fbuild-account-delete-foreign-key-indexes.sh`.\n   Set `TARGET_MIGRATION`, `NAMES`, `DDL` (`create index concurrently if not\n   exists ...`), `SIZE_TABLES`, `ANALYZE_TABLES`, then\n   `source lib\u002Fconcurrent-index-build.sh; concurrent_index_build_main \"$@\"`.\n   The engine owns dry-run-by-default, the env→session-pooler map, typed remote\n   confirmation, invalid-index scan, drop+rebuild of `INVALID` indexes, progress\n   polling, verify, and `analyze`.\n   - Remote envs must use the **session pooler (5432)** — the transaction pooler\n     (6543) cannot run `CONCURRENTLY`; the direct `db.\u003Cref>` host is IPv6-only.\n   - Run `--env \u003Cenv> --apply` on every **deployed** environment (dev, tux,\n     prod) *before* the migration lands there. Local is not a deployed env: a\n     fresh `pnpm supabase:web:reset` is reconciled by the migration's own\n     `create index if not exists`.\n2. **Migration reconciles and asserts.** Plain `create index if not exists` —\n   a fast no-op after the out-of-band build, and still correct for fresh local\n   and CI databases. Around it:\n   - **Preflight per target index:**\n     - *absent* → allowed only if the table is small; raise if\n       `pg_table_size(...) > 256 * 1024 * 1024`, because a blocking build there\n       would freeze writes. Name the builder script and `--env \u003Cenv> --apply`.\n     - *present but `INVALID`* (interrupted `CONCURRENTLY` build) → raise **at\n       any table size**. `create index if not exists` sees the name, skips\n       forever, and the index is never used. Only a drop + rebuild fixes it.\n   - **Postcondition:** every target index exists and `indisvalid`. This catches\n     an index dropped or invalidated between the preflight and the DDL, and any\n     target the reconciliation skipped. Report the offending names.\n\nReference implementation of both halves:\n`apps\u002Fweb\u002Fsupabase\u002Fmigrations\u002F20260814005700_index-account-delete-foreign-keys.sql`\nplus its builder script.\n\n## Destructive DDL\n\n`drop table` \u002F `drop column` on anything that holds production state must\n**assert empty state and stop if cleanup is needed** — never discard rows as a\nside effect of a schema change.\n\n**Scope:** this applies to *state-bearing* objects only. Dropping a stateless\nobject — function, policy, trigger, view — is ordinary schema work and needs no\nempty-state guard. For `drop column`, require either an assertion that no\nnon-null values remain, **or** explicit reviewed evidence in the PR that\ndiscarding that data is intentional.\n\n```sql\nbegin;\n\n-- Strongest lock: taken before counting, so nothing can be inserted between\n-- the count and the DROP.\nlock table public.job_webhook_secrets in access exclusive mode;\n\ndo $$\ndeclare\n  v_rows bigint;\n  v_secrets bigint;\nbegin\n  select count(*) into v_rows from public.job_webhook_secrets;\n\n  select count(*) into v_secrets\n  from vault.secrets\n  where name like 'job!_webhook!_%' escape '!';\n\n  if v_rows > 0 or v_secrets > 0 then\n    raise exception\n      'Cannot remove per-job webhook secrets: % row(s) remain in public.job_webhook_secrets and % Vault secret(s) named job_webhook_%% remain. Resolve them with a reviewed, audited cleanup before retrying',\n      v_rows, v_secrets\n      using errcode = '23514';\n  end if;\nend;\n$$;\n\ndrop table public.job_webhook_secrets;\n\ncommit;\n```\n\nChecklist:\n\n- Count the rows **and** every satellite resource the rows own (Vault secrets,\n  storage objects, queue jobs). A dropped row that owned a Vault secret orphans\n  that secret permanently — `on delete cascade` does not reach `vault.secrets`.\n- Escape `_`\u002F`%` in `like` patterns (`like 'job!_webhook!_%' escape '!'`) —\n  unescaped wildcards silently widen or narrow the match.\n- Double `%%` in `raise` format strings when the literal `%` is part of the\n  message.\n- Cleanup lives in a script (see `cleanup-orphaned-connection-secrets.ts`,\n  `revoke-orphaned-context-connection-secrets.ts`), not in the migration.\n\n## Editing a migration that already shipped\n\n**Default: write a follow-up migration.** Editing or renaming a shipped file is\nan emergency exception, permitted only when both hold:\n\n1. **Environment migration state is proven** — you have confirmed, per\n   environment, whether the file was already applied. Supabase Dashboard →\n   Database → Migrations for dev\u002Fprod; the `migrate-tux` job log for tux.\n   \"Probably not applied yet\" is not proof.\n2. **Rollout and reconciliation are explicit** — the PR states, per\n   environment, what will happen on the next apply and what an operator must\n   run to converge already-applied environments.\n\n| Env | How schema arrives | Visible in GitHub Actions? | Effect of editing a shipped file |\n| --- | --- | --- | --- |\n| local | `pnpm supabase:web:reset` | n\u002Fa | Free; reset re-applies from scratch |\n| dev | Supabase Branching on `dev` | No | Already applied (async, ungated by CI). Edited SQL does **not** re-run; a **rename** re-runs the whole file and fails on any non-idempotent statement |\n| tux | `supabase db push` in the `migrate-tux` CI job | Yes (gates `deploy-tux`) | Pushes anything not yet applied; a renamed file with new SQL executes as a fresh migration |\n| prod | Supabase Branching on `main` | No | Same as dev |\n\nConsequences to reason about explicitly:\n\n- A rename is a **new** migration to Branching: every statement in the file must\n  be idempotent (`if not exists`, `create or replace`, `drop ... if exists` +\n  recreate) or dev\u002Fprod will fail on a duplicate-object error. This is a\n  different question from \"is the SQL correct\".\n- Editing SQL in place converges nothing on dev\u002Fprod — the old version stays\n  applied. Any divergence must be closed by a follow-up migration or a script.\n- A guard added to an already-applied migration is still worth adding: it\n  protects the environments that have not applied it yet and every fresh\n  database (local, CI, new branch). Say so in the PR, and say what closes the\n  gap on the environments that already ran the unguarded version.\n- Renaming for the ordering check (`.github\u002Fworkflows\u002F101-pr-policy.yml`, which\n  runs `apps\u002Fweb\u002Fsupabase\u002Fscripts\u002Fcheck-migration-order.ts`)\n  uses `date -u +%Y%m%d%H%M%S` — never bare `date`. See\n  `.agents\u002Fskills\u002Fhamster-database\u002Freferences\u002Frules\u002Fmigration-workflow.md`.\n\n## Required PR \u002F runbook evidence\n\nA migration PR is not reviewable without these. Missing evidence is a blocker.\n\n- **Rollout order**, explicitly ordered, per environment: which script runs\n  before the migration, which after, and which are no-ops. Repeat it as a\n  comment header in the migration file itself (`-- ROLLOUT: ...`), because the\n  operator debugging a failed Branching apply reads the SQL, not the PR.\n- **Preconditions asserted** — list them, and for each, the script that fixes a\n  violation.\n- **Postconditions asserted** — what proves the migration achieved its intent.\n- **Lock and transaction posture** — which lock mode, why that mode, and\n  confirmation of explicit `begin;`\u002F`commit;` if a lock or atomic conversion is\n  involved.\n- **Script evidence** — dry-run output per environment for every script in the\n  rollout, and a note that the script's postcheck uses the migration's\n  predicate.\n- **Fresh-database proof** — `pnpm supabase:web:reset` succeeds (guards must not\n  fire on an empty database), plus\n  `pnpm supabase:web:diff:drift-check` after editing any schema or\n  migration file, and regenerated types (`pnpm supabase:web:typegen`).\n- **Shipped-file edits** — the environment state proof and convergence plan from\n  the section above.\n\n## Pre-PR review: blocker triage\n\nStart from the staged diff:\n\n```bash\ngit diff origin\u002Fdev...HEAD --name-only -- 'apps\u002Fweb\u002Fsupabase\u002Fmigrations\u002F**'\ngit diff origin\u002Fdev...HEAD -- 'apps\u002Fweb\u002Fsupabase\u002Fmigrations\u002F**'\n```\n\nRead every added statement against the table below.\n\n| Finding | Severity |\n| --- | --- |\n| `create index concurrently` inside a migration | **Blocker** |\n| Non-concurrent index build on a large existing table, no size guard | **Blocker** |\n| `update`\u002F`delete`, or an `insert` derived from existing rows, that fails the five-point exception | **Blocker** |\n| `drop table`\u002F`drop column` on a state-bearing object with no empty-state assertion (and, for `drop column`, no reviewed evidence that discarding the data is intended) | **Blocker** |\n| Lock taken, or atomic conversion performed, without explicit `begin;`\u002F`commit;` | **Blocker** |\n| Count\u002Fassertion taken before the lock (racy guard) | **Blocker** |\n| Edit or rename of a shipped migration without proven env state + convergence plan | **Blocker** |\n| `add column if not exists` covering a local-only iteration | **Blocker** (fold into the original DDL) |\n| Assertion that raises without naming the remediation script, or without `errcode` | Should-fix |\n| Missing postcondition assertion on a conversion or index reconciliation | Should-fix |\n| Rollout order absent from the migration's comment header | Should-fix |\n\n## Key paths\n\n| Path | Purpose |\n| --- | --- |\n| `apps\u002Fweb\u002Fsupabase\u002Fmigrations\u002F` | Migrations (this skill's scope) |\n| `apps\u002Fweb\u002Fsupabase\u002Fscripts\u002Flib\u002Fconcurrent-index-build.sh` | Shared CONCURRENTLY build engine + flag contract |\n| `apps\u002Fweb\u002Fsupabase\u002Fscripts\u002Fbuild-account-delete-foreign-key-indexes.sh` | Builder script to copy |\n| `apps\u002Fweb\u002Fsupabase\u002Fscripts\u002Frepair-invalid-blueprint-parent-edges.ts` | Audited pre-migration repair to copy |\n| `apps\u002Fweb\u002Fsupabase\u002Fscripts\u002Fcheck-migration-order.ts` | Local ordering check |\n| `.github\u002Fworkflows\u002F101-pr-policy.yml` | CI gate that runs the ordering check |\n","# Migration Rollout Safety\n\n## Why this skill exists\n\nA migration is not a script. It runs unattended, on every environment, at a time\nyou do not choose, against data you cannot inspect first. It has no dry run, no\nper-row audit log, no immutable reviewed plan of the rows it will touch, and no\nautomatic rollback or recovery once it has applied successfully — everything a\nrepair script gives you by construction. (A migration that raises inside an\nexplicit transaction *does* roll back — that is exactly why guards belong there;\nwhat you cannot undo is a migration that succeeded on data it should have\nrefused.) On dev and prod it runs through Supabase Branching — *outside* GitHub\nActions, before the new app code is serving — so a failure is invisible in CI\nand a silent success on wrong data is worse.\n\nRepeated failure modes this skill blocks:\n\n- An `update ... where \u003Clegacy condition>` buried in a migration, invented to\n  \"fix legacy rows\" — unbounded, and applied unattended the moment the PR\n  merges, without anyone inspecting the rows it affects or recording what it\n  changed.\n- `alter table ... add column if not exists` added to paper over a *local*\n  iteration — hiding the fact that the schema contract it depends on was never\n  merged, or was rejected.\n- `create index concurrently` inside a migration — index builds on real data\n  need an operator-controlled statement timeout, progress reporting, retry, and\n  `INVALID`-index recovery, none of which a migration can offer.\n- A blocking `create index` on a large existing table — it holds a write lock\n  for the whole build and can hit the runner's timeout. Separately, an\n  interrupted `CONCURRENTLY` build (from the out-of-band script) can leave an\n  `INVALID` index behind that `create index if not exists` will never repair.\n- `drop table` \u002F `drop column` on a state-bearing object that still has live\n  rows or still-referenced Vault secrets — data and secrets orphaned forever.\n- Editing or renaming a migration that already shipped, without knowing which\n  environments applied it.\n\n## Scope\n\nApplies to **any** change under `apps\u002Fweb\u002Fsupabase\u002Fmigrations\u002F**` — new file,\nedit to an unshipped file, emergency edit to a shipped file, or a rename.\n\nComplements, does not replace:\n\n| Need | Skill |\n| --- | --- |\n| Schema\u002FRLS\u002Ffunction conventions, diff workflow, env delivery matrix | `.agents\u002Fskills\u002Fhamster-database\u002FSKILL.md` |\n| Writing the audited repair\u002Fbackfill script this skill sends you to | `.agents\u002Fskills\u002Fbackfill-script-creator\u002FSKILL.md` |\n| Concurrent index builder scripts | `apps\u002Fweb\u002Fsupabase\u002Fscripts\u002Flib\u002Fconcurrent-index-build.sh` (header is the contract) |\n| Context-graph perf validation for index\u002FRPC changes | `.agents\u002Fskills\u002Fhamster-context-graph-perf\u002FSKILL.md` |\n\n## The core rule\n\n> **Migrations install schema and fail closed. Production data repair,\n> backfill, and reconciliation run in explicit, audited scripts — before or\n> after the deploy, never inside it.**\n\nA migration may *read* data to assert its own preconditions and postconditions.\nIt may not *fix* data it finds wrong. When the data is wrong, the migration\nraises and names the script the operator must run.\n\n## Decision table: migration or script?\n\n| What you need to do | Where it goes |\n| --- | --- |\n| Create\u002Falter table, column, constraint, enum, policy, trigger, function, view | Migration |\n| Create a small\u002Fnew-table index | Migration (`create index if not exists`) |\n| Create an index on a large existing table | `apps\u002Fweb\u002Fsupabase\u002Fscripts\u002Fbuild-*-index*.sh` (CONCURRENTLY, out of band) **before** the migration; the migration reconciles + asserts |\n| Repair legacy\u002Finvalid rows so new schema invariants hold | `apps\u002Fweb\u002Fsupabase\u002Fscripts\u002Frepair-*.ts` **before** the migration; the migration only asserts |\n| Populate a new column for existing rows (unbounded, or independent of the DDL) | `apps\u002Fweb\u002Fsupabase\u002Fscripts\u002Fbackfill-*.ts` **after** the migration |\n| Dedup rows before adding a unique constraint | `repair-*`\u002F`dedupe-*` script before; migration asserts zero duplicates, then adds the constraint |\n| Delete\u002Fcleanup obsolete rows or Vault secrets | Audited cleanup script (e.g. `cleanup-orphaned-connection-secrets.ts`); migration asserts empty and refuses otherwise |\n| Convert an existing column into its replacement, where the new schema is unusable without it and the conversion is bounded + deterministic | Migration, under the narrow exception below |\n| Reset\u002Fpatch a specific tenant's data | Script, never a migration |\n| Insert fixed-literal seed \u002F lookup rows the schema or product defines (idempotent, no dependency on existing rows) | Migration |\n\nRule of thumb: **if the statement reads or depends on production history, it\nbelongs in a script.** A statement whose row set is fixed literals, or derives\nonly from the DDL in the same file, may stay — the latter under the exception\nbelow.\n\n## Forbidden in migrations (pre-PR blockers)\n\n```sql\n-- ❌ Open-ended production repair: unbounded, no reviewed plan of the affected\n-- rows, no record of what changed, applied unattended on merge.\nupdate public.account_deletion_requests\nset lease_expires_at = coalesce(started_at, updated_at, now()) + interval '6 hours'\nwhere status = 'running' and lease_expires_at is null;\n\n-- ❌ Re-homing \u002F reparenting \u002F re-keying legacy rows by heuristic.\nupdate public.document d set parent_document_id = \u003Cguessed root> where \u003Cedge is invalid>;\n\n-- ❌ Deleting \"bad\" rows so a constraint can be added.\ndelete from public.sync_entity_mappings where \u003Cduplicate predicate>;\n\n-- ❌ Defensive DDL papering over a local revision: it hides that the schema\n-- contract it depends on was never merged (or was rejected).\nalter table public.account_deletion_requests\n  add column if not exists phase integer not null default 0;\n\n-- ❌ CREATE INDEX CONCURRENTLY: needs a dedicated session, an operator-set\n-- statement timeout, progress polling and INVALID-index recovery, so it belongs\n-- in a builder script — and it can never sit inside begin\u002Fcommit.\ncreate index concurrently idx_foo on public.big_table (account_id);\n\n-- ❌ Blocking build on a large existing table: holds a write lock for the whole\n-- build and can hit the runner's ~2 min cap, aborting the deploy.\ncreate index idx_foo on public.big_table (account_id);\n\n-- ❌ Unguarded destructive DDL on a state-bearing table that may hold live rows.\ndrop table public.job_webhook_secrets;\n```\n\n**What is not forbidden.** Inserting fixed-literal seed or lookup rows that the\nschema or product defines is ordinary migration work, provided it is idempotent\n(`on conflict do nothing` \u002F `where not exists`) and does not read existing rows.\nThe blocker targets `update`\u002F`delete` and any `insert` **derived from** existing\nrows — that is repair, not seeding.\n\nNote: `create index concurrently` is described as \"safe for large tables\" in\ngeneric Postgres advice and in older notes. **In this repo it is a blocker\ninside a migration** — not because concurrency is wrong, but because a real-data\nindex build needs an operator in the loop: a raised statement timeout, progress\nreporting, retry, and drop-and-rebuild recovery for an `INVALID` index, all of\nwhich the builder script provides and a migration cannot. On top of that, any\napply path that wraps the file in a transaction rejects `CONCURRENTLY` outright.\nUse the builder-script path.\n\nReplace each with: an assertion in the migration + a named script in the rollout\nnotes. Assertion template:\n\n```sql\ndo $$\ndeclare\n  v_invalid bigint;\nbegin\n  select count(*) into v_invalid\n  from public.document d\n  left join public.document p on p.id = d.parent_document_id\n  where d.document_type = 'blueprint'\n    and d.parent_document_id is not null\n    and (p.id is null or p.document_type \u003C> 'blueprint'\n         or p.account_id is distinct from d.account_id);\n\n  if v_invalid > 0 then\n    raise exception\n      'Cannot separate Blueprint folders: % Blueprint(s) have an invalid parent edge, which the new hierarchy reads would silently adopt into another bucket. Run supabase\u002Fscripts\u002Frepair-invalid-blueprint-parent-edges.ts --env \u003Cenv> --execute before retrying',\n      v_invalid\n      using errcode = '23514';\n  end if;\nend;\n$$;\n```\n\nAssertion quality bar — a raise that does not tell the operator what to run is\nhalf a guard:\n\n1. States the invariant that is now being trusted, and why violating it is bad.\n2. Reports the offending counts.\n3. Names the exact script + flags to fix it.\n4. Sets `using errcode = '23514'` (check violation) so it is distinguishable\n   from an incidental SQL error.\n5. Uses the **same predicate** the repair script postchecks, so \"script is\n   done\" means exactly \"migration will now pass\".\n\n## Narrow exception: schema-coupled conversion\n\nA data-touching statement may stay in the migration **only if every one of\nthese holds**. If you cannot state all five in the migration's comment header,\nit goes in a script.\n\n1. **Schema-coupled** — the new schema is unusable without it (e.g. a marker\n   column the new reads depend on), and it must be atomic with the DDL: a\n   window where the DDL has landed and the value has not is a broken product.\n2. **Bounded and derived from the DDL, not from history** — writes at most one\n   row per pre-existing logical entity (e.g. one workspace-root marker per\n   account), not \"all rows matching a legacy condition\".\n3. **Deterministic** — the source of the value is unambiguous and enforced. If\n   ambiguity is possible (two candidate roots), the migration must *refuse*, not\n   pick.\n4. **Transaction-wrapped, with the lock taken before the check** — see below.\n5. **Guarded by read-only pre- and post-assertions** — a preflight proving the\n   premise still holds *inside* the transaction, and a postcondition proving the\n   conversion actually produced the intended state.\n\nWorked example: `20260814101500_blueprint-workspace-root-marker.sql`. It adds\n`is_workspace_root`, derives it from the formerly-unique parentless root, and\nthen drops the index enforcing that uniqueness. Its preflight, inside the\ntransaction and behind the lock, proves (a) the old unique index still exists\n*and is valid*, and (b) every account owning Blueprints has exactly one\nparentless one — raising with the seeding script name when it does not. Whatever\nan operator queried before deploying is irrelevant; only a check inside the\ntransaction proves the premise still holds at apply time.\n\nMissing-vs-duplicate is worth reporting separately: they need different\nremediation (seed one, or reparent extras).\n\n## Explicit transactions and lock scope\n\n**Apply paths differ, so never rely on implicit atomicity.** A local\n`supabase migration up` may execute a migration's statements without wrapping\nthem, while remote `db push` \u002F Branching may wrap the file in a transaction. You\ncannot depend on either. Any migration that takes a lock, or performs a\nmulti-statement conversion that must be all-or-nothing, MUST open with `begin;`\nand end with `commit;` so its atomicity is a property of the file rather than of\nthe runner that happens to apply it.\n\n```sql\nbegin;\n\n-- Hold the writer lock for the whole transaction so no concurrent write can\n-- slip in between the check and the DDL. Reads are unaffected.\nlock table public.document in share row exclusive mode;\n\n-- preflight assertions (inside the transaction, behind the lock)\n-- DDL\n-- bounded conversion\n-- postcondition assertion\n\ncommit;\n```\n\nLock rules:\n\n- **Take the lock before you count.** A count outside the lock proves nothing:\n  a service-role insert between the count and the `drop`\u002F`alter` reintroduces\n  exactly the state you refused to run on.\n- **Pick the weakest lock that closes the race.** `share row exclusive` blocks\n  writers but not readers — right for a conversion. `access exclusive` (blocks\n  everything, including reads) is only for a `drop`-class change, e.g. proving\n  `public.job_webhook_secrets` is empty before dropping it.\n- **Keep the locked section short.** No unbounded scans, no per-row loops, no\n  `analyze` inside it.\n- `create index concurrently` cannot run inside a transaction block, so it can\n  never be added to a transaction-wrapped migration — and it needs\n  operator-controlled timeout, progress and `INVALID`-index recovery anyway, so\n  it moves out of band to a builder script (see below).\n\n## Concurrent index workflow\n\nNever `create index concurrently` in a migration. Never blocking-build on a\nlarge existing table. Instead:\n\n1. **Operator script**, declaring targets and delegating to the shared engine —\n   copy `apps\u002Fweb\u002Fsupabase\u002Fscripts\u002Fbuild-account-delete-foreign-key-indexes.sh`.\n   Set `TARGET_MIGRATION`, `NAMES`, `DDL` (`create index concurrently if not\n   exists ...`), `SIZE_TABLES`, `ANALYZE_TABLES`, then\n   `source lib\u002Fconcurrent-index-build.sh; concurrent_index_build_main \"$@\"`.\n   The engine owns dry-run-by-default, the env→session-pooler map, typed remote\n   confirmation, invalid-index scan, drop+rebuild of `INVALID` indexes, progress\n   polling, verify, and `analyze`.\n   - Remote envs must use the **session pooler (5432)** — the transaction pooler\n     (6543) cannot run `CONCURRENTLY`; the direct `db.\u003Cref>` host is IPv6-only.\n   - Run `--env \u003Cenv> --apply` on every **deployed** environment (dev, tux,\n     prod) *before* the migration lands there. Local is not a deployed env: a\n     fresh `pnpm supabase:web:reset` is reconciled by the migration's own\n     `create index if not exists`.\n2. **Migration reconciles and asserts.** Plain `create index if not exists` —\n   a fast no-op after the out-of-band build, and still correct for fresh local\n   and CI databases. Around it:\n   - **Preflight per target index:**\n     - *absent* → allowed only if the table is small; raise if\n       `pg_table_size(...) > 256 * 1024 * 1024`, because a blocking build there\n       would freeze writes. Name the builder script and `--env \u003Cenv> --apply`.\n     - *present but `INVALID`* (interrupted `CONCURRENTLY` build) → raise **at\n       any table size**. `create index if not exists` sees the name, skips\n       forever, and the index is never used. Only a drop + rebuild fixes it.\n   - **Postcondition:** every target index exists and `indisvalid`. This catches\n     an index dropped or invalidated between the preflight and the DDL, and any\n     target the reconciliation skipped. Report the offending names.\n\nReference implementation of both halves:\n`apps\u002Fweb\u002Fsupabase\u002Fmigrations\u002F20260814005700_index-account-delete-foreign-keys.sql`\nplus its builder script.\n\n## Destructive DDL\n\n`drop table` \u002F `drop column` on anything that holds production state must\n**assert empty state and stop if cleanup is needed** — never discard rows as a\nside effect of a schema change.\n\n**Scope:** this applies to *state-bearing* objects only. Dropping a stateless\nobject — function, policy, trigger, view — is ordinary schema work and needs no\nempty-state guard. For `drop column`, require either an assertion that no\nnon-null values remain, **or** explicit reviewed evidence in the PR that\ndiscarding that data is intentional.\n\n```sql\nbegin;\n\n-- Strongest lock: taken before counting, so nothing can be inserted between\n-- the count and the DROP.\nlock table public.job_webhook_secrets in access exclusive mode;\n\ndo $$\ndeclare\n  v_rows bigint;\n  v_secrets bigint;\nbegin\n  select count(*) into v_rows from public.job_webhook_secrets;\n\n  select count(*) into v_secrets\n  from vault.secrets\n  where name like 'job!_webhook!_%' escape '!';\n\n  if v_rows > 0 or v_secrets > 0 then\n    raise exception\n      'Cannot remove per-job webhook secrets: % row(s) remain in public.job_webhook_secrets and % Vault secret(s) named job_webhook_%% remain. Resolve them with a reviewed, audited cleanup before retrying',\n      v_rows, v_secrets\n      using errcode = '23514';\n  end if;\nend;\n$$;\n\ndrop table public.job_webhook_secrets;\n\ncommit;\n```\n\nChecklist:\n\n- Count the rows **and** every satellite resource the rows own (Vault secrets,\n  storage objects, queue jobs). A dropped row that owned a Vault secret orphans\n  that secret permanently — `on delete cascade` does not reach `vault.secrets`.\n- Escape `_`\u002F`%` in `like` patterns (`like 'job!_webhook!_%' escape '!'`) —\n  unescaped wildcards silently widen or narrow the match.\n- Double `%%` in `raise` format strings when the literal `%` is part of the\n  message.\n- Cleanup lives in a script (see `cleanup-orphaned-connection-secrets.ts`,\n  `revoke-orphaned-context-connection-secrets.ts`), not in the migration.\n\n## Editing a migration that already shipped\n\n**Default: write a follow-up migration.** Editing or renaming a shipped file is\nan emergency exception, permitted only when both hold:\n\n1. **Environment migration state is proven** — you have confirmed, per\n   environment, whether the file was already applied. Supabase Dashboard →\n   Database → Migrations for dev\u002Fprod; the `migrate-tux` job log for tux.\n   \"Probably not applied yet\" is not proof.\n2. **Rollout and reconciliation are explicit** — the PR states, per\n   environment, what will happen on the next apply and what an operator must\n   run to converge already-applied environments.\n\n| Env | How schema arrives | Visible in GitHub Actions? | Effect of editing a shipped file |\n| --- | --- | --- | --- |\n| local | `pnpm supabase:web:reset` | n\u002Fa | Free; reset re-applies from scratch |\n| dev | Supabase Branching on `dev` | No | Already applied (async, ungated by CI). Edited SQL does **not** re-run; a **rename** re-runs the whole file and fails on any non-idempotent statement |\n| tux | `supabase db push` in the `migrate-tux` CI job | Yes (gates `deploy-tux`) | Pushes anything not yet applied; a renamed file with new SQL executes as a fresh migration |\n| prod | Supabase Branching on `main` | No | Same as dev |\n\nConsequences to reason about explicitly:\n\n- A rename is a **new** migration to Branching: every statement in the file must\n  be idempotent (`if not exists`, `create or replace`, `drop ... if exists` +\n  recreate) or dev\u002Fprod will fail on a duplicate-object error. This is a\n  different question from \"is the SQL correct\".\n- Editing SQL in place converges nothing on dev\u002Fprod — the old version stays\n  applied. Any divergence must be closed by a follow-up migration or a script.\n- A guard added to an already-applied migration is still worth adding: it\n  protects the environments that have not applied it yet and every fresh\n  database (local, CI, new branch). Say so in the PR, and say what closes the\n  gap on the environments that already ran the unguarded version.\n- Renaming for the ordering check (`.github\u002Fworkflows\u002F101-pr-policy.yml`, which\n  runs `apps\u002Fweb\u002Fsupabase\u002Fscripts\u002Fcheck-migration-order.ts`)\n  uses `date -u +%Y%m%d%H%M%S` — never bare `date`. See\n  `.agents\u002Fskills\u002Fhamster-database\u002Freferences\u002Frules\u002Fmigration-workflow.md`.\n\n## Required PR \u002F runbook evidence\n\nA migration PR is not reviewable without these. Missing evidence is a blocker.\n\n- **Rollout order**, explicitly ordered, per environment: which script runs\n  before the migration, which after, and which are no-ops. Repeat it as a\n  comment header in the migration file itself (`-- ROLLOUT: ...`), because the\n  operator debugging a failed Branching apply reads the SQL, not the PR.\n- **Preconditions asserted** — list them, and for each, the script that fixes a\n  violation.\n- **Postconditions asserted** — what proves the migration achieved its intent.\n- **Lock and transaction posture** — which lock mode, why that mode, and\n  confirmation of explicit `begin;`\u002F`commit;` if a lock or atomic conversion is\n  involved.\n- **Script evidence** — dry-run output per environment for every script in the\n  rollout, and a note that the script's postcheck uses the migration's\n  predicate.\n- **Fresh-database proof** — `pnpm supabase:web:reset` succeeds (guards must not\n  fire on an empty database), plus\n  `pnpm supabase:web:diff:drift-check` after editing any schema or\n  migration file, and regenerated types (`pnpm supabase:web:typegen`).\n- **Shipped-file edits** — the environment state proof and convergence plan from\n  the section above.\n\n## Pre-PR review: blocker triage\n\nStart from the staged diff:\n\n```bash\ngit diff origin\u002Fdev...HEAD --name-only -- 'apps\u002Fweb\u002Fsupabase\u002Fmigrations\u002F**'\ngit diff origin\u002Fdev...HEAD -- 'apps\u002Fweb\u002Fsupabase\u002Fmigrations\u002F**'\n```\n\nRead every added statement against the table below.\n\n| Finding | Severity |\n| --- | --- |\n| `create index concurrently` inside a migration | **Blocker** |\n| Non-concurrent index build on a large existing table, no size guard | **Blocker** |\n| `update`\u002F`delete`, or an `insert` derived from existing rows, that fails the five-point exception | **Blocker** |\n| `drop table`\u002F`drop column` on a state-bearing object with no empty-state assertion (and, for `drop column`, no reviewed evidence that discarding the data is intended) | **Blocker** |\n| Lock taken, or atomic conversion performed, without explicit `begin;`\u002F`commit;` | **Blocker** |\n| Count\u002Fassertion taken before the lock (racy guard) | **Blocker** |\n| Edit or rename of a shipped migration without proven env state + convergence plan | **Blocker** |\n| `add column if not exists` covering a local-only iteration | **Blocker** (fold into the original DDL) |\n| Assertion that raises without naming the remediation script, or without `errcode` | Should-fix |\n| Missing postcondition assertion on a conversion or index reconciliation | Should-fix |\n| Rollout order absent from the migration's comment header | Should-fix |\n\n## Key paths\n\n| Path | Purpose |\n| --- | --- |\n| `apps\u002Fweb\u002Fsupabase\u002Fmigrations\u002F` | Migrations (this skill's scope) |\n| `apps\u002Fweb\u002Fsupabase\u002Fscripts\u002Flib\u002Fconcurrent-index-build.sh` | Shared CONCURRENTLY build engine + flag contract |\n| `apps\u002Fweb\u002Fsupabase\u002Fscripts\u002Fbuild-account-delete-foreign-key-indexes.sh` | Builder script to copy |\n| `apps\u002Fweb\u002Fsupabase\u002Fscripts\u002Frepair-invalid-blueprint-parent-edges.ts` | Audited pre-migration repair to copy |\n| `apps\u002Fweb\u002Fsupabase\u002Fscripts\u002Fcheck-migration-order.ts` | Local ordering check |\n| `.github\u002Fworkflows\u002F101-pr-policy.yml` | CI gate that runs the ordering check |\n",{"name":5,"version":24,"description":7},"1.0.0","main","fe3bb1476c3ec23d8a366eac0fa8cd9f0852360a","skills\u002F.experimental\u002Fhamster-migration-rollout-safety",0,"https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills","https:\u002F\u002Fgithub.com\u002Fgethamster","https:\u002F\u002Ftryhamster.com","We're building the AI-native future of work, unlocking the promised acceleration for your whole team, from idea to impact.","2026-11-05 11:33:33",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add gethamster\u002Fskills --skill hamster-migration-rollout-safety",{"tool":40,"command":41},"bunx","bunx skills add gethamster\u002Fskills --skill hamster-migration-rollout-safety",{"tool":43,"command":44},"pnpm","pnpm dlx skills add gethamster\u002Fskills --skill hamster-migration-rollout-safety","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002F.experimental\u002Fhamster-migration-rollout-safety\u002FSKILL.md",true,[],[49,56,63,70,77,84],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M7B5MWYW0KE251276S56KQDZ","writing-waterfall-requirements-documents","Write a waterfall requirements document: elicit, structure and review testable, traceable requirements, then baseline the specification before design.","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-waterfall-requirements-documents\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7B5MRCXWWPKREPB1CHQ7H90","writing-vision-and-values-statements","Write a V2MOM vision a reader can test and a ranked list of values that settles real tradeoffs, so the rest of the document has a clear anchor.","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-vision-and-values-statements\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7B5MKH2CH22YZAHQW3080VQ","writing-system-prompts-for-claude","Write Claude prompts and CLAUDE.md files that supply exact inputs, scope the task, and define done so the first attempt can be checked.","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-system-prompts-for-claude\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7B5ME1Y3X9RNRKP5HKHKACZ","writing-page-specific-website-copy","Website copywriting by page type: write homepage, landing page, pricing page and feature page copy that fits each page's visitor and single job.","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-page-specific-website-copy\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7B5M8MQNM8MN8PYH6BVWJ2B","writing-internal-press-releases","How to write an internal press release: the one-page working backwards press release that opens a PR\u002FFAQ document before anything is built.","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-internal-press-releases\u002FSKILL.md",[],[],{"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":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7B5M3P3YH1XF37R8PWXXSBK","writing-email-sequences-that-sell","Email sequence copywriting for nurture and sales: give each email one job, write clear subject lines, and close with one specific call to action.","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-email-sequences-that-sell\u002FSKILL.md",[],[]]