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 agentmods add skills/atuljha23/holocron/migration-patternsnpx skills add atuljha23/holocron --skill migration-patternsgit clone --depth 1 https://github.com/atuljha23/holocronWrote 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/atuljha23/holocron/migration-patterns)<a href="https://agentmods.dev/skills/atuljha23/holocron/migration-patterns"><img src="https://agentmods.dev/badge/skills/atuljha23/holocron/migration-patterns.svg" alt="Measured on agentmods" 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 | $0.00050 | $0.01146 |
| Opus 5 | $0.00025 | $0.00573 |
| Sonnet 5 | $0.00010 | $0.00229 |
| Haiku 4.5 | $0.00005 | $0.00115 |
Grade A, and why
migration-patterns 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 4d 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 — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Migration patterns
Assume: the service is running, writes are arriving, you cannot take a maintenance window. Most production migrations live here.
The universal rule
Never couple a schema change to a code change in the same deploy. They fail independently, and you need each to be reversible independently.
Expand → Migrate → Contract
The safe three-phase dance for any non-trivial change:
- Expand — add the new shape alongside the old. No caller depends on it yet.
- Migrate — move data to the new shape. Switch readers. Switch writers. Backfill anything left.
- Contract — drop the old shape once nothing reads or writes it for a cooling-off period.
Each phase is a separate deploy. Each is independently revertable.
Common change patterns
Add a column
- Safe:
ALTER TABLE ... ADD COLUMN ... NULL. No lock (or brief, depending on engine). - Danger:
NOT NULLwith no default on a large table — full-table rewrite, long lock. Use a default (cheap if metadata-only in your engine) or expand/migrate/contract: add nullable → backfill → add NOT NULL constraint.
Drop a column
- Ship code that stops reading it. Deploy. Wait a release.
- Ship code that stops writing it. Deploy. Wait a release.
- Drop the column.
- Never reverse this order.
Rename a column
- Effectively: add new → dual-write → backfill → switch reads → stop writing old → drop old.
- Never
ALTER TABLE ... RENAME COLUMNwhile code is live. Callers break.
Change column type
- Add a new column with the target type.
- Dual-write (writers write both).
- Backfill the new column.
- Switch readers to the new column.
- Stop writing the old.
- Drop the old.
Add an index on a large table
- Postgres:
CREATE INDEX CONCURRENTLY— no table lock. Monitor for failure. - MySQL: online DDL since 5.6 for most index adds. Check
ALGORITHM=INPLACE, LOCK=NONE. - Never just
CREATE INDEXon a hot table withoutCONCURRENTLY/ online algorithm.
Add a foreign key
- Add the column first, without the constraint.
- Backfill valid values.
- Add the constraint
NOT VALID(Postgres) so new rows are checked. VALIDATE CONSTRAINTlater during low traffic.
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.
- 4d ago First seen · 121 lines · 50 tokens per session scan A 8d478cdd489e
migration-patterns is a skill published in the GitHub repository atuljha23/holocron (2 stars, last pushed 4mo ago), licensed MIT. It adds 50 tokens to every session and 1,146 once invoked, about $0.0003 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-08-31.
Other skills, from other repositories
distributed-storage
Distributed storage systems design and operation for cloud platforms. Covers the GFS/HDFS block-and-master pattern, object storage (Swift/S3) with consistent hashing and eventual consistency, block storage semantics, replication vs erasure coding, the CAP theorem in practice, read-repair and anti-entropy, snapshot…
portable-schema-generator
Emit Postgres.sql and SQLite.sql from a single schema spec so tools work across both drivers without duplicating DDL by hand. Use when designing a schema that needs to support both shared Postgres deployments and zero-config SQLite. Reduces two-file sync burden to a single source edit.
survey-generator
Compile a structured literature survey on any AI/ML topic. Agent curates a research bundle (taxonomy + sections + bibliography of real papers) from a public anchor resource, then a chosen LLM generates the survey artifact. Output target is a wiki page (markdown), not a one-off HTML — survey lands in /derived/surveys/…
batch-orchestration
Decompose large-scale changes into independent units and spawn parallel agents in isolated worktrees. Use for migrations, refactors, codemods, and any change touching 10+ files with the same pattern.
design-engineering
Apply interface craft when building or reviewing UI - motion, easing, timing, springs, component feel, and visual foundations. Use when building a component, animation, transition, hover or press state, modal, drawer, toast, or when polishing an interface so it feels right. Says "make this feel better", "add an…
skill-optimizer
SkillOpt-flavored offline training loop for any SKILL.md. Treats accumulated learn-rule corrections as training trajectories, proposes bounded patches via an optimizer LLM, gates each candidate against a held-out validation set built from the user's own past corrections, and ships only candidates that demonstrably…