Codex skills for MySQL
With these skills Codex tunes MySQL 8.0 and 8.4 from performance_schema digests and the slow log, then writes every ALTER with an explicit ALGORITHM so a large table is never copied by surprise. Copy-based changes go through gh-ost or pt-online-schema-change with throttling, and transactions, backfills and RDS or Aurora upgrades get the same care.
Start with these 3
- MySQL Tuning InnoDB-aware indexes, plans and settings Codex tunes MySQL starting from performance_schema digests and the slow log rather than guesswork. It reads EXPLAIN ANALYZE, designs composite and covering indexes around InnoDB's clustered primary key, retires indexes by making them invisible first, adds histograms for skewed columns, and reviews buffer pool and redo log sizing from status counters. Schema changes state ALGORITHM explicitly so nothing silently copies a big table.
- MySQL Online Schema Change ALTER huge MySQL tables while traffic flows Codex inspects the table, server version, foreign keys and open transactions, then picks the cheapest safe mechanism and forces it with an explicit ALGORITHM so MySQL fails instead of silently copying. Every DDL session gets a short lock_wait_timeout, copy-based changes run through gh-ost or pt-osc with lag and load throttles and a postponed cut-over, and production runs and table drops wait for your approval.
- Data Backfills Touch 80 million rows without anyone noticing Codex treats a backfill as a production operation, not a migration line: it ships the dual write first, maps side effects like triggers and CDC events, then walks the primary key in short per-batch transactions with lock timeouts, a checkpoint table and a kill switch. It throttles on replica lag, estimates run time from a dry run, and finishes with a mismatch query that must return zero.
4 more MySQL skills
General skills with MySQL guidance
Not built around MySQL, but they include steps or tools for it. Not part of the install-all command.
-
Zero-Downtime Migrations
Change big tables without a lock-queue outage -
Prisma ORM
Reviewed migrations, lean queries, Prisma 7 ready -
SQL Window Functions
Rankings and running totals that are actually right -
Drizzle ORM
TypeScript schema in, reviewed SQL migrations out -
Kysely Query Builder
SQL you would write by hand, checked by tsc -
CDC with Debezium
Every insert, update and delete, in order -
Testcontainers
Test against real Postgres, not a lookalike
Every MySQL skill in one command
Installs these 7 into ~/.agents/skills/. Add --project after -- to install into the current repository instead.
The installer is a 104-line POSIX shell script. It fetches the skills you name from codexskills.dev and unpacks each into its own folder in your skills directory. No sudo, no telemetry, and every skill page shows the full SKILL.md first. Read install.sh
curl -fsSL codexskills.dev/install.sh | sh -s -- mysql-tuning mysql-online-schema-change data-backfills database-transactions database-observability aws-rds-aurora database-performance-triage MySQL FAQ
Can Codex run gh-ost or pt-online-schema-change for me?
MySQL Online Schema Change picks between ALGORITHM=INSTANT, INPLACE online DDL, gh-ost and pt-online-schema-change from the table, server version and foreign keys. It notes that gh-ost needs ROW binlog format and cannot handle foreign keys, in which case it uses pt-osc. For PlanetScale or Vitess it uses deploy requests and never raw DDL on the production branch.
Which MySQL versions does the tuning skill target?
MySQL Tuning targets MySQL 8.0 and 8.4 LTS on InnoDB. It finds expensive statements in performance_schema and the slow log, uses EXPLAIN ANALYZE (8.0.18+), retires indexes by making them invisible first, and sizes innodb_buffer_pool_size and innodb_redo_log_capacity from status counters rather than raising max_connections.
How do these skills avoid metadata lock pileups during an ALTER TABLE?
MySQL Online Schema Change gives every DDL session a short lock_wait_timeout and checks for long-running transactions first, because even an INSTANT change needs a brief exclusive metadata lock. If MySQL refuses ALGORITHM=INSTANT for an operation, the skill stops and moves to the next mechanism instead of letting it fall back to a table copy.
How do I install all 7 MySQL skills at once?
Pass every name to the installer in one command: curl -fsSL https://codexskills.dev/install.sh | sh -s -- mysql-tuning mysql-online-schema-change data-backfills database-transactions database-observability aws-rds-aurora database-performance-triage. Add --project right after -- to put them in the current repository's .agents/skills/ so your team gets them too.
Which MySQL skill should I try first?
MySQL Tuning is the closest fit for most MySQL work. Mention it with $mysql-tuning in a prompt to load it on purpose; after that, Codex picks it up on its own whenever a task matches.