planetscale-pscale-cli-automation
Use the PlanetScale CLI (pscale) from automated agents with --format json, auth check, pscale sql, and per-command --force. Run before other PlanetScale skills when driving pscale directly. Use when the user asks to automate pscale, run CLI commands headless, or verify pscale auth from an agent.
- 0
- Installs
- —
- Rating
- —
- Success rate
- 1
- Files scanned
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 9a86e3f6115402a5… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
SKILL.md
PlanetScale CLI automation
Purpose
Teach agents how to invoke pscale non-interactively. This skill covers CLI
conventions only. Operational workflows (inventory, safety review, schema
recommendations) use the other skills in this repo — start with
../planetscale-safe-orchestrator/SKILL.md for a full assessment.
Two AGENTS.md files (do not confuse them)
| Document | Where | Purpose |
|---|---|---|
| CLI agent guide | Shipped with pscale (AGENTS.md in the CLI repo, or pscale agent-guide) | How to call pscale: auth, --format json, flag placement, pscale sql |
| Project agent guide | Your application repository's AGENTS.md | Which org, database, branch, engine, prod branch, MCP scope, approval rules |
Do not edit project AGENTS.md without operator approval (see
../planetscale-mcp-agent-operating-model/SKILL.md).
Bootstrap (always start here)
pscale agent-guide --format json
pscale auth check --format json
If auth check returns "status": "action_required", follow issues and
next_steps in the JSON. For login, the human may need to approve in the
browser; use pscale auth login --format json.
Conventions
- Always pass
--format jsonfor automation. - Put
--org <org>on resource subcommands (database,branch,sql,api, …) — not on rootpscale. - Put positional arguments before flags (
pscale sql mydb main --org bb …). - Use
pscale sql, notpscale shell(shell requires a TTY). - Default SQL role is reader; pass
--role admin(or writer/readwriter) for writes. Matchpscale shellsemantics for--roleand--replica. --forceis per subcommand only (e.g.database delete … --force,pscale sql … --force). There is no global--forceorPSCALE_FORCE.--format jsonalone never skips confirmations — add--forceon the destructive subcommand after explicit user approval.
Typical workflow
pscale auth check --format json
pscale org list --format json
pscale database list --org <org> --format json
pscale branch list <database> --org <org> --format json
pscale sql <database> <branch> --org <org> --format json --query "SELECT 1"
MySQL uses @primary by default (same as pscale shell); pass --keyspace only
for multi-keyspace databases.
MCP vs CLI
- MCP clients — use the hosted PlanetScale MCP server (see
pscale agent-guide --format jsonfor the current URL). - Shell scripts and coding agents — use
pscalewith--format jsonas above.
When this skill is not enough
Install the full PlanetScale skills pack (if not already):
git clone https://github.com/planetscale/skills.git && cd skills && script/setup
# or: npx skills add planetscale/skills -g -y
Then run sub-skills or ../planetscale-safe-orchestrator/SKILL.md for database operations
beyond basic CLI invocation.
Current conventions source of truth
Prefer live output over memorized flag syntax:
pscale agent-guide --format json
The embedded guide field contains the full CLI agent guide shipped with your
pscale binary.
Files
1- SKILL.md
a6ad0a0d863.5 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from planetscale/skills8
Execute approved PlanetScale changes end-to-end without per-step approval when the operator has explicitly acknowledged the risk. Defines the risk-acknowledgment contract, scoped autonomy levels, sensible execution ordering, continuous status reporting, halt conditions, and rollback discipline. Extr
A concise feature matrix for deciding which PlanetScale safety, observability, and automation recommendations apply by engine.
Enforce explicit approval gates for any PlanetScale, database, repository, credential, network, or automation mutation.
Inspect an application repository connected to PlanetScale and recommend SQLCommenter-compatible query tagging packages and conventions.
Produce the final PlanetScale best-practices report after running the inventory and relevant review skills.
Configure safe agent behavior around PlanetScale MCP, Insights, schema recommendations, and repository work without autonomous production mutation.
Review PlanetScale Postgres for Traffic Control, query tags, roles, pg_strict, backups/PITR, private connectivity, webhooks, branches, and safe agent operation.
Use PlanetScale Insights and SQLCommenter-style query tags to attribute database load, identify risky queries, and prepare safe Traffic Control or schema recommendations.
Related tooling skillsscan passed
Open an executable and its argument array in a visible terminal window through a reusable, shell-free launch plan with dry-run, JSON, capability detection, detached fallback, and standalone recovery modes. Use when Codex needs to open an interactive CLI, SSH session, local development process, sandb
Web performance regression detection. (gstack)
Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintena
Helps you build and check a color system for your project. It generates palettes, names semantic tokens, converts between formats and measures contrast.
Creates a new Angular app using the Angular CLI. This skill should be used whenever a user wants to create a new Angular application and contains important guidelines for how to effectively create a modern Angular application.
Audit, diagnose, or optimize website loading and interaction performance, Core Web Vitals, and Lighthouse performance scores.