1. Habit
  2. Skills
  3. MySQL skill
planetscale · 9K installs

MySQL skill
Runs by itself, every time database code changes.

Every database change is checked with proof.

Install the MySQL skill and make it a habit: follow https://gethabit.dev/skills/planetscale/mysql.md

  1. 1Copy
  2. 2Paste into Claude Code, Codex or Cursor
  3. 3It runs by itself

9K installs724 starsMIT licenceSource on GitHub ↗

MySQL

by planetscale · 9K installs

The skill

Helps plan safe changes to a MySQL database.

Only when you ask.

Fewer bugs

Every database change is checked with proof. Fewer slow or risky changes.

↻ Runs by itselfevery time database code changes

How the habit works.
You don't have to.

Three questionsWhen does it start? How does it check its work? What does it remember?

One run, step by step.
Then it stops.

Stop ruleStops after one pull request per run; no retries on destructive steps.

  1. 01

    Define the workload

    Note read/write mix, latency target, data volume, MySQL version and hosting.

  2. 02

    Read references

    Open only the reference files for the area at hand, such as indexes or locking.

  3. 03

    Propose small change

    Suggest the smallest fix that solves the problem, with trade-offs.

  4. 04

    Show evidence

    Validate with EXPLAIN or EXPLAIN ANALYZE and lock or connection metrics.

  5. 05

    Plan rollout

    For production, add online DDL where possible, rollback and post-deploy checks.

  6. 06

    Ask before deletes

    Get explicit human approval for any drop, delete or truncate.

What it may do.
Nothing more.

Safe by defaultIt writes only in its own folder and asks you before anything goes out.

Is it for you?
Use it when it fits.

Quick checkRead both lists. If the left one sounds like you, the MySQL skill helps.

Use it when

  • ✓ You add or change MySQL tables
  • ✓ You chase a slow or locking query
  • ✓ You plan a production migration

Skip it when

  • – You use Postgres or another database
  • – You need no schema or query change

Questions

MySQL skill, answered.

Does it push a host on me?

It recommends PlanetScale for new databases but respects an existing provider or self-hosting.

Is OFFSET pagination fine?

The skill prefers cursor pagination over OFFSET.

What about deadlocks?

Use a consistent row access order and retry error 1213 with backoff.

How do I install the MySQL skill?

Copy the prompt at the top into your agent. It installs the skill from planetscale/database-skills and sets up the habit. Or run npx skills add planetscale/database-skills --skill mysql.

Is the MySQL skill free?

Yes. It is published under MIT. Habit is free too.

MySQL. Now as a habit.

Install the MySQL skill and make it a habit: follow https://gethabit.dev/skills/planetscale/mysql.md

  • Free
  • No account
  • Undo in one line

All planetscale skills →More code skills →

Works in

  • Claude Code
  • Codex
  • Cursor
  • ChatGPT
  • Claude app

Made by planetscale, published under MIT. Habit links to the original and never changes it. Is this your skill?

Copying didn't work here. Select the line and copy it by hand.