Planetscale Vitess Safety Review
PlanetScaleOfficialPublished by PlanetScale
- Skill
- Review and audit
- Data and AI
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a comprehensive safety review framework for PlanetScale Vitess databases. It evaluates production readiness by auditing migration workflows, deploy request configurations, schema management, and query insights. The skill identifies gaps in operational safety and provides actionable recommendations for improving branch strategies, webhook integrations, and incident response runbooks without executing any direct changes to the database.
What it does
- Audits safe migration settings and branch protection policies.
- Reviews deploy request workflows for potential data loss or operational risks.
- Analyzes Query Insights to identify performance bottlenecks and missing indexes.
- Evaluates schema recommendations and provides a structured triage path.
- Recommends webhook configurations for monitoring anomalies and deployment lifecycles.
- Assesses backup and restore readiness for production environments.
When to use it
- Before performing major schema migrations on production databases.
- When establishing or auditing database governance and safety standards.
- To investigate performance issues or anomalies in query patterns.
- When setting up automated alerting and monitoring for database events.
Advantages
- Promotes safe, repeatable schema change workflows.
- Reduces risk of production downtime through proactive configuration review.
- Provides clear guidance on leveraging Vitess-specific features like vindexes and Insights.
- Ensures non-destructive auditing by focusing on recommendations rather than automated execution.
Usage examples
- “Review my production Vitess database for safe migration gaps.”
- The agent analyzes current branch settings, deploy request policies, and webhook subscriptions, returning a report on missing safety features and recommended improvements.
- “Audit my current schema recommendations and suggest a triage plan.”
- The agent categorizes open schema recommendations by risk and impact, providing a structured plan for validation and deployment.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/planetscale/planetscale-vitess-safety-review/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip planetscale-vitess-safety-review.zip -d .agents/skills
Documentation by PlanetScale
Vitess safety review
Purpose
Recommend best practices for a PlanetScale Vitess database. Focus on production safety, deployability, observability, and agent-safe automation. Do not apply any changes.
Primary safety features to evaluate
Safe migrations
Check whether safe migrations are enabled on production and staging branches.
Recommend enabling safe migrations when:
The branch receives production traffic.
The team runs DDL outside deploy requests.
There is no protected branch workflow.
The application is expected to evolve schema frequently.
Explain the tradeoff: safe migrations reject direct DDL on protected branches and force schema changes through deploy requests. That is a feature, but it can break teams relying on direct production DDL. Treat enablement as a behavior-changing change requiring approval.
Deploy requests
Check:
Whether deploy requests are used for schema changes.
Whether administrator approval is required.
Whether deploy requests are reviewed for data loss, conflicts, lint errors, foreign key problems, charset issues, and shard impact.
Whether teams use gated deployments for cutover control.
Whether “deploy instantly” is used and whether the team understands it removes the gated-deployment/revert shape.
Whether cutover is regularly delayed by long-running transactions.
Whether deploy request events are subscribed to via webhooks.
Recommend:
Require deploy requests for production schema changes.
Enable administrator approval for production deploy requests when there is more than one administrator.
In a single-admin organization, administrator approval does not stop an agent that acts as that admin: the admin who opens a deploy request can also approve it. If the goal is to keep agents from self-approving, give the agent a separate user, or a service token without deploy request approval permission.
Prefer normal safe deployments over instant deployments unless the migration is known to be instant-safe and the rollback story is acceptable.
Use gated deployment when cutover timing matters.
Treat “force cutover now” as an operator-controlled action for delayed cutovers: it aggressively stops running transactions to complete schema cutover. Recommend reviewing the blocking workload and incident context before use, and only recommend the database-level aggressive cutover default when frequent cutover blocking is understood and accepted.
Schema revert
Check whether the team knows the revert window and whether their incident runbook includes it.
Recommend documenting:
How to identify a bad schema migration.
How to revert within the supported window.
Who is authorized to revert.
Which application deploy should be rolled back together with the schema revert.
Branch strategy
Recommend a branch topology:
mainor equivalent production branch with safe migrations enabled.stagingbranch based from production with safe migrations enabled.Short-lived development branches based from staging.
Deploy requests from development to staging, then staging to production when appropriate.
Do not create branches without approval.
Query Insights
Review Insights for:
Slow queries.
Queries reading too many rows.
Erroring queries.
Queries with poor index usage.
For sharded databases, whether query patterns use relevant vindexes and how vindex usage changes after index or routing changes.
Unusual query volume.
Missing SQL comment tags.
Tag breakdowns when built-in metadata or SQLCommenter tags are present:
tag:key:valuefiltering in the dashboard, and theinsights/tagsandinsights/tags/summariesAPI endpoints for programmatic breakdowns.Deploy correlation data.
Recommend enabling or improving application query tagging so Insights can attribute queries to app, route, controller, action, job, deployment SHA, and feature.
Anomalies
Review active and recent anomalies.
Recommend:
Subscribe
branch.anomalywebhooks to the team’s alerting or automation system.Route anomaly payloads to a triage workflow that opens an issue or agent task.
Correlate anomalies with deploy requests, application deploys, and query tags.
Do not automatically apply schema or code changes from anomaly events; generate a proposal or PR only.
Schema recommendations
Review open schema recommendations.
For each recommendation, capture:
Type: add index, remove redundant index, primary key exhaustion, unused table, legacy charset/collation, or other.
Affected table and keyspace.
Supporting query telemetry.
DDL.
Expected benefit.
Risk.
Test plan.
Recommend implementation path:
Convert the recommendation into an application migration or PlanetScale branch schema change.
Open a deploy request.
Review generated DDL and shard impact.
Benchmark or validate on a branch.
Deploy with safe migrations.
Monitor Insights and anomaly state after deployment.
Do not apply recommendations directly.
Backups and restore
Check backup posture and restore runbooks.
Recommend:
Verify automated backups exist.
Run a non-production restore drill periodically.
Document restore target, RPO/RTO expectation, and application cutover plan.
For sharded databases, document shard-aware restore expectations.
Sharding and keyspace safety
If the database is sharded, review:
Keyspaces and shards.
Vschema.
Cross-shard query patterns.
Whether schema deploy requests show per-shard impact.
Whether queries use shard-friendly access paths.
Recommend an agent-safe sharding review only as a proposal. Never reshard, change vschema, or alter routing automatically.
Webhook recommendations for Vitess
Evaluate and recommend webhooks for:
branch.anomalybranch.primary_promotedbranch.readybranch.sleepingcluster.storagekeyspace.storagedeploy_request.openeddeploy_request.queueddeploy_request.in_progressdeploy_request.pending_cutoverdeploy_request.schema_applieddeploy_request.erroreddeploy_request.reverteddeploy_request.closedbranch.schema_recommendationif available in the webhook API for the customer’s database
Recommended destinations:
Alerting for anomaly, primary promotion, storage, and deploy errors.
Slack or internal notifications for deploy request lifecycle.
Agent intake queue for schema recommendations and anomalies, with PR-only output by default.
Output
Return:
Current Vitess safety posture.
Missing safety features.
Recommended workflow.
Recommended webhook subscriptions.
Schema recommendation triage table.
Deploy safety gaps.
Proposed changes requiring approval.
End with:
“No Vitess changes have been applied.”
Files
- ATTRIBUTION.mdAdded by AutoGineer892 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md6.8 KiB
SKILL.md
Vitess safety review
Purpose
Recommend best practices for a PlanetScale Vitess database. Focus on production safety, deployability, observability, and agent-safe automation. Do not apply any changes.
Primary safety features to evaluate
Safe migrations
Check whether safe migrations are enabled on production and staging branches.
Recommend enabling safe migrations when:
The branch receives production traffic.
The team runs DDL outside deploy requests.
There is no protected branch workflow.
The application is expected to evolve schema frequently.
Explain the tradeoff: safe migrations reject direct DDL on protected branches and force schema changes through deploy requests. That is a feature, but it can break teams relying on direct production DDL. Treat enablement as a behavior-changing change requiring approval.
Deploy requests
Check:
Whether deploy requests are used for schema changes.
Whether administrator approval is required.
Whether deploy requests are reviewed for data loss, conflicts, lint errors, foreign key problems, charset issues, and shard impact.
Whether teams use gated deployments for cutover control.
Whether “deploy instantly” is used and whether the team understands it removes the gated-deployment/revert shape.
Whether cutover is regularly delayed by long-running transactions.
Whether deploy request events are subscribed to via webhooks.
Recommend:
Require deploy requests for production schema changes.
Enable administrator approval for production deploy requests when there is more than one administrator.
In a single-admin organization, administrator approval does not stop an agent that acts as that admin: the admin who opens a deploy request can also approve it. If the goal is to keep agents from self-approving, give the agent a separate user, or a service token without deploy request approval permission.
Prefer normal safe deployments over instant deployments unless the migration is known to be instant-safe and the rollback story is acceptable.
Use gated deployment when cutover timing matters.
Treat “force cutover now” as an operator-controlled action for delayed cutovers: it aggressively stops running transactions to complete schema cutover. Recommend reviewing the blocking workload and incident context before use, and only recommend the database-level aggressive cutover default when frequent cutover blocking is understood and accepted.
Schema revert
Check whether the team knows the revert window and whether their incident runbook includes it.
Recommend documenting:
How to identify a bad schema migration.
How to revert within the supported window.
Who is authorized to revert.
Which application deploy should be rolled back together with the schema revert.
Branch strategy
Recommend a branch topology:
mainor equivalent production branch with safe migrations enabled.stagingbranch based from production with safe migrations enabled.Short-lived development branches based from staging.
Deploy requests from development to staging, then staging to production when appropriate.
Do not create branches without approval.
Query Insights
Review Insights for:
Slow queries.
Queries reading too many rows.
Erroring queries.
Queries with poor index usage.
For sharded databases, whether query patterns use relevant vindexes and how vindex usage changes after index or routing changes.
Unusual query volume.
Missing SQL comment tags.
Tag breakdowns when built-in metadata or SQLCommenter tags are present:
tag:key:valuefiltering in the dashboard, and theinsights/tagsandinsights/tags/summariesAPI endpoints for programmatic breakdowns.Deploy correlation data.
Recommend enabling or improving application query tagging so Insights can attribute queries to app, route, controller, action, job, deployment SHA, and feature.
Anomalies
Review active and recent anomalies.
Recommend:
Subscribe
branch.anomalywebhooks to the team’s alerting or automation system.Route anomaly payloads to a triage workflow that opens an issue or agent task.
Correlate anomalies with deploy requests, application deploys, and query tags.
Do not automatically apply schema or code changes from anomaly events; generate a proposal or PR only.
Schema recommendations
Review open schema recommendations.
For each recommendation, capture:
Type: add index, remove redundant index, primary key exhaustion, unused table, legacy charset/collation, or other.
Affected table and keyspace.
Supporting query telemetry.
DDL.
Expected benefit.
Risk.
Test plan.
Recommend implementation path:
Convert the recommendation into an application migration or PlanetScale branch schema change.
Open a deploy request.
Review generated DDL and shard impact.
Benchmark or validate on a branch.
Deploy with safe migrations.
Monitor Insights and anomaly state after deployment.
Do not apply recommendations directly.
Backups and restore
Check backup posture and restore runbooks.
Recommend:
Verify automated backups exist.
Run a non-production restore drill periodically.
Document restore target, RPO/RTO expectation, and application cutover plan.
For sharded databases, document shard-aware restore expectations.
Sharding and keyspace safety
If the database is sharded, review:
Keyspaces and shards.
Vschema.
Cross-shard query patterns.
Whether schema deploy requests show per-shard impact.
Whether queries use shard-friendly access paths.
Recommend an agent-safe sharding review only as a proposal. Never reshard, change vschema, or alter routing automatically.
Webhook recommendations for Vitess
Evaluate and recommend webhooks for:
branch.anomalybranch.primary_promotedbranch.readybranch.sleepingcluster.storagekeyspace.storagedeploy_request.openeddeploy_request.queueddeploy_request.in_progressdeploy_request.pending_cutoverdeploy_request.schema_applieddeploy_request.erroreddeploy_request.reverteddeploy_request.closedbranch.schema_recommendationif available in the webhook API for the customer’s database
Recommended destinations:
Alerting for anomaly, primary promotion, storage, and deploy errors.
Slack or internal notifications for deploy request lifecycle.
Agent intake queue for schema recommendations and anomalies, with PR-only output by default.
Output
Return:
Current Vitess safety posture.
Missing safety features.
Recommended workflow.
Recommended webhook subscriptions.
Schema recommendation triage table.
Deploy safety gaps.
Proposed changes requiring approval.
End with:
“No Vitess changes have been applied.”
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- PlanetScale
- Publisher
- PlanetScale (Official)
- Source
- planetscale/skills · planetscale-vitess-safety-review · commit 999045c
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by PlanetScale or PlanetScale.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download planetscale-vitess-safety-review.zip