planetscale-pscale-cli-automation

โดย planetscale

ใช้ PlanetScale CLI (pscale) จากเอเจนต์อัตโนมัติด้วย --format json, auth check, pscale sql และ --force ต่อคำสั่ง ทำงานก่อนสกิล PlanetScale อื่นๆ…

npx skills add https://github.com/planetscale/skills --skill planetscale-pscale-cli-automation

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)

DocumentWherePurpose
CLI agent guideShipped 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 guideYour application repository's AGENTS.mdWhich 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 json for automation.
  • Put --org <org> on resource subcommands (database, branch, sql, api, …) — not on root pscale.
  • Put positional arguments before flags (pscale sql mydb main --org bb …).
  • Use pscale sql, not pscale shell (shell requires a TTY).
  • Default SQL role is reader; pass --role admin (or writer/readwriter) for writes. Match pscale shell semantics for --role and --replica.
  • --force is per subcommand only (e.g. database delete … --force, pscale sql … --force). There is no global --force or PSCALE_FORCE.
  • --format json alone never skips confirmations — add --force on 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 json for the current URL).
  • Shell scripts and coding agents — use pscale with --format json as 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.

Skills เพิ่มเติมจาก planetscale

neki
planetscale
ภาพรวมและข้อมูลเกี่ยวกับ Neki ผลิตภัณฑ์ Postgres แบบแบ่งส่วนโดย PlanetScale โหลดเมื่อทำงานกับงานที่เกี่ยวข้องกับ Neki และความจำเป็นในการปรับขนาดหรือแบ่งส่วน…
vitess
planetscale
แนวทางปฏิบัติที่ดีที่สุดของ Vitess, การปรับแต่งคิวรีให้เหมาะสม, และการแก้ไขปัญหาการเชื่อมต่อสำหรับฐานข้อมูล PlanetScale Vitess โหลดเมื่อทำงานกับฐานข้อมูล Vitess, การแบ่งส่วนข้อมูล, …
planetscale-autonomous-execution-mode
planetscale
ดำเนินการเปลี่ยนแปลง PlanetScale ที่ได้รับการอนุมัติตั้งแต่ต้นจนจบโดยไม่ต้องขออนุมัติทีละขั้นตอนเมื่อผู้ปฏิบัติงานยอมรับความเสี่ยงอย่างชัดเจน กำหนด...
planetscale-best-practices-matrix
planetscale
เมทริกซ์คุณสมบัติที่กระชับสำหรับการตัดสินใจว่าคำแนะนำด้านความปลอดภัย การสังเกตการณ์ และระบบอัตโนมัติของ PlanetScale ใดที่ใช้กับแต่ละเอ็นจิ้น
planetscale-change-gates-and-approval-contract
planetscale
บังคับใช้ประตูอนุมัติที่ชัดเจนสำหรับการเปลี่ยนแปลงใดๆ ใน PlanetScale, ฐานข้อมูล, คลังเก็บ, ข้อมูลรับรอง, เครือข่าย หรือระบบอัตโนมัติ
planetscale-codebase-sqlcommenter-instrumentation
planetscale
ตรวจสอบที่เก็บโค้ดแอปพลิเคชันที่เชื่อมต่อกับ PlanetScale และแนะนำแพ็กเกจและรูปแบบการติดแท็กคำสั่ง SQL ที่เข้ากันได้กับ SQLCommenter
planetscale-customer-report-template
planetscale
จัดทำรายงานแนวทางปฏิบัติที่ดีที่สุดของ PlanetScale ฉบับสมบูรณ์หลังจากดำเนินการสำรวจสินค้าคงคลังและทักษะการตรวจสอบที่เกี่ยวข้อง
planetscale-mcp-agent-operating-model
planetscale
กำหนดพฤติกรรมของเอเจนต์ให้ปลอดภัยเมื่อทำงานกับ PlanetScale MCP, Insights, คำแนะนำสคีมา และงานในพื้นที่เก็บข้อมูล โดยไม่ให้เกิดการเปลี่ยนแปลงในระบบผลิตโดยอัตโนมัติ