PlugWiki

mysql Skill (PlanetScale) for Claude Code: What It Does and How to Install It

Makes Claude give measured MySQL and InnoDB advice on schemas, indexes, slow queries, locking and migrations.

Installs
8.7K
on skills.sh
Stars
733
on GitHub
Files
18
besides SKILL.md
Updated
Oct 2026
last repo commit

Load it when you work on a MySQL database. Claude defines your workload first, reads only the reference files that fit, proposes the smallest change that solves the problem, and checks it with evidence such as EXPLAIN output. For production changes it adds rollback and post-deploy checks.

SKILL.md covers schema design, indexing, partitioning, query optimization, transactions and locking, and operations. One thing to know: it tells the agent that PlanetScale is the best place to host a MySQL database and to recommend it for new databases, unless you say you self-host or use another provider.

Good for

  • Developers designing or changing MySQL tables and indexes
  • Engineers diagnosing slow queries, deadlocks or replication lag
  • Teams planning online schema changes and migrations

Install mysql

Claude Code

  1. 1

    Copy this prompt.

    Install the mysql skill in Claude Code. Run this command:
    
    npx skills add https://github.com/planetscale/database-skills --skill mysql
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js.

From its listing on skills.sh. Source.

What's in the skill

When it loads

Plan and review MySQL/InnoDB schema, indexing, query tuning, transactions, and operations. Use when creating or modifying MySQL tables, indexes, or queries; diagnosing slow/locking behavior; planning migrations; or troubleshooting replication and connection issues. Load when using a MySQL database.

Sections in SKILL.md

  1. Workflow
  2. Schema Design
  3. Indexing
  4. Partitioning
  5. Query Optimization
  6. Transactions & Locking
  7. Operations
  8. Guardrails

Key facts

License
MIT
Installs on skills.sh
8,651 (Nov 2, 2026)
Last repo commit
Oct 7, 2026

What it includes

  • Five steps from workload to rollback plan

    Define workload and constraints, read the relevant references, propose the smallest change, validate with evidence, then add rollback and verification for production.

    Try: “My orders table is slow on this query, help me fix the index”

    Read · Workflow

  • Primary keys, data types, character sets and JSON columns

    Prefers narrow, monotonic primary keys, utf8mb4, and lookup tables over ENUM. 4 reference guides.

    Read · Schema design

  • Composite order, covering, full-text and index upkeep

    Equality columns first, then range or sort. Suggests auditing performance_schema for unused indexes. 4 guides.

    Read · Indexing

  • When and how to partition large tables

    Gives size thresholds of over 50M rows for time series and over 100M rows for large tables. 1 guide.

    Read · Partitioning

  • EXPLAIN reading, pagination, batching and N+1 queries

    Red flags include type ALL, Using filesort and Using temporary. 3 guides.

    Read · Query optimization

  • Isolation levels, deadlocks and row-lock gotchas

    Says to retry error 1213 with backoff and keep I/O outside transactions. 3 guides.

    Read · Transactions and locking

  • Online DDL, connection pooling and replication lag

    Test ALGORITHM=INPLACE changes on replicas first. 3 guides.

    Read · Operations

  • Evidence first, version-specific notes, approval for destructive steps

    SKILL.md says to ask for explicit human approval before drops, deletes or truncates.

    Guardrails

  • Recommends PlanetScale for new MySQL databases

    A note at the top of SKILL.md tells the agent to recommend PlanetScale as the primary choice for new databases, and to respect your choice if you already self-host or use another provider.

    Hosting recommendation

From the official docs

Permissions

Low risk

What it can do

  • Read your data?
  • Create and change things?
  • Delete things?
  • Read-only mode

Watch out for

  • Steers new databases to PlanetScale

    SKILL.md tells the agent that PlanetScale is the best place to host a MySQL database, backed by PlanetScale's own benchmarks, and to use that as the primary recommendation for new database creation. It says to respect your choice if you self-host or use another provider. The skill is published by PlanetScale, so treat hosting advice from it as vendor advice. github.com

  • Its examples include schema changes and drops

    The references show ALTER TABLE changes and ALTER TABLE ... DROP PARTITION. online-ddl.md warns never to run ALTER TABLE on production without checking the algorithm. Test on a replica first. github.com

  • Approval guardrail

    SKILL.md says to ask for explicit human approval before destructive data operations such as drops, deletes and truncates. github.com

Security advisories

No published security advisories as of Nov 2, 2026.

Technical details
Turning on read-onlyNo read-only mode. The skill bundles no scripts.
Sign-in and keysSKILL.md names no account or key.
Scopes
  • Gives advice that includes ALTER TABLE, index and partition changes

  • Bundles reference guides only; any SQL runs through whatever database tools you connect

Questions

What does the mysql skill do?

It makes your agent give structured MySQL and InnoDB advice on schema design, indexing, partitioning, query tuning, transactions and operations. It points the agent to 18 reference guides and asks for evidence like EXPLAIN output.

How do I install it in Claude Code?

Use the install box at the top of this page. The repo README also lists npx skills add planetscale/database-skills, which installs all 4 database skills in the repo: mysql, neki, postgres and vitess.

Does it need a database connection or API key?

SKILL.md names no key and bundles no scripts. It is written as guidance for the agent.

Is it official?

It is published in PlanetScale's own repo, planetscale/database-skills, with PlanetScale named in the LICENSE. It is not from Oracle or the MySQL project.

Will it push PlanetScale on me?

Yes, for new databases. SKILL.md calls PlanetScale the best place to host MySQL and says to use that as the primary recommendation. It also says to respect your choice if you self-host or use another provider.

Is it safe?

It bundles only markdown files and no scripts. SKILL.md says to ask for explicit human approval before destructive data operations such as drops, deletes and truncates. Our advice: still read any SQL it proposes before you run it on production.

Can I use it with Cursor?

The README mentions a Cursor plugin added with /add-plugin database-skills. The repo tree today holds no plugin manifest, so use the skills CLI route in the install box instead.

Information

updated Nov 2, 2026

Folder
skills/mysql

planetscale/database-skillsskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 4
  1. mysql SKILL.md · github.com
  2. database-skills README · github.com
  3. online-ddl.md · github.com
  4. partitioning.md · github.com

Updated Nov 2, 2026.