/planetscale:planetscale-mcp-agent-operating-modelfrom planetscale
Configures safe agent behavior with PlanetScale MCP, defining allowed read-only tasks and autonomous non-production operations while gating production mutations behind approval.
Ships in planetscale. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Define how agents should use PlanetScale MCP safely. Agents should use production telemetry to generate useful work while avoiding autonomous production changes.
Use the PlanetScale MCP insights-only server when the task only needs Insights and Schema Recommendations.
Use the full PlanetScale MCP server only when the task explicitly requires database/schema access beyond Insights. Prefer read-only scopes.
The full MCP server has query execution tools. Treat write query tools as disabled unless the operator explicitly approves a specific non-production action or a carefully reviewed production action.
Two different documents both named AGENTS.md serve different purposes:
CLI agent guide — shipped with pscale (AGENTS.md in the
planetscale/cli repo, or
pscale agent-guide --format json). Covers auth, --format json, flag
placement, and pscale sql. Load skill 14-pscale-cli-automation for the
same conventions inside this skills pack.
Project agent guide — your application repository's AGENTS.md (or
equivalent). Covers database targeting and approval policy for this app.
When working inside a repository, recommend adding a project database
targeting section to AGENTS.md or equivalent project instructions:
Do not edit AGENTS.md without approval.
Allowed by default:
Where a PR + deploy-request workflow exists, the default deliverable for a schema recommendation is the complete reviewable unit: development branch with the DDL applied, PR with evidence (fingerprint, metrics, expected effect), and an open deploy request. The human action is the merge/deploy decision, not shepherding the proposal into existence.
Not allowed by default (the review-gate actions and non-reviewable mutations):
warn budget proposal.The loops above run interactively. They can also run on a schedule with no
human in the loop, in two tiers. Tier 2 requires a standing authorization
per ../13-autonomous-execution-mode/SKILL.md; Tier 1 requires none.
Every scheduled loop, both tiers: re-read authorization at run start, stream status to a configured delivery channel, persist a run log, and avoid filing duplicates (do not re-file an issue that is already open for the same fingerprint/recommendation ID).
branch.anomaly,
gather affected patterns, classify probable cause, post triage note to
the incident channel. Output: triage note.For read queries:
planetscale_execute_read_query routes reads to replicas by default when a
branch has replicas configured (use_replica: true). Set
use_replica: false only when the task needs primary-read semantics, such
as checking immediately-after-write state or primary-only behavior.EXPLAIN ANALYZE on production unless explicitly approved.pg_read_all_data and does not bypass RLS. If a read query returns zero
rows or a zero count and the MCP response warns that RLS may be filtering
results, treat the result as policy-filtered/unknown until confirmed through
an approved path; do not conclude the table is empty.sort=cpuTime on the Insights API).
CPU time metrics are Postgres-only; do not ask for the same CPU-sorted
view on Vitess.For write queries:
Return:
End with:
“No MCP write tools or database mutations have been used.”
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
planetscale, mcp-safety, agent-guide, database-operating-model
19 skills in this plugin
/planetscale-safe-orchestratorMaster skill that runs the full PlanetScale safe best-practices assessment — inventory, engine review, Insights, Traffic Control, webhooks, schema recommendations, codebase instrumentation, and agent operating model — then produces a unified recommendations report. Never applies changes without explicit approval. Use when the user asks to run the full assessment, all skills, or PlanetScale best-practices review./planetscale-readonly-inventoryCollect read-only evidence about PlanetScale org, database, branches, webhooks, backups, roles, Insights, recommendations, and traffic configuration./planetscale-vitess-safety-reviewReview a PlanetScale Vitess database for safe migrations, deploy requests, schema recommendations, Insights, webhooks, and operational safety./planetscale-postgres-safety-reviewReview PlanetScale Postgres for Traffic Control, query tags, roles, pg_strict, backups/PITR, private connectivity, webhooks, branches, and safe agent operation./planetscale-query-insights-and-tagsUse PlanetScale Insights and SQLCommenter-style query tags to attribute database load, identify risky queries, and prepare safe Traffic Control or schema recommendations./planetscale-traffic-control-recommendationsBuild a safe recommendation plan for PlanetScale Postgres Database Traffic Control budgets and rules without applying them.claude plugin install planetscale@claude-plugins-officialOther plugins' skills for the same job