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 sandeepmvl/rails-skills --skill 22-db-migration-mysql-postgresgit clone --depth 1 https://github.com/sandeepmvl/rails-skillsWrote 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/sandeepmvl/rails-skills/22-db-migration-mysql-postgres)<a href="https://agentmods.dev/skills/sandeepmvl/rails-skills/22-db-migration-mysql-postgres"><img src="https://agentmods.dev/badge/skills/sandeepmvl/rails-skills/22-db-migration-mysql-postgres/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/sandeepmvl/rails-skills/22-db-migration-mysql-postgres"><img src="https://agentmods.dev/badge/skills/sandeepmvl/rails-skills/22-db-migration-mysql-postgres.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.00127 | $0.01664 |
| Opus 5 | $0.00063 | $0.00832 |
| Sonnet 5 | $0.00025 | $0.00333 |
| Haiku 4.5 | $0.00013 | $0.00166 |
Grade A, and why
db-migration-mysql-postgres 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 11d 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 — 177 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MySQL → Postgres Migration
Going from MySQL to Postgres is mostly an upgrade. You gain JSONB with rich operators, partial indexes, true booleans, ARRAY columns, generated columns since 12, and rich CHECK constraints. Plan for the data conversion carefully —
pgloaderhandles most of it.
The opinion
pgloaderfor bulk migration. Dual-write cutover for zero-downtime. Plan for the schema upgrades — don't just translate, take advantage of Postgres features (JSONB instead of JSON, BOOLEAN instead of TINYINT, partial indexes, generated columns).
Pre-migration: what improves
| MySQL | Postgres | Why it matters |
|---|---|---|
JSON |
JSONB |
Indexed queries via GIN; @> containment |
TINYINT(1) for booleans |
BOOLEAN |
Type-safe; no 0/1 ambiguity |
ENUM |
Native enum OR CHECK constraint + ActiveRecord enum |
Rename without table lock |
| No partial indexes | Partial indexes | Index only relevant rows; smaller, faster |
No ARRAY columns |
ARRAY columns |
Native array storage for simple cases |
| LIKE case-insensitive | LIKE case-sensitive (use ILIKE) |
Match-semantics change |
| No deferrable FK | Deferrable FK | Bulk-load patterns easier |
| Generated columns (5.7+) | Generated columns (12+) | Both have them; syntax slightly different |
Core patterns
Pattern 1: pgloader migration
brew install pgloader
cat > migrate.load <<EOF
LOAD DATABASE
FROM mysql://user:pass@source-host/myapp_production
INTO postgresql://user:pass@target-host/myapp_production
WITH include drop, create tables, create indexes, reset sequences,
workers = 8, concurrency = 1, multiple readers per thread
SET PostgreSQL PARAMETERS
maintenance_work_mem to '512MB',
work_mem to '32MB'
CAST type tinyint when (= precision 1) to boolean drop typemod,
type datetime to timestamptz drop default drop not null using zero-dates-to-null
;
EOF
pgloader migrate.load
Key casts:
tinyint(1) → boolean— Rails treats 0/1 TINYINT as bool but the schema is more explicit as BOOLEAN.datetime → timestamptz— Postgres has true timezone support; bring data forward as UTC.zero-dates-to-null— MySQL allows0000-00-00; Postgres doesn't.
What ships with it
1 file 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.
- 11d ago First seen · 177 lines · 127 tokens per session scan A 3e8161d9c479
db-migration-mysql-postgres is a skill published in the GitHub repository sandeepmvl/rails-skills (21 stars, last pushed 3mo ago), licensed MIT. It adds 127 tokens to every session and 1,664 once invoked, about $0.0006 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-30.
Other skills, from other repositories
azure-resource-manager-postgresql-dotnet
Azure PostgreSQL Flexible Server SDK for .NET. Database management for PostgreSQL Flexible Server deployments. Use for creating servers, databases, firewall rules, configurations, backups, and high availability. Triggers: "PostgreSQL", "PostgreSqlFlexibleServer", "PostgreSQL Flexible Server", "Azure Database for…
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.
kysely
Guidelines for developing with Kysely, a type-safe TypeScript SQL query builder with autocompletion support.
sqlsugar
Use when doing multi-database ORM operations in .NET — SQL Server, MySQL, PostgreSQL, SQLite, Oracle with fluent API, code-first, and LINQ. SqlSugar: high-performance .NET ORM supporting 10+ databases.
activerecord
This skill should be used when the user asks to "write a migration", "add a column", "add column to table", "create an index", "add a foreign key", "set up associations", "fix N+1 queries", "optimize queries", "add validations", "create callbacks", "use eager loading", or mentions ActiveRecord, belongsto, hasmany…
code-conversion-only
Convert local source code to Snowflake SQL for code-conversion-only source systems such as Sybase IQ, Azure Synapse, Spark SQL, Databricks SQL, Greenplum, Netezza, Vertica, and Hive. Optionally repoints Power BI reports. Use when configure returns projecttype codeconversiononly for these sources.