Skip to main content
skill CX Codex

planetscale-change-gates-and-approval-contract — Claude Code skill

This skill sorts PlanetScale and repository operations by risk, then sets approval requirements for changes that affect behavior or production.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add planetscale/skills --skill planetscale-change-gates-and-approval-contract -a claude-code
Open on GitHub

What planetscale-change-gates-and-approval-contract does

The skill groups operations from reading metadata to changing production. Behavior-changing actions need explicit approval; production work also requires a confirmed target and a rollback plan. Class E actions, including deleting a production database, are never allowed to run autonomously.

Before a Class C or D action, the agent must present the exact command or other execution method, target, expected effect, risks, rollback steps, validation, and monitoring. After an approved change, it must report what happened and any warnings. Approval does not remove the need to show the plan first.

Install it for Claude Code with npx skills add planetscale/skills --skill planetscale-change-gates-and-approval-contract -a claude-code. The skill also supports Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode.

What it helps with

  • separate read-only requests from risky changes
  • require approval before changing PlanetScale behavior
  • prepare rollback steps for production work
  • turn vague production requests into named change plans

Example prompts for the agent

  • Check whether this migration can run in production and prepare the approval plan.
  • Before changing PlanetScale settings, list the target, risks, and rollback steps.
  • Turn “fix everything” into a named set of proposed changes.

How to install planetscale-change-gates-and-approval-contract

1Skills CLI (Vercel)

npx skills add planetscale/skills --skill planetscale-change-gates-and-approval-contract -a claude-code

2Manually: put the files in place

~/.claude/skills/planetscale-change-gates-and-approval-contract/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/planetscale-change-gates-and-approval-contract/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about planetscale-change-gates-and-approval-contract

How do I install planetscale-change-gates-and-approval-contract in Claude Code?

Run npx skills add planetscale/skills --skill planetscale-change-gates-and-approval-contract -a claude-code. The skill file is at ~/.claude/skills/planetscale-change-gates-and-approval-contract/SKILL.md.

What does planetscale-change-gates-and-approval-contract do?

It sorts PlanetScale, database, and repository operations into risk classes and defines when approval is required. Production changes need a confirmed target and rollback plan.

Can this skill authorize autonomous production changes?

A scoped, risk-acknowledged autonomous mode can replace per-change approval for some actions. Class E actions remain off limits, and Class C and D actions still require an execution plan.

Source text

SKILL.md · MIT
---
name: planetscale-change-gates-and-approval-contract
description: Enforce explicit approval gates for any PlanetScale, database, repository, credential, network, or automation mutation.
---

# Change gates and approval contract

## Purpose

Prevent accidental or autonomous changes that can affect availability, safety, security, data, or developer workflows.

## Operation classes

### Class A: read-only by default

Allowed without approval:

- List databases, branches, keyspaces, webhooks, backups, roles, traffic budgets, schema recommendations, deploy requests, and Insights data.
- Inspect repository code.
- Read schema metadata.
- Read non-sensitive database metadata.
- Produce reports and proposed change sets.

### Class B: state-creating proposals

Allowed by default; requires approval only when the operator has demanded strict no-mutation mode:

- Creating a query-pattern report through an API POST, even if the result is read-only telemetry.
- Triggering a webhook test event.
- Creating temporary local branches or files.
- Opening PRs or issues in external tools.
- Creating database development branches.
- Applying DDL or migrations to non-production development branches.
- Opening deploy requests targeting a branch protected by a review workflow.

The last three are proposals inside an existing review system: nothing
reaches production until a human merges or deploys. The gate belongs on
the merge/deploy action (Class C/D), not on proposal creation. An agent
that stops to ask permission to open a PR is misclassifying.

### Class C: behavior-changing

Always requires explicit approval:

- Enable safe migrations.
- Disable safe migrations.
- Change deploy request approval settings.
- Create/update/delete Traffic Control budget or rule.
- Move Traffic Control budget to enforce mode.
- Create/update/delete webhook.
- Enable raw query collection.
- Enable/disable extensions or settings that require restart.
- Create/update/delete role.
- Reset passwords.
- Change pg_strict settings.
- Change connection pooling behavior.
- Change IP restrictions, PrivateLink, PSC, or public access.
- Change backup schedule or retention.
- Create restore branch.
- Create backup beyond automatic backups.
- Change branch size or replica topology.
- Edit repository files or dependencies.

