Install
openclaw skills install @vince-winkintel/planetscale-cli-skillsComprehensive PlanetScale CLI (pscale) command reference and workflows for database management via terminal. Use when user mentions PlanetScale CLI, pscale commands, database branches, deploy requests, schema migrations, SQL queries, Cloudflare D1 imports, or any PlanetScale terminal operations. Routes to specialized sub-skills for auth, branches, deploy requests, SQL, D1 imports, databases, backups, and other pscale commands. Triggers on pscale, PlanetScale CLI, database branch, deploy request, schema migration, pscale sql, pscale import d1, Cloudflare D1 migration, PlanetScale automation.
openclaw skills install @vince-winkintel/planetscale-cli-skillsComprehensive pscale command reference and workflows for managing PlanetScale databases via terminal.
The PlanetScale CLI brings database branches, deploy requests, and schema migrations to your fingertips. This skill provides command references, automation scripts, and decision trees for all pscale operations.
| Command | Skill | Use When |
|---|---|---|
| auth | pscale-auth | Login, logout, service tokens, authentication management |
| branch | pscale-branch | Create, delete, promote, diff, list branches, inspect branch infra, download/query-stream query pattern reports, manage Vitess MoveTables workflows |
| deploy-request | pscale-deploy-request | Create, review, deploy, revert schema changes |
| database | pscale-database | Create, list, show, delete databases |
| sql | pscale-sql | Run non-interactive SQL queries with JSON output and ephemeral credentials |
| import d1 | pscale-import-d1 | Import Cloudflare D1 SQLite exports into PlanetScale Postgres |
| backup | pscale-backup | Create, list, show, delete branch backups |
| password | pscale-password | Create, list, delete connection passwords |
| org | pscale-org | List, show, switch organizations |
| service-token | pscale-service-token | Create, manage CI/CD service tokens |
What's your goal?
├─ Experimenting with schema changes → Create branch (pscale-branch)
├─ Testing schema in isolation → Create branch (pscale-branch)
├─ Ready to deploy schema to production → Create deploy request (pscale-deploy-request)
└─ Reviewing schema changes before production → Review deploy request (pscale-deploy-request)
What's your use case?
├─ CI/CD pipeline → Service token (pscale-service-token)
├─ Local development → Password (pscale-password)
├─ Production application → Service token (rotatable, secure)
└─ One-off admin task → Password (temporary)
Production readiness?
├─ Immediate promotion (dangerous) → pscale branch promote (pscale-branch)
├─ Review + approval workflow → pscale deploy-request create (pscale-deploy-request)
└─ Safe production deployment → Always use deploy requests
Complete workflow from branch creation to production deployment:
# 1. Create development branch
pscale branch create <database> <branch-name>
# 2. Make schema changes (via shell, ORM, or direct SQL)
pscale shell <database> <branch-name>
# 3. View schema diff
pscale branch diff <database> <branch-name>
# 4. Create deploy request
pscale deploy-request create <database> <branch-name>
# 5. Review and deploy
pscale deploy-request deploy <database> <deploy-request-number>
# 6. Verify deployment
pscale deploy-request show <database> <deploy-request-number>
See scripts/ directory for automation.
# Create branch from main
pscale branch create <database> <feature-branch> --from main
# Work on schema changes
pscale shell <database> <feature-branch>
# Check diff before deploying
pscale branch diff <database> <feature-branch>
# Create deploy request when ready
pscale deploy-request create <database> <feature-branch>
# Create service token for CI/CD
pscale service-token create --org <org>
# Use in CI/CD pipelines (GitHub Actions, GitLab CI, etc.)
export PLANETSCALE_SERVICE_TOKEN_ID=<token-id>
export PLANETSCALE_SERVICE_TOKEN=<token>
# Deploy via CI/CD
pscale deploy-request create <database> <branch> --auto-approve
# Lint and dry-run first; review the JSON migration ID and warnings
pscale import d1 lint --input ./d1-export.sql --format json
pscale import d1 start <database> <branch> --input ./d1-export.sql --dry-run --format json
# After explicit confirmation, run and verify the import
pscale import d1 start <database> <branch> --input ./d1-export.sql --migration-id <id> --format json
pscale import d1 verify <database> <branch> --migration-id <id> --input ./d1-export.sql --format json
# Authentication
pscale auth login
pscale auth logout
# Branch management
pscale branch create <database> <branch> [--from <source-branch>]
pscale branch list <database>
pscale branch delete <database> <branch>
# Deploy requests
pscale deploy-request create <database> <branch>
pscale deploy-request list <database>
pscale deploy-request deploy <database> <number>
# Database operations
pscale database create <database> --org <org>
pscale database list
pscale shell <database> <branch>
# Non-interactive read query for agents/scripts
pscale sql <database> <branch> --org <org> --format json --query "SELECT 1"
# Cloudflare D1 import dry-run
pscale import d1 start <database> <branch> --input ./d1-export.sql --dry-run --format json
See scripts/ directory for token-efficient automation:
create-branch-for-mr.sh - Create PlanetScale branch matching your MR/PR branch namedeploy-schema-change.sh - Complete schema migration workflowsync-branch-with-main.sh - Sync development branch with mainScripts execute without loading into context (~90% token savings).