Skip to main content
skill CX Codex

planetscale-webhook-automation-recommendations: Claude Code skill

Recommends PlanetScale webhook subscriptions and safe automation patterns for database alerts, anomalies, and deploy requests.

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

What planetscale-webhook-automation-recommendations does

The skill evaluates PlanetScale webhook events across Postgres and Vitess databases. It maps each trigger into one of three routes: incident paging for humans, notifications for engineering channels, or an intake queue for automated agents. Monitored events include memory limits, insights anomalies, storage growth, and deploy request states.

Agent workflows stay strictly gated. The automation can inspect anomalies, prepare a pull request, or open a Vitess deploy request against a protected branch. Direct production mutations, traffic control enforcement, and automated merges remain forbidden without human approval. This safety gate prevents unchecked schema changes in live databases.

Receiver endpoints must meet specific hardening standards: HTTPS transport, secret-based signature checks, fast 2xx returns, and idempotency. The skill operates strictly in advisory mode, leaving actual webhook resources untouched.

What it helps with

  • route PlanetScale events between on-call alerts and agent queues
  • create automated PR workflows from database anomaly alerts
  • block unsafe automations that bypass pull request reviews
  • audit webhook receiver endpoints for signature verification and idempotency

Example prompts for the agent

  • Review our PlanetScale webhooks and recommend safe automation patterns for schema recommendations.
  • How should we route deploy_request.errored and branch.anomaly events?
  • Check what requirements our webhook receiver must meet before subscribing to PlanetScale alerts.

How to install planetscale-webhook-automation-recommendations

1Skills CLI (Vercel)

npx skills add planetscale/skills --skill planetscale-webhook-automation-recommendations -a claude-code

2Manually: put the files in place

~/.claude/skills/planetscale-webhook-automation-recommendations/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/planetscale-webhook-automation-recommendations/

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

Questions about planetscale-webhook-automation-recommendations

How do I install planetscale-webhook-automation-recommendations in Claude Code?

Run npx skills add planetscale/skills --skill planetscale-webhook-automation-recommendations -a claude-code. The skill will be saved to ~/.claude/skills/planetscale-webhook-automation-recommendations/SKILL.md.

What does this skill do?

It audits PlanetScale database events and recommends webhook subscriptions alongside safe automation pipelines. It categorizes alerts into human, team, and agent queues while enforcing review gates.

Can the agent apply schema changes directly to production?

No, direct production DDL execution is flagged as an anti-pattern. The agent may only open development branches, submit PRs, or initiate deploy requests that require explicit human approval.

Source text

SKILL.md · MIT
---
name: planetscale-webhook-automation-recommendations
description: Recommend webhook subscriptions and safe automation patterns for PlanetScale alerts, anomalies, schema recommendations, deploy requests, and agent workflows.
---

# Webhook automation recommendations

## Purpose

Review and recommend PlanetScale webhooks that notify humans and trigger safe automation. Do not create or update webhooks without approval.

## Webhook design principle

Webhooks may trigger automation, but automation must produce recommendations, issues, branches, or pull requests by default. It must not directly mutate production databases or production application behavior without explicit human approval.

## Events to evaluate

### General and Postgres

- `branch.anomaly`: new Insights anomaly.
- `branch.out_of_memory`: Postgres out-of-memory event.
- `branch.primary_promoted`: primary failover/promotion.
- `branch.ready`: branch created and ready.
- `branch.sleeping`: branch sleeping.
- `branch.start_maintenance`: maintenance starting.
- `cluster.storage`: storage threshold or growth event.
- `database.access_request`: access request.
- `branch.schema_recommendation`: schema recommendation event when available.
- `webhook.test`: test event.

### Vitess deploy lifecycle

- `deploy_request.opened`
- `deploy_request.queued`
- `deploy_request.in_progress`
- `deploy_request.pending_cutover`
- `deploy_request.schema_applied`
- `deploy_request.errored`
- `deploy_request.reverted`
- `deploy_request.closed`
- `keyspace.storage`

## Recommended routing

### Human alerting

Send these to incident or operations channels:

- `branch.anomaly`
- `branch.out_of_memory`
- `branch.primary_promoted`
- `branch.start_maintenance`
- `cluster.storage`
- `keyspace.storage`
- `deploy_request.errored`
- `deploy_request.reverted`

### Engineering notification

Send these to Slack, Linear/Jira, or deployment channels:

