Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add OKHP3/skillz --skill data-migrationgit clone --depth 1 https://github.com/OKHP3/skillzWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/okhp3/skillz/data-migration)<a href="https://agentmods.dev/skills/okhp3/skillz/data-migration"><img src="https://agentmods.dev/badge/skills/okhp3/skillz/data-migration/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/okhp3/skillz/data-migration"><img src="https://agentmods.dev/badge/skills/okhp3/skillz/data-migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00088 | $0.01166 |
| Opus 5 | $0.00044 | $0.00583 |
| Sonnet 5 | $0.00018 | $0.00233 |
| Haiku 4.5 | $0.00009 | $0.00117 |
Grade A, and why
data-migration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Data migration
Migrations are the most irreversible thing most engineers do routinely. Code can be rolled back; a dropped column cannot, and a botched backfill can corrupt data in ways no deploy fixes.
Two properties make a migration safe, and both must hold:
- Backwards compatible: the currently deployed code works before and after it runs
- Reversible, or backed up: you can get back, or you have a copy you have tested restoring
If a migration has neither, it needs a maintenance window and a rehearsal.
1. Never combine schema change with data change
Separate migrations, separate deploys:
- Add the new structure
- Backfill it
- Switch the code to use it
- Remove the old structure — later, as its own change
Combining these makes rollback impossible: reverting the code leaves the data half-moved, and reverting the data loses whatever the new code wrote.
Done when: each step is independently deployable and revertible.
2. Use expand-then-contract for anything breaking
Renaming a column is not a rename in production. It is:
- Expand — add
new_name, nullable - Dual-write — deploy code writing both; reads still use the old
- Backfill — populate
new_namefor existing rows, in batches - Switch reads — deploy code reading the new column
- Stop writing the old
- Contract — drop
old_name, well after everything is stable
Slow and boring, and it is the only way to do it without a window. Each step is individually safe to roll back.
Done when: no single step breaks the currently running code.
3. Know which operations take locks
The operation that takes an exclusive lock on a large table stops all writes for its duration. This is the most common cause of migration incidents, and the details are engine-specific — check yours.
Common traps in Postgres:
- Adding an index without
CONCURRENTLYblocks writes for the build - Adding a column with a volatile default rewrites the table on older versions
- Changing a column type usually rewrites
- Adding a foreign key takes a lock on both tables while validating — add
NOT VALID, then validate separately - A migration waiting behind a long transaction queues everything behind it, so a "fast" migration can still cause an outage
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 117 lines · 88 tokens per session scan A 2a33c8fae2b6
data-migration is a skill published in the GitHub repository OKHP3/skillz (3 stars, last pushed yesterday), licensed MIT. It adds 88 tokens to every session and 1,166 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
web-backend-builder
Scaffold backend API, data models, ORM setup, and endpoint inventory with OpenAPI output.
web-database-validator
Validate database schema, migrations, indexes, and query behavior with structured pass/fail reporting.
baoyu-danger-gemini-web
Generates images and text via reverse-engineered Gemini Web API. Supports text generation, image generation from prompts, reference images for vision input, and multi-turn conversations. Use when other skills need image generation backend, or when user requests "generate image with Gemini", "Gemini text generation"…
ecto-patterns
Ecto patterns — schemas, changesets, queries, migrations, Multi, associations, preloads, upserts. Use when editing Repo calls, Ecto.Query, or schema fields. Skip for Ash.
vastai
Vast.ai CLI to manage GPU instances, volumes, serverless endpoints, and billing.
cwicr-data-loader
Load and parse DDC CWICR construction cost database from multiple formats: Parquet, Excel, CSV, Qdrant snapshots. Foundation for all CWICR operations.