migration

migration is a skill for Claude Code, Codex from igmarin/rails-agent-skills. It costs 35 tokens per session (1,227 once invoked), scanned A, original, MIT.

A guide for changing a database's structure safely, such as adding a column, while keeping a way to roll the change back. It covers testing changes before staging and production, where live application data is used.

In plain words
What is it for?
Use it when adding columns, changing tables, backfilling data, or planning a Rails database migration. It helps choose a rollout pattern, write an up and down migration, inspect query performance, and test the deployment.
Why use it?
It reduces downtime, long locks, failed rollbacks, and risky changes to large tables. It separates structural changes from copying existing data and requires checks against production-like volumes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding columns, changing tables, backfilling data, or planning a Rails database migration. It helps choose a rollout pattern, write an up and down migration, inspect query performance, and test the deployment.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/igmarin/rails-agent-skills/migration
Install

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.

Any agent
npx skills add igmarin/rails-agent-skills --skill migration
Clone the repo
git clone --depth 1 https://github.com/igmarin/rails-agent-skills

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for migration

README.md
[![agentmods](https://agentmods.dev/badge/skills/igmarin/rails-agent-skills/migration/github.svg)](https://agentmods.dev/skills/igmarin/rails-agent-skills/migration)
Your own site
<a href="https://agentmods.dev/skills/igmarin/rails-agent-skills/migration"><img src="https://agentmods.dev/badge/skills/igmarin/rails-agent-skills/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.

agentmods 80×15 button for migration

Your own site · 80×15
<a href="https://agentmods.dev/skills/igmarin/rails-agent-skills/migration"><img src="https://agentmods.dev/badge/skills/igmarin/rails-agent-skills/migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,227 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 99
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 100
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.01227
Opus 5 $0.00017 $0.00613
Sonnet 5 $0.00007 $0.00245
Haiku 4.5 $0.00003 $0.00123

Measured 9d ago against content hash b74a5bacb887, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

migration scanned grade A with 1 finding 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 9d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl https://staging.example.local/api/health
skills/migration/SKILL.md · 160 lines

How it starts

The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Migration Persona

Key Safety Rules

  • Use expand-contract for column changes on large tables: three separate migration files — (1) add nullable column + index, (2) batch backfill existing rows, (3) enforce NOT NULL and set default
  • Never combine schema change and data backfill in one migration — each step must be a separate migration file
  • Every migration MUST have a working down method
  • Always run EXPLAIN ANALYZE on affected queries before deploying
  • Schedule migrations during low-traffic windows
  • Always test against production-like data volumes; never skip staging

Phase 1: Migration Planning

  1. Invoke skills/review-migration — assesses lock behavior, rollback strategy, backfill requirements, and performance impact (EXPLAIN queries). If unavailable, perform these checks manually: identify table lock duration, confirm a rollback path exists, enumerate backfill steps, and run EXPLAIN ANALYZE on affected queries.
  2. Choose deployment pattern: expand-contract for column changes (see Key Safety Rules above), phased rollout for table-level changes, zero-downtime for everything touching large tables.

HARD GATE — Migration Safety Check:

  • Safety risks reviewed; rollback strategy defined and tested
  • Performance impact assessed with EXPLAIN
  • Backfill requirements and deployment order identified

If gate fails: Redesign the migration approach before proceeding.


Phase 2: Development Testing

Deploy each migration file independently.

Test each migration in sequence:

rails db:migrate && rails db:rollback && rails db:migrate
bundle exec rspec spec/models/order_spec.rb spec/features/order_flow_spec.rb

HARD GATE — Development Tests:

  • Each migration runs, rolls back, and re-runs successfully (idempotent)
  • Application tests pass; no N+1 queries introduced

If gate fails: Fix migration or application code before proceeding.


Phase 3: Staging Deployment

Prerequisites: Staging DB must match production in size, data shape, and PostgreSQL version.

Read the full file on GitHub · 160 lines

Changes

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.

  1. 9d ago First seen · 160 lines · 35 tokens per session scan A b74a5bacb887

Subscribe to this mod's changes

migration is a skill published in the GitHub repository igmarin/rails-agent-skills (24 stars, last pushed 18d ago), licensed MIT. It adds 35 tokens to every session and 1,227 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

event-store-design

Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.

wshobson/agents · 33 tokens

convex-explain-app

Explain an existing Convex app — data model + relationships, public vs internal functions, auth/ownership model, components, a request→data flow — read from the schema and function surface. Read-only.

openclaw/clawhub · 47 tokens

platform-custom-field-generate

Use this skill when users need to create, generate, or validate Salesforce Custom Field metadata. Trigger when users mention custom fields, field types, Roll-up Summary fields, Master-Detail relationships, Lookup relationships, formula fields, picklists, dependent (controlling) picklists, referencing a value set from…

forcedotcom/sf-skills · 194 tokens

field-service-sobject-create-configure

Headless 360 REST API deployment step for creating sObject records. Handles describe-based field discovery, required-field derivation, entity-relationship ordering, and composite graph transactions. Use this skill when a designer skill (or a user directly) needs to create sObject records after design confirmation…

forcedotcom/sf-skills · 74 tokens

openloomi-api

OpenLoomi ships a local-first HTTP API served from the desktop app (port 3414, fallback 3515). All auth, Memory, AI, RAG, Loop, and Audit data live in a local SQLite database — your data stays on your machine and the OpenLoomi app is the source of truth. The only externally-routed auth path is the Composio OAuth…

melandlabs/openloomi · 106 tokens

nornicdb-grpc

Drive NornicDB over gRPC — the Qdrant-compatible surface (Collections, Points, Snapshots) plus the additive NornicSearch service. Use when ingesting via Qdrant SDKs, migrating from Qdrant, or running hybrid text+vector search from a non-Bolt client. Covers connection, RPC catalog, collection→database mapping…

orneryd/NornicDB · 98 tokens