### Class D: production data/availability impacting

Requires explicit approval, named target confirmation, rollback plan, and ideally a second human review:

- Production DDL.
- Production DML.
- Applying schema recommendation to production.
- Queueing or applying Vitess deploy request to production.
- Promoting or restoring branches.
- Deleting branches, databases, roles, webhooks, backups, or traffic rules.
- Enforcing Traffic Control on production.
- Changing production network access.
- Rotating production credentials.
- Emergency backup during high load.

### Class E: never autonomous

Never do without direct human operation or separately approved incident procedure:

- Delete a production database.
- Disable all production safety mechanisms.
- Drop production tables or columns.
- Remove IP restrictions or private-only posture.
- Store or expose secrets in logs, issues, PRs, Slack, or reports.
- Auto-merge code generated from database telemetry.
- Auto-apply DDL generated by an LLM.

## Approval requirements

A valid approval must include:

- Change ID.
- Target organization/database/branch.
- Whether production is affected.
- Permission to execute the exact action.

Invalid approvals:

- “Do the best practices.”
- “Fix everything.”
- “Apply recommendations.”
- “Go ahead” without named change IDs.

## Autonomous execution exception

There is exactly one alternative to per-change approval: the risk-acknowledged
autonomous mode defined in `../planetscale-autonomous-execution-mode/SKILL.md`. When the
operator explicitly acknowledges the risk, names a scope, and states whether
production is included, that acknowledgment substitutes for per-change approval
of Class B/C (and Class D when production is included) actions **within the
named scope only**.

Everything else in this skill still applies in autonomous mode:

- Class E is never unlocked by any phrasing.
- The pre-execution checklist must still be produced for every Class C/D step
  (shown as the execution plan, not as a stop-and-wait).
- The post-execution report is still required.
- Out-of-scope work still requires new approval or new acknowledgment.

## Required pre-execution checklist

Before any Class C or D action, produce:

- Exact command, API endpoint, dashboard action, SQL, or repository diff.
- Target confirmation.
- Expected effect.
- Availability impact.
- Data risk.
- Security risk.
- Rollback plan.
- Validation plan.
- Monitoring plan.

Then stop for approval.

## Required post-execution report

If an approved change is later executed, report:

- What changed.
- When it changed.
- Who approved.
- Interface used.
- Evidence of success.
- Any warnings.
- Rollback state.
- Follow-up monitoring.

## Required refusal behavior

If asked to apply broad or ambiguous production changes, refuse the broad action and produce a safer named change plan.

Use this sentence:

“I will not apply broad production changes from an ambiguous instruction. I can produce a named change set with risk and rollback details.”

© planetscale · MIT · planetscale/skills

Similar skills

All skills for Security →

From the same set15

planetscale-best-practices-matrix The skill maps database findings to PlanetScale recommendations and tells you what applies to Vitess and what to Postgres. CX Codex +1 1,800installs planetscale-vitess-safety-review Reviews a PlanetScale Vitess database for safe migrations, deploy requests, Insights and webhooks. Produces a report, applies nothing. CX Codex +1 1,700installs planetscale-webhook-automation-recommendations Recommends PlanetScale webhook subscriptions and safe automation patterns for database alerts, anomalies, and deploy requests. CX Codex +1 1,700installs planetscale-customer-report-template Turns inventory and review results into the final PlanetScale best-practices report for a customer database, with recommendations tied to measurements. CX Codex +1 1,700installs planetscale-traffic-control-recommendations This skill drafts a recommendation plan for PlanetScale Postgres Traffic Control budgets and rules, and applies nothing without approval. CX Codex +1 1,700installs planetscale-readonly-inventory Collects read-only inventory data from PlanetScale databases, branches, backups, and Query Insights. It audits infrastructure setup without risking mutations or secret generation. CX Codex +1 1,700installs planetscale-codebase-sqlcommenter-instrumentation Inspects a repo connected to PlanetScale and recommends an SQLCommenter-compatible package for tagging queries. Use it when queries in Insights and Traffic Control need to map back to code paths. CX Codex +1 1,700installs planetscale-pscale-cli-automation Teaches coding agents to run the PlanetScale CLI non-interactively with JSON output. Useful when automating database tasks and verifying authentication. CX Codex +1 1,700installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor