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 sigistry/marketplace --skill safe-migrationsgit clone --depth 1 https://github.com/sigistry/marketplaceWrote 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/sigistry/marketplace/safe-migrations)<a href="https://agentmods.dev/skills/sigistry/marketplace/safe-migrations"><img src="https://agentmods.dev/badge/skills/sigistry/marketplace/safe-migrations/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/sigistry/marketplace/safe-migrations"><img src="https://agentmods.dev/badge/skills/sigistry/marketplace/safe-migrations.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.00098 | $0.00888 |
| Opus 5 | $0.00049 | $0.00444 |
| Sonnet 5 | $0.00020 | $0.00178 |
| Haiku 4.5 | $0.00010 | $0.00089 |
Grade A, and why
safe-migrations 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 7d 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 — 45 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Safe Migrations
Purpose
Provide a standardized, static methodology for turning a hazardous schema migration into a safe, reversible, zero-downtime change, without a database connection. The core idea: most outages come from a DDL statement that takes a long-held ACCESS EXCLUSIVE (Postgres) or table-copy (MySQL) lock and blocks all traffic while it rewrites the table. The fix is almost always the same shape, so this skill encodes it once.
The Expand-Contract (Parallel-Change) Principle
Never change a schema object in place while the app runs. Instead, evolve in additive steps so old and new code both work at every moment:
- Expand: add the new structure (nullable column, new index built concurrently,
NOT VALIDconstraint) without touching existing behavior. - Migrate: backfill data in bounded batches; dual-write from the app so old and new stay consistent.
- Contract: once all deploys read the new structure, remove the old one in a later deploy.
Each step is independently deployable and reversible. A rename or type change is never one migration, it is a sequence spanning multiple deploys.
The Golden Rules
- Add columns nullable; never
NOT NULL DEFAULT <volatile>in one shot on a large table. - Build indexes concurrently (Postgres) or in place, lock-free (MySQL); otherwise use an online-DDL tool.
- Add constraints as
NOT VALIDfirst, thenVALIDATEin a separate statement (short lock, then a scan that does not block writes). - Backfill in batches with a bound and a throttle, never one unbounded
UPDATE. - Set
lock_timeoutso a migration that cannot acquire its lock fails fast instead of queuing behind long transactions and blocking everything behind it. - Every migration ships a working DOWN; splits ship in the correct order.
Quick Hazard Reference
| Operation | Postgres lock | Safe alternative |
|---|---|---|
ADD COLUMN (nullable, no default) |
Brief ACCESS EXCLUSIVE, metadata-only |
Safe as-is |
ADD COLUMN NOT NULL DEFAULT <volatile> |
Full rewrite under ACCESS EXCLUSIVE |
Nullable add → backfill → NOT VALID check → validate |
CREATE INDEX |
SHARE (blocks writes) |
CREATE INDEX CONCURRENTLY |
ALTER COLUMN TYPE |
Full rewrite under ACCESS EXCLUSIVE |
New column → dual-write → backfill → swap |
ADD FOREIGN KEY |
SHARE ROW EXCLUSIVE, scans child |
... NOT VALID then VALIDATE CONSTRAINT |
SET NOT NULL |
ACCESS EXCLUSIVE + full scan |
Backing CHECK ... NOT VALID + validate, then set |
| Rename / drop column | ACCESS EXCLUSIVE + breaks old code |
Multi-deploy expand-contract |
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 7d ago First seen · 45 lines · 98 tokens per session scan A 6b398df31b22
safe-migrations is a skill published in the GitHub repository sigistry/marketplace (3 stars, last pushed today), licensed MIT. It adds 98 tokens to every session and 888 once invoked, about $0.0005 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
ddia-systems
Design data systems by understanding storage engines, replication, partitioning, transactions, and consistency models. Use when the user mentions "database choice", "which database should I use", "SQL or NoSQL", "replication lag", "partitioning strategy", "consistency vs availability", "stream processing", "ACID…
safe-migrations
Zero-downtime schema and data migration discipline — expand → migrate → contract, never destructive in the release that ships the code, backfills as jobs, every step reversible. INVOKE PROACTIVELY when creating or editing a migration in any framework, writing ALTER TABLE / index / enum / constraint changes, planning a…
elasticsearch
Interact with Elasticsearch and Kibana via REST API using curl. Use when querying, indexing, managing indices, checking cluster health, writing aggregations, deploying dashboards, or troubleshooting Elasticsearch. Requires cluster URL and API key. Covers: search (Query DSL), CRUD operations, index management…
docker-dev-environment
Use when setting up local development services or running the project locally. Establishes the "stateful services in Docker, app runs native" pattern with Postgres, Redis, MinIO, and Mailpit.
top-design
Create award-winning, immersive web experiences at the level of Awwwards-featured agencies. Use when the user mentions "Awwwards quality", "make my site stunning", "scroll animations", "parallax storytelling", "cinematic web design", "portfolio site", or "brand experience". Also trigger when elevating a standard…
traction-eos
Implement the Entrepreneurial Operating System (EOS) to align vision and execution across a company. Use when the user mentions "EOS", "Entrepreneurial Operating System", "V/TO", "quarterly rocks", "Level 10 meetings", "accountability chart", "IDS process", "my company feels chaotic", "we keep having the same…