cli AGENTS.md

Instructions for using the PlanetScale command-line tool, which manages PlanetScale databases from a terminal.

In plain words
What is it for?
Use them to list organizations, databases, and branches in machine-readable form, check authentication, and choose between CLI automation and PlanetScale's hosted tools.
Why use it?
They help an automated coding agent use the right command format, authentication checks, placeholders, and safety rules for a public repository.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/planetscale/cli/agents-md
Clone the repo
git clone --depth 1 https://github.com/planetscale/cli

Made for: Codex, OpenCode.

Per session 9,971 This file is loaded in full into every session.
When invoked 9,971 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.09971 $0.09971
Opus 5 $0.04986 $0.04986
Sonnet 5 $0.01994 $0.01994
Haiku 4.5 $0.00997 $0.00997

Measured yesterday against content hash 846abe445dec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cli AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 638 lines

How it starts

The opening of the file, as written. The whole thing — 638 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PlanetScale CLI — agent guide

For any automated agent or script using pscale. Always pass --format json. Substitute placeholders from the user's request or from prior command output (org list, database list, branch list).

If you only have the installed pscale binary and this guide is not already in your context, load it and check auth:

pscale --skill
pscale auth check --format json

Use direct CLI automation for shell commands and scripts. Use the hosted PlanetScale MCP server for MCP clients.

This file documents how to invoke pscale. For database assessment, safety review, and operational workflows, install the PlanetScale skills pack (14-pscale-cli-automation covers CLI automation; 00-safe-orchestrator runs the full review). In application repositories, add a separate project AGENTS.md with org, database, branch, and approval rules (see skill 09-mcp-agent-operating-model in that repo).

Public repository safety

This repository is public. Do not include internal or sensitive information in commits, commit messages, pull request titles, or pull request descriptions. Do not name or link private repositories, internal issues or pull requests, Slack conversations, customer details, credentials, or private infrastructure. Include references only when the referenced resource is public.

Concepts

PlanetScale is a serverless database platform for MySQL (via Vitess) and PostgreSQL. Resources are namespaced: an organization (org) owns databases, and each database contains branches — isolated copies of schema (and, for Postgres, data) that work like git branches. The default branch is typically main (production). Most commands target a database + branch and take --org to say which organization they belong to. Throughout this guide, <org>, <database>, and <branch> are placeholders for those names — pick a branch with "ready": true from branch list.

Read the full file on GitHub · 638 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 638 lines · 9,971 tokens per session scan A 846abe445dec

Subscribe to this mod's changes

cli AGENTS.md is an instructions file published in the GitHub repository planetscale/cli (664 stars, last pushed 3d ago), licensed Apache-2.0. It adds 9,971 tokens to every session, about $0.0499 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.