planetscale
Skill15 starsChanged 42 days agoMITView on GitHub
Expert PlanetScale serverless MySQL assistance covering non-blocking schema migrations, Vitess sharding, and database branching. Use when scaling MySQL without downtime, managing migrations, or horizontal scaling.
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- alanalvestech/hitanktheir own version, first seen Mar 5, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- alanalvestech/hitank★ 38same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 76
Use PlanetScale deploy requests to test changes on a branch and apply online:
- Distinctive: line 93
Always Use Deploy Requests for Migrations: Never attempt manual DDL migrations in production.
- Distinctive: line 95
Use Safe Migrations Mode: Enable Safe Migrations on production branches to block accidental direct DDL executions.
- Distinctive: line 100
Use Foreign Key Constraints in Sharded Keyspaces: Vitess does not support distributed foreign key constraints.
- Distinctive: line 101
Use auto-incrementing integers across sharded tables: Use distributed ID generators (UUIDv7, Snowflake IDs).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PlanetScale
PlanetScale is a serverless database platform compatible with MySQL. It is built on Vitess, the technology used by YouTube/Slack to scale massively.
When to Use
- Horizontally Scaled MySQL (Vitess): Scaling relational MySQL applications to millions of queries per second without manual sharding.
- Non-Blocking Schema Migrations: Executing online DDL schema changes on live multi-terabyte tables with zero downtime and zero locking.
- Database Branching & Developer Workflows: Branching production databases for local development and merging schema changes via Deploy Requests.
- Serverless Web Applications: Querying MySQL from serverless environments over HTTP using the PlanetScale serverless driver.
Quick Start
Uses standard MySQL drivers.
# Connect via CLI
pscale shell my-database mainCore Concepts
Vitess Horizontal Sharding Architecture
VTGate proxies route queries transparently across underlying VTTablet MySQL instances based on a VSchema keyspace:
[ Application Client ] ──→ [ VTGate Stateless Proxy ]
├── Routes to Shard 1 (-80)
└── Routes to Shard 2 (80-)Non-Blocking Online DDL & Deploy Requests
Applies schema changes via an isolated shadow table in the background, syncing changes asynchronously before an atomic cutover:
# 1. Create a development schema branch
pscale branch create my-database add-indexes
# 2. Apply migration on dev branch
pscale shell my-database add-indexes
# SQL: ALTER TABLE orders ADD INDEX idx_status (status);
# 3. Create Deploy Request to merge into production safely
pscale deploy-request create my-database add-indexesPlanetScale Serverless Driver over Fetch / HTTP
Executes queries over HTTP/1.1 and HTTP/2 without persistent TCP connections:
import { connect } from "@planetscale/database";
const conn = connect({ url: process.env.DATABASE_URL });
const response = await conn.execute(
"SELECT id, name FROM users WHERE active = :active",
{ active: 1 },
);
console.log("Users:", response.rows);Common Patterns
Non-Blocking Deploy Requests for Zero-Downtime Migrations
Problem: Running ALTER TABLE on large production MySQL tables locks reads/writes and causes outages.
Solution: Use PlanetScale deploy requests to test changes on a branch and apply online:
# 1. Create a schema development branch
pscale branch create my-db add-index-branch
# 2. Apply ALTER schema change safely on the branch
pscale shell my-db add-index-branch < schema_update.sql
# 3. Create deploy request to merge into main branch with zero downtime
pscale deploy-request create my-db add-index-branchBest Practices
Do:
- Always Use Deploy Requests for Migrations: Never attempt manual DDL migrations in production; let PlanetScale coordinate non-blocking cutovers.
- Define a Sharding Key (VSchema) Early: If planning to shard, select a high-cardinality sharding key (e.g.
user_idortenant_id). - Use Safe Migrations Mode: Enable Safe Migrations on production branches to block accidental direct DDL executions.
- Leverage the Serverless Driver: Use
@planetscale/databasefor serverless environments (Vercel, AWS Lambda, Cloudflare).
Don't:
- Use Foreign Key Constraints in Sharded Keyspaces: Vitess does not support distributed foreign key constraints; enforce integrity in application logic.
- Use auto-incrementing integers across sharded tables: Use distributed ID generators (UUIDv7, Snowflake IDs).
- Execute cross-shard joins frequently: Distributed joins across multiple shards incur heavy network latency.
Troubleshooting
| Error | Cause | Solution |
foreign key constraints are not supported (default) | Vitess architecture discourages native foreign keys for horizontal sharding. | Enforce referential integrity in application layer or enable foreign key support in settings. |
Query exceeds maximum execution time | Query missing supporting index causing full cluster table scan. | Add supporting index via deploy request and review query plan in Insights. |
PlanetsScale connection limit exceeded | Serverless application establishing excessive unpooled TCP connections. | Use @planetscale/database fetch driver or configure connection pooling. |
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

