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/softspark/ai-toolkit/migration-patternsnpx skills add softspark/ai-toolkit --skill migration-patternsgit clone --depth 1 https://github.com/softspark/ai-toolkitWrote 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/softspark/ai-toolkit/migration-patterns)<a href="https://agentmods.dev/skills/softspark/ai-toolkit/migration-patterns"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/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.00041 | $0.02085 |
| Opus 5 | $0.00020 | $0.01043 |
| Sonnet 5 | $0.00008 | $0.00417 |
| Haiku 4.5 | $0.00004 | $0.00209 |
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 yesterday.
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 — 288 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Migration Patterns
Database Migration Tools
Alembic (Python/SQLAlchemy)
# Initialize
alembic init migrations
# Create migration
alembic revision --autogenerate -m "add users table"
# Apply
alembic upgrade head
# Rollback
alembic downgrade -1
# migrations/versions/001_add_users.py
def upgrade():
op.create_table(
"users",
sa.Column("id", sa.Integer, primary_key=True),
sa.Column("email", sa.String(255), unique=True, nullable=False),
sa.Column("created_at", sa.DateTime, server_default=sa.func.now()),
)
op.create_index("idx_users_email", "users", ["email"])
def downgrade():
op.drop_index("idx_users_email")
op.drop_table("users")
Prisma (TypeScript)
# Create migration
npx prisma migrate dev --name add_users
# Apply in production
npx prisma migrate deploy
# Reset (dev only)
npx prisma migrate reset
Laravel (PHP)
# Create migration
php artisan make:migration create_users_table
# Apply
php artisan migrate
# Rollback
php artisan migrate:rollback --step=1
# Dry run
php artisan migrate --pretend
Django (Python)
# Create migration from models
python manage.py makemigrations
# Apply
python manage.py migrate
# Rollback
python manage.py migrate app_name 0001
# Show plan
python manage.py showmigrations
Flyway (Java/SQL)
flyway migrate
flyway info
flyway undo # Undo last migration (Teams edition)
flyway repair # Fix metadata table
Zero-Downtime Migration Strategies
1. Expand-Contract Pattern
Phase 1 (Expand): Add new column, keep old
ALTER TABLE users ADD COLUMN full_name VARCHAR(200);
Phase 2 (Migrate): Copy data
UPDATE users SET full_name = first_name || ' ' || last_name;
Phase 3 (Switch): Update code to use new column
Deploy new code that reads/writes full_name
Phase 4 (Contract): Remove old columns
ALTER TABLE users DROP COLUMN first_name;
ALTER TABLE users DROP COLUMN last_name;
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.
- yesterday First seen · 288 lines · 41 tokens per session scan A 222bcdd4cca2
migration-patterns is a skill published in the GitHub repository softspark/ai-toolkit (169 stars, last pushed today), licensed Apache-2.0. It adds 41 tokens to every session and 2,085 once invoked, about $0.0002 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
similarity-search-patterns
Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.
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…
managed-db-services
Configure DigitalOcean Managed MySQL, MongoDB, Valkey, Kafka, and OpenSearch for App Platform. Use when setting up non-PostgreSQL databases, configuring trusted sources, or troubleshooting database connectivity.
postgres
Configure DigitalOcean Managed Postgres with bindable variables or schema isolation. Use when setting up databases, creating users, managing permissions, configuring multi-tenant schemas, or troubleshooting database connectivity on App Platform.
mongo-migration
MongoDB schema migration safety reviewer and migration script generator. ALWAYS use when writing, reviewing, or planning MongoDB schema changes — field additions/removals, index builds, schema validator changes, document type migrations, shard key modifications, or any bulk update touching production collections.…
mysql-migration
MySQL schema migration safety reviewer and DDL generator. ALWAYS use when writing, reviewing, or planning MySQL schema changes — ALTER TABLE, CREATE/DROP INDEX, column type changes, charset conversions, data backfills, or any DDL touching production tables. Covers online DDL algorithm selection (INSTANT/INPLACE/COPY)…