planetscale-best-practices-matrix

작성자: planetscale

엔진별로 어떤 PlanetScale 안전, 관찰 가능성 및 자동화 권장 사항이 적용되는지 결정하기 위한 간결한 기능 매트릭스입니다.

npx skills add https://github.com/planetscale/skills --skill planetscale-best-practices-matrix

Best-practices matrix

Purpose

Map database findings to recommended PlanetScale features. Use this to ensure the assessment does not miss major safety and operational surfaces.

Cross-engine recommendations

Query Insights

Recommend for every production database:

  • Review slow, expensive, high-frequency, and erroring query patterns.
  • For Postgres, sort Insights by CPU (sort=cpuTime on the Insights API) when diagnosing CPU pressure.
  • For sharded Vitess, review vindex usage per query pattern and the usage trend after index or routing changes.
  • Correlate regressions with deploys.
  • Use tags/comments to map queries back to code.
  • Use tag filtering/navigation in Query Insights: the tags API (insights/tags, insights/tags/summaries) on both engines, plus tag:key:value filtering and per-execution tag drill-down in the Vitess dashboard.
  • Use anomalies as alert and automation inputs.

Webhooks

Recommend for operational events:

  • Anomalies.
  • Storage pressure.
  • Branch readiness/sleeping.
  • Primary promotion.
  • Maintenance.
  • Schema recommendations where available.
  • Deploy request lifecycle for Vitess.

MCP and agents

Recommend:

  • Use insights-only MCP for most autonomous analysis.
  • Use full MCP only with narrow scopes and read-only default.
  • Put database targeting and safety rules in AGENTS.md.
  • Agents generate PRs/issues/change plans; humans approve database changes.

SQLCommenter / query tags

Recommend:

  • Add framework-native SQLCommenter-compatible instrumentation.
  • Use low-cardinality tags.
  • Include application, service, route/job, feature, source, and release SHA.
  • Avoid PII and unbounded IDs.

Schema recommendation workflow

Recommend:

  • Triage open recommendations.
  • Correlate with code and Insights.
  • Convert into migrations or branch changes.
  • Test before production.
  • Apply only through approved workflow.

Vitess-specific recommendations

Safe migrations

Recommend for production branches and staging branches that accept deploy requests.

Deploy requests

Recommend for schema changes into protected branches.

Force cutover discipline

Recommend documenting who may use "force cutover now" for deploy requests delayed by long-running transactions. It stops running transactions to finish schema cutover, so frequent use should trigger workload review before enabling aggressive cutover as the database default.

Admin approval

Recommend for production deploy requests in multi-admin organizations.

In a single-admin organization, approval alone is not a guard against agents: that admin can open and approve the same deploy request. Prefer a separate agent identity, or a service token that cannot approve deploy requests.

Gated deployments

Recommend when cutover timing and human control matter.

Schema revert runbook

Recommend documenting revert responsibilities and the application rollback relationship.

Branch strategy

Recommend production, staging, and short-lived development branches with safe migrations on protected targets.

Sharding/keyspace review

Recommend when query patterns or growth suggest shard-awareness problems. Do not reshard automatically.

Postgres-specific recommendations

User-defined roles

Recommend for application servers instead of default role. If roles are managed by Terraform and passwords should stay outside Terraform state, prefer planetscale_postgres_redacted_branch_role plus a separate password reset and secret-manager storage path.

pg_strict

Recommend for application roles after evaluation, especially to block accidental full-table update/delete mistakes.

Traffic Control

Recommend for resource isolation of agents, exports, reports, workers, integrations, BI, and known expensive fingerprints.

Backups and PITR

Recommend verifying retention and restore drill coverage. If Terraform is the customer's source of truth, recommend managing backup policies there so backup posture changes are reviewed as infrastructure code.

PgBouncer and connection pooling

Recommend where connection churn or serverless/edge behavior creates pressure, subject to transaction-pooling limitations.

Private connectivity and IP restrictions

Recommend for customers requiring private network posture or reduced public exposure. Treat changes as production-risking.

Extensions

Recommend only when use case is clear and restart/activation impact is accepted. Include auto_explain when automatic plan logging for slow queries would materially improve diagnosis and the resulting log volume is acceptable. If Terraform manages Postgres branch parameters or supported extensions, keep that source of truth aligned with approved dashboard/API changes.

Live connections

Recommend inspecting pscale branch connections top during active connection pressure incidents to identify sessions, blockers, and idle-in-transaction roots without relying on normal database connection capacity.

Output

For each matrix item, mark:

  • Applies: yes/no/unknown.
  • Current state.
  • Gap.
  • Value: the specific measured finding this feature addresses (query fingerprint, anomaly count, incident, metric). State the mechanism and the measurement. Gaps are capability gaps with quantified impact, not risks safely avoided.
  • Recommendation ID.
  • Approval requirement.

End with:

“No changes have been applied.”

planetscale의 다른 스킬

neki
planetscale
PlanetScale의 샤딩된 Postgres 제품인 Neki에 대한 개요 및 정보. Neki 관련 작업 및 확장 또는 샤딩이 필요할 때 로드합니다...
vitess
planetscale
Vitess 모범 사례, 쿼리 최적화, PlanetScale Vitess 데이터베이스 연결 문제 해결. Vitess 데이터베이스, 샤딩 작업 시 로드…
planetscale-autonomous-execution-mode
planetscale
승인된 PlanetScale 변경 사항을 운영자가 명시적으로 위험을 인지한 경우 단계별 승인 없이 처음부터 끝까지 실행합니다. 다음을 정의합니다…
planetscale-change-gates-and-approval-contract
planetscale
PlanetScale, 데이터베이스, 리포지토리, 자격 증명, 네트워크 또는 자동화 변형에 대해 명시적 승인 게이트를 적용합니다.
planetscale-codebase-sqlcommenter-instrumentation
planetscale
PlanetScale에 연결된 애플리케이션 저장소를 검사하고 SQLCommenter 호환 쿼리 태깅 패키지와 규칙을 추천합니다.
planetscale-customer-report-template
planetscale
인벤토리 및 관련 검토 스킬을 실행한 후 최종 PlanetScale 모범 사례 보고서를 생성합니다.
planetscale-mcp-agent-operating-model
planetscale
PlanetScale MCP, Insights, 스키마 권장 사항 및 리포지토리 작업에서 자율적인 프로덕션 변경 없이 안전한 에이전트 동작을 구성합니다.
planetscale-postgres-safety-review
planetscale
PlanetScale Postgres의 트래픽 제어, 쿼리 태그, 역할, pg_strict, 백업/PITR, 프라이빗 연결, 웹훅, 브랜치 및 안전한 에이전트 운영을 검토합니다.