planetscale/planetscale-traffic-control-recommendations
Build a safe recommendation plan for PlanetScale Postgres Database Traffic Control budgets and rules without applying them.
npx skills add https://github.com/planetscale/skills --skill planetscale-traffic-control-recommendations
For PlanetScale Postgres, recommend Traffic Control budgets and rules that protect critical traffic from runaway queries, traffic spikes, batch jobs, agents, and third-party integrations. Do not create or change budgets without approval.
Run this skill only for PlanetScale Postgres.
Before recommending rules, inspect:
If query tags are missing, recommend tagging first unless a fingerprint-specific rule is clearly needed for an immediate known offender.
Look for:
Recommend in this order:
warn mode first for normal rollout.enforce only with explicit approval and an emergency rollback path.Do not recommend starting directly in enforce unless there is an active incident and the operator explicitly asks for emergency mitigation.
Prefer tag-based rules when tags are stable and bounded:
source=agentsource=bifeature=exportfeature=reportroute=/admin/reportsjob=DailyBackfillservice=analytics-workerUse fingerprint rules when:
Use a separate budget for each materially different traffic class.
Do not combine unrelated traffic in one budget because it hides who is consuming the budget.
Use these as recommendation patterns, not as values to apply blindly.
Target: queries tagged source=agent or source=mcp.
Intent: prevent agents from starving application traffic.
Mode: start in warn.
Recommendation: agents should prefer replicas and read-only scopes. Writes require human approval.
Target: feature=export, feature=report, or specific report route/job.
Intent: keep customer-triggered reporting from consuming all database resources.
Mode: start in warn; consider enforce after observation.
Target: worker service, queue, or job tags.
Intent: prevent backfills and retries from starving interactive traffic.
Mode: warn first; enforce only after confirming queue backpressure behavior.
Target: source=integration, partner-specific bounded tags, or route templates for inbound integration calls.
Intent: isolate unpredictable partner behavior.
Mode: warn first.
Target: specific expensive query fingerprint.
Intent: contain a known pathological query while code or schema fixes are developed.
Mode: warn first unless emergency.
When PlanetScale supports applying a budget separately for each unique value of a selected tag, recommend it for bounded tags such as:
applicationserviceroute when normalizedjobfeaturesourceDo not recommend it for unbounded tags such as user IDs, request IDs, raw tenant IDs, emails, UUIDs, or raw URLs.
Every recommendation must explain:
For each proposed budget:
End with:
“No Traffic Control budgets or rules have been created, updated, deleted, or enforced.”
Take planetscale/planetscale-traffic-control-recommendations from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.