- `deploy_request.opened`
- `deploy_request.queued`
- `deploy_request.in_progress`
- `deploy_request.pending_cutover`
- `deploy_request.schema_applied`
- `deploy_request.closed`
- `branch.schema_recommendation`

### Agent intake queue

Send these to an agent-safe workflow:

- `branch.anomaly`
- `branch.schema_recommendation`
- `deploy_request.errored`
- `cluster.storage`
- `keyspace.storage`

Agent output may include, without approval:

- Triage summary, probable cause, linked Insights/query patterns.
- Recommended schema, code, Traffic Control, or operational change.
- Pull request against application code.
- Development branch with DDL or migration applied.
- Open deploy request into a review-protected branch.
- Issue or ticket.

Agent output must not cross the review gate on its own: no production
deploys, PR merges, Traffic Control enforcement, credential rotation, or
network changes — those require human action or a standing authorization
per `../planetscale-autonomous-execution-mode/SKILL.md`.

## Webhook receiver requirements

Recommend only receivers that meet these requirements:

- HTTPS endpoint.
- Fast 2xx response; expensive work is queued asynchronously.
- No dependency on following redirects.
- Signature verification using PlanetScale webhook signature header and the webhook secret.
- Idempotency by event ID or timestamp/resource tuple.
- Dead-letter queue or retry-safe logging.
- Human-readable audit trail.
- Clear owner and escalation path.
- Secret rotation procedure.

## Recommended automation flows

### Anomaly to PR flow

1. Receive `branch.anomaly`.
2. Verify signature.
3. Queue job.
4. Fetch anomaly details and relevant Insights query patterns.
5. Locate code path by SQLCommenter tags and repository search.
6. Classify as schema, code, Traffic Control, or unknown.
7. Generate report and optional PR.
8. Ask human to approve database-affecting work.

### Schema recommendation to branch/deploy flow

For Vitess:

1. Receive `branch.schema_recommendation`.
2. Fetch recommendation details.
3. Apply the DDL to a development branch.
4. Open a pull request with fingerprint, metrics, and expected effect.
5. Open the deploy request — the DR and PR together are the reviewable
   unit; opening them requires no approval.
6. Deploy on human approval, or autonomously under a standing
   authorization that allowlists this deploy class
   (`../planetscale-autonomous-execution-mode/SKILL.md`).

For Postgres:

1. Receive `branch.schema_recommendation`.
2. Fetch recommendation details.
3. Convert DDL to application migration.
4. Test on a non-production branch and record the result in the PR.
5. Open PR.
6. Apply to production on merge via the deployment pipeline, or on
   explicit approval where no pipeline exists.

### Deploy request lifecycle flow for Vitess

- Notify when opened.
- Validate owner and linked application PR.
- Alert when queued or in progress.
- Alert strongly when errored or reverted.
- Notify pending cutover and require owner acknowledgement for gated deployments.
- Record schema applied and correlate with application deploy.

## Anti-patterns to block

Do not recommend:

- Webhook directly runs production DDL, bypassing the PR/deploy-request
  workflow. (Driving the DDL through a branch, PR, and deploy request is
  the supported pattern, not an anti-pattern.)
- Webhook applies schema recommendations straight to production with no
  reviewable artifact.
- Webhook directly enforces Traffic Control.
- Webhook directly changes IP restrictions.
- Webhook directly rotates credentials.
- Webhook posts secrets or raw SQL with literals into public Slack channels.
- Webhook receiver ignores signature verification.
- Webhook receiver does long-running work before returning 2xx.

## Output

Return:

- Existing webhook inventory.
- Missing recommended subscriptions.
- Destination quality review.
- Signature verification status.
- Automation opportunities.
- Unsafe automation risks.
- Proposed webhook changes requiring approval.

End with:

“No webhooks or automation endpoints have been created, updated, or deleted.”

© planetscale · MIT · planetscale/skills

Similar skills

All skills for Data and databases →

From the same set14

planetscale-query-insights-and-tags A skill that reads PlanetScale Insights to find expensive and risky queries, then recommends SQLCommenter tags so you can trace load back to a route or job. CX Codex +1 1,800installs planetscale-postgres-safety-review Reviews PlanetScale Postgres setups across roles, pg_strict, Traffic Control, and backups. It flags database reliability gaps without applying unapproved changes. CX Codex +1 1,800installs 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-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

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