g1joshi/agent-skills/planetscale
Claude Code and agent skill by g1joshi/agent-skills
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install g1joshi/agent-skills/planetscaleSKILL.md
The same SKILL.md was published earlier as g1joshi/agent-skills/planetscale.
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.
Core Concepts
Vitess Horizontal Sharding Architecture
VTGate proxies route queries transparently across underlying VTTablet MySQL instances based on a VSchema keyspace:
Non-Blocking Online DDL & Deploy Requests
Applies schema changes via an isolated shadow table in the background, syncing changes asynchronously before an atomic cutover:
PlanetScale Serverless Driver over Fetch / HTTP
Executes queries over HTTP/1.1 and HTTP/2 without persistent TCP connections:
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:
Best 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
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/databases/planetscale/SKILL.md
Popularity
- Repository stars
- 9
- Repository forks
- 2
- 7-day trend score
- 12
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (Cursor)
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/g1joshi/agent-skills/planetscale)