9 skills · 4 categories
Claude Code skills for MySQL
MySQL skills for InnoDB tuning, query optimization, online schema changes, replication-aware migrations and backups you have actually restored. General SQL skills that apply to MySQL are listed too.
Start with these
- 1
MySQL Tuning
Fix the top digests, keep replicas caught up
Claude ranks statements by total latency from performance_schema, reads EXPLAIN ANALYZE to spot scans, filesorts and implicit conversions, and builds composite indexes in InnoDB's clustered-key reality. It sizes the buffer pool and redo log, diagnoses replica lag by cause, retires indexes via INVISIBLE first, and picks INSTANT, INPLACE or gh-ost per schema change.
- 2
Zero-Downtime Migrations
Change live tables without a maintenance window
Claude splits risky schema changes into expand, backfill and contract phases that each work with old and new code running side by side. Every ALTER runs with lock_timeout, constraints go in NOT VALID and get validated separately, backfills run as resumable batches outside the DDL, and drops wait for a later deploy and your sign-off. You get a phase-by-phase plan with locks and rollback per step.
- 3
SQL Query Tuning
Find the slow plan node, fix the estimate behind it
Claude stops guessing from SQL text and works from the plan. It ranks queries by total time in pg_stat_statements, captures EXPLAIN ANALYZE with real parameters, finds the node where estimates diverge, then applies the smallest fix in order: statistics, query rewrite, index, scoped config. Every change gets a before/after plan comparison with buffer counts and a short tuning note.
All 9 MySQL skills
Grouped by category. Each card opens the full playbook, example prompts and install commands.
Testing 1
Databases 6
MySQL Tuning
Fix the top digests, keep replicas caught up
Claude ranks statements by total latency from performance_schema, reads EXPLAIN ANALYZE to spot scans, filesorts and implicit conversions, and builds composite indexes in InnoDB's clustered-key reality. It sizes the buffer pool and redo log, diagnoses replica lag by cause, retires indexes via INVISIBLE first, and picks INSTANT, INPLACE or gh-ost per schema change.
Zero-Downtime Migrations
Change live tables without a maintenance window
Claude splits risky schema changes into expand, backfill and contract phases that each work with old and new code running side by side. Every ALTER runs with lock_timeout, constraints go in NOT VALID and get validated separately, backfills run as resumable batches outside the DDL, and drops wait for a later deploy and your sign-off. You get a phase-by-phase plan with locks and rollback per step.
SQL Query Tuning
Find the slow plan node, fix the estimate behind it
Claude stops guessing from SQL text and works from the plan. It ranks queries by total time in pg_stat_statements, captures EXPLAIN ANALYZE with real parameters, finds the node where estimates diverge, then applies the smallest fix in order: statistics, query rewrite, index, scoped config. Every change gets a before/after plan comparison with buffer counts and a short tuning note.
Backup and Restore
Backups count only after a timed restore
Claude starts from agreed RPO and RTO targets and picks the mechanism that meets them: logical dumps, physical backups with WAL archiving for point-in-time recovery, or managed PITR plus off-account copies. It restores to a separate instance by default, verifies restored data with queries and smoke tests, alerts on archive failures and backup age, and records each drill's real recovery time.
Transactions and Locking
Name the race, pick the lock, prove it under load
Claude names the exact anomaly behind a concurrency bug, such as lost update, write skew or double insert, then applies the cheapest mechanism that prevents it: a unique index, a guarded atomic UPDATE, a version check, FOR UPDATE in key order, or Serializable with retries. Every role gets lock and idle-transaction timeouts, and the fix is proven with a real parallel test.
Drizzle ORM
Typed SQL, reviewed migrations, zero drift
Claude writes Drizzle schemas as the single source of truth: timezone-aware timestamps, named indexes on every foreign key, types inferred with $inferSelect instead of duplicated interfaces. It keeps push for local prototyping only, reads each generated SQL file for accidental drop-and-add renames, and picks between the core builder and relational queries based on what the result needs.
Install
Every MySQL skill in one command
Installs into ~/.claude/skills/. Add --project after -- to install into the current repository.
curl -fsSL https://claudeskills.page/install.sh | sh -s -- mysql-tuning schema-migrations sql-query-tuning aws-rds-aurora backup-restore transactions-locking pagination-filtering testcontainers drizzle-orm MySQL skills FAQ
What is the best Claude Code skill for MySQL?
Start with MySQL Tuning: Fix the top digests, keep replicas caught up. Then add Zero-Downtime Migrations and SQL Query Tuning, which cover the next most common MySQL requests.
How do I install all 9 MySQL skills at once?
Pass every name to the installer in one command: curl -fsSL https://claudeskills.page/install.sh | sh -s -- mysql-tuning schema-migrations sql-query-tuning aws-rds-aurora backup-restore transactions-locking pagination-filtering testcontainers drizzle-orm. Add --project to install them into the current repository's .claude/skills/ folder so your team gets them too.
Do these MySQL skills work outside Claude Code?
Yes. Each skill uses only the portable Agent Skills frontmatter, so the same folder works on claude.ai, through the Claude API and in the Agent SDK. Skills that run bundled scripts need an environment with code execution.