planetscale
planetscale is an engineering AI skill with a core value of Operate MySQL-compatible databases on PlanetScale with branching workflows, safe migrations, and production rollouts. It
helps developers solve real-world problems in the engineering domain, boosting
efficiency, automating repetitive tasks, and optimizing workflows.
Operate MySQL-compatible databases on PlanetScale with branching workflows, safe migrations, and production rollouts.
Quick Facts
mkdir -p ./skills/planetscale && curl -sfL https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/skills/planetscale/SKILL.md -o ./skills/planetscale/SKILL.md Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).
Skill Content
# PlanetScale
Use PlanetScale for serverless MySQL-compatible databases with non-blocking schema change workflows built on Vitess.
When to Use
- You need a managed MySQL-compatible database with zero-downtime migrations.
- Your team wants Git-like branching for schema development.
- You are building a serverless or edge application that benefits from connection pooling.
- You need horizontal sharding without managing Vitess directly.
Prerequisites
- A PlanetScale account (free tier available).
- The `pscale` CLI installed locally.
- Node.js 18+ if using Prisma or other ORM integrations.
Install the pscale CLI
# macOS
brew install planetscale/tap/pscale
# Linux (deb)
curl -fsSL https://github.com/planetscale/cli/releases/latest/download/pscale_linux_amd64.deb -o pscale.deb
sudo dpkg -i pscale.deb
# Verify installation
pscale version
# Authenticate
pscale auth loginCreate and Manage Databases
# Create a new database
pscale database create my-app --region us-east
# List databases
pscale database list
# Show database info
pscale database show my-app
# Delete a database (destructive)
pscale database delete my-appBranching Workflow
PlanetScale branches work like Git branches for your database schema. The `main` branch is the production branch by default.
# Create a development branch from main
pscale branch create my-app add-users-table
# List all branches
pscale branch list my-app
# Open a shell on the branch to apply schema changes
pscale shell my-app add-users-tableApply Schema Changes on a Branch
-- Inside the pscale shell on the development branch
CREATE TABLE users (
id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
email VARCHAR(255) NOT NULL,
name VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
UNIQUE KEY idx_users_email (email)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE orders (
id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
user_id BIGINT NOT NULL,
total DECIMAL(10,2) NOT NULL DEFAULT 0.00,
status ENUM('pending','paid','shipped','cancelled') DEFAULT 'pending',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
KEY idx_orders_user_id (user_id),
KEY idx_orders_status (status)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;> PlanetScale does not enforce foreign keys at the database level. Use application-level constraints or Vitess-level routing rules instead.
Deploy Requests
Deploy requests are the pull-request equivalent for database schemas. They show a diff, run linting, and merge non-blocking into production.
# Create a deploy request from branch to main
pscale deploy-request create my-app add-users-table
# List open deploy requests
pscale deploy-request list my-app
# Show diff for a deploy request
pscale deploy-request diff my-app 1
# Deploy (merge) the request
pscale deploy-request deploy my-app 1
# Close without deploying
pscale deploy-request close my-app 1
# Delete the branch after successful deploy
pscale branch delete my-app add-users-tableConnection Strings and Proxying
# Create a password (connection credential) for a branch
pscale password create my-app main production-creds
# Output includes host, username, and password for the connection string:
# mysql://USERNAME:PASSWORD@HOST/my-app?sslmode=verify_identity
# Proxy a branch to localhost for local development (no password needed)
pscale connect my-app add-users-table --port 3306Environment Variable Pattern
# .env (local development using pscale connect)
DATABASE_URL="mysql://root@127.0.0.1:3306/my-app"
# .env.production (using PlanetScale connection string)
DATABASE_URL="mysql://USERNAME:PASSWORD@us-east.connect.psdb.cloud/my-app?sslaccept=strict"Prisma Integration
// prisma/schema.prisma
datasource db {
provid🎯 Best For
- Claude users
- AI users
💡 Use Cases
- Using planetscale in daily workflow
- Automating repetitive engineering tasks
📖 How to Use This Skill
- 1
Install the Skill
Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.
- 2
Load into Your AI Assistant
Open Claude and reference the skill. Paste the SKILL.md content or use the system prompt tab.
- 3
Apply planetscale to Your Work
Provide context for your task — paste source material, describe your audience, or share existing work to guide the AI.
- 4
Review and Refine
Edit the AI output for accuracy, tone, and completeness. Add human insight where the AI lacks context.
❓ Frequently Asked Questions
How do I install planetscale?
Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/planetscale/SKILL.md, ready to use.
Can I customize this skill for my team?
Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.
⚠️ Common Mistakes to Avoid
Not reading the full skill
Skills contain important context and edge cases beyond the quick start.