Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

planetscale

БесплатноБез исполняемых скриптовНе проверен

PlanetScale is a managed database platform running Vitess (MySQL-compatible), Postgres and Neki (sharded Postgres), with Git-like database branches, deploy…

TerminalSkillsот TerminalSkills★ 221 звезда на GitHub

Об этом скилле

PlanetScale

Overview

PlanetScale hosts three engines: Vitess (MySQL-compatible), Postgres and Neki (horizontally sharded Postgres), each on network-attached storage or Metal (local NVMe). For Vitess databases the signature workflow is: branch the database, change the schema on the branch, open a deploy request, and let PlanetScale apply it online to production without locking tables. Everything is scriptable with the pscale CLI (checked against v0.348.0, October 2026).

Facts that changed since early 2026 write-ups: there is no free Hobby plan (the Base plan is paid; Postgres single-node starts at $5/month), Postgres and Neki exist alongside Vitess, and foreign key constraints are supported on Vitess databases when you enable them in database settings.

Instructions

Install and sign in

brew install planetscale/tap/pscale        # macOS and Linux (Homebrew)
scoop bucket add pscale https://github.com/planetscale/scoop-bucket.git && scoop install pscale   # Windows
pscale auth login                          # opens a browser
pscale auth check --format json            # verify, for scripts and agents

On Debian or RPM systems, download the .deb/.rpm from the CLI's GitHub releases page and verify it against the release's checksums file first. In CI, skip login and use a service token: --service-token-id and --service-token (or pscale service-token create). Every command takes --org and -f json|csv|human. pscale --skill prints a ready-made agent skill from the CLI itself.

Databases and branches

pscale database create storefront --engine mysql --wait
pscale database create billing-pg --engine postgresql --replicas 0 --wait   # single-node Postgres
pscale branch create storefront add-orders-table --wait
pscale branch schema storefront add-orders-table
pscale shell storefront add-orders-table          # uses the local mysql (or psql) client
pscale connect storefront add-orders-table --port 3307   # local proxy, no password

Run pscale region list for valid region slugs and pscale size cluster list for cluster sizes. pscale connect and deploy-request are Vitess-only; shell works for MySQL and Postgres and needs the matching client installed.

Schema changes with deploy requests (Vitess)

The target branch must have safe migrations enabled (branch settings), otherwise you cannot deploy into it.

pscale deploy-request create storefront add-orders-table --notes "Add orders table"
pscale deploy-request diff storefront 12
pscale deploy-request deploy storefront 12 --wait

Useful flags: create --into, --auto-delete-branch, --disable-auto-apply (then run deploy-request apply), deploy --instant (MySQL ALGORITHM=INSTANT, faster but cannot be reverted). Subcommands also include cancel, close and revert.

Connecting an app

Create a branch password (pscale password create storefront main web-prod --role readwriter --ttl 720h), put the values in environment variables, and connect. For Vitess over HTTP (Vercel Edge, Cloudflare Workers) use the serverless driver; for Node servers a regular mysql2 pool works.

// src/lib/db.ts
import { connect } from "@planetscale/database";

const db = connect({ url: process.env.DATABASE_URL }); // mysql://user:pass@host from the password page

export async function recentOrders(userId: number) {
  const { rows } = await db.execute(
    "SELECT id, amount, status FROM orders WHERE user_id = ? ORDER BY created_at DESC LIMIT 20",
    [userId]
  );
  return rows;
}

export async function refund(orderId: number) {
  return db.transaction(async (tx) => {
    await tx.execute("UPDATE orders SET status = 'refunded' WHERE id = ? AND status = 'completed'", [orderId]);
    return tx.execute("SELECT id, status FROM orders WHERE id = ?", [orderId]);
  });
}

The serverless driver is for Vitess/MySQL only (@planetscale/database 2.x). For PlanetScale Postgres use a normal Postgres driver, or the Neon serverless driver for HTTP environments.

Insights

pscale insights queries storefront main
pscale insights recommendations storefront main    # unused or missing indexes
pscale insights anomalies storefront main
pscale audit-log list --limit 20

Examples

Example 1: "Add an orders table to production without downtime"

pscale branch create storefront add-orders-table --wait
pscale shell storefront add-orders-table
# in the mysql prompt:
#   CREATE TABLE orders (id BIGINT AUTO_INCREMENT PRIMARY KEY, user_id BIGINT NOT NULL,
#     amount DECIMAL(10,2) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'pending',
#     created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, INDEX idx_user (user_id));
pscale deploy-request create storefront add-orders-table
pscale deploy-request diff storefront 12
pscale deploy-request deploy storefront 12 --wait

Result: the diff shows one new table; after deploy the table exists on main and the schema was applied onl

Полный SKILL.md на GitHub

Установить planetscale в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

_scores.json

FAQ

Что делает скилл planetscale?

PlanetScale is a managed database platform running Vitess (MySQL-compatible), Postgres and Neki (sharded Postgres), with Git-like database branches, deploy requests for non-blocking schema changes, and query insights. Use when asked to "set up PlanetScale", "create a PlanetScale branch", "run a deploy request", "use the pscale CLI", "connect to PlanetScale from serverless or edge functions", or "check slow queries on PlanetScale".

Как установить скилл planetscale?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл planetscale запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить planetscale с