planetscale-webhook-automation-recommendations: Claude Code skill
Recommends PlanetScale webhook subscriptions and safe automation patterns for database alerts, anomalies, and deploy requests.
npx skills add planetscale/skills --skill planetscale-webhook-automation-recommendations -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/planetscale-webhook-automation-recommendations/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/planetscale-webhook-automation-recommendations/
1Skills CLI (Vercel)
npx skills add planetscale/skills --skill planetscale-webhook-automation-recommendations -a codex2Manually: put the files in place
.agents/skills/planetscale-webhook-automation-recommendations/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add planetscale/skills --skill planetscale-webhook-automation-recommendations -a cursor2Manually: put the files in place
.cursor/skills/planetscale-webhook-automation-recommendations/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install planetscale/skills planetscale-webhook-automation-recommendations2Manually: put the files in place
.github/skills/planetscale-webhook-automation-recommendations/SKILL.md1Skills CLI (Vercel)
npx skills add planetscale/skills --skill planetscale-webhook-automation-recommendations -a gemini-cli2Platform CLI
gemini skills install https://github.com/planetscale/skills --path planetscale-webhook-automation-recommendationsManually: put the files in place
.devin/skills/planetscale-webhook-automation-recommendations/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add planetscale/skills --skill planetscale-webhook-automation-recommendations -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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