[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-planetscale-planetscale-mcp-agent-operating-model":3,"mdc-3l6enz-key":31,"related-org-planetscale-planetscale-mcp-agent-operating-model":913,"related-repo-planetscale-planetscale-mcp-agent-operating-model":1085},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":20,"repoUrl":21,"updatedAt":22,"license":23,"forks":24,"topics":25,"repo":26,"sourceUrl":29,"mdContent":30},"planetscale-mcp-agent-operating-model","configure safe PlanetScale MCP agent behavior","Configure safe agent behavior around PlanetScale MCP, Insights, schema recommendations, and repository work without autonomous production mutation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"planetscale","PlanetScale","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fplanetscale.png",[12,16,19],{"name":13,"slug":14,"type":15},"Operations","operations","tag",{"name":17,"slug":18,"type":15},"MCP","mcp",{"name":9,"slug":8,"type":15},50,"https:\u002F\u002Fgithub.com\u002Fplanetscale\u002Fskills","2026-07-07T06:38:38.675213",null,1,[],{"repoUrl":21,"stars":20,"forks":24,"topics":27,"description":28},[],"Skills that help you configure and get the most out of PlanetScale","https:\u002F\u002Fgithub.com\u002Fplanetscale\u002Fskills\u002Ftree\u002FHEAD\u002F09-mcp-agent-operating-model","---\nname: planetscale-mcp-agent-operating-model\ndescription: Configure safe agent behavior around PlanetScale MCP, Insights, schema recommendations, and repository work without autonomous production mutation.\n---\n\n# MCP agent operating model\n\n## Purpose\n\nDefine how agents should use PlanetScale MCP safely. Agents should use production telemetry to generate useful work while avoiding autonomous production changes.\n\n## Default MCP choice\n\nUse the PlanetScale MCP insights-only server when the task only needs Insights and Schema Recommendations.\n\nUse the full PlanetScale MCP server only when the task explicitly requires database\u002Fschema access beyond Insights. Prefer read-only scopes.\n\nThe full MCP server has query execution tools. Treat write query tools as disabled unless the operator explicitly approves a specific non-production action or a carefully reviewed production action.\n\n## AGENTS.md guidance\n\nTwo different documents both named `AGENTS.md` serve different purposes:\n\n1. **CLI agent guide** — shipped with `pscale` (`AGENTS.md` in the\n   [planetscale\u002Fcli](https:\u002F\u002Fgithub.com\u002Fplanetscale\u002Fcli) repo, or\n   `pscale agent-guide --format json`). Covers auth, `--format json`, flag\n   placement, and `pscale sql`. Load skill `14-pscale-cli-automation` for the\n   same conventions inside this skills pack.\n\n2. **Project agent guide** — your application repository's `AGENTS.md` (or\n   equivalent). Covers database targeting and approval policy for *this* app.\n\nWhen working inside a repository, recommend adding a **project** database\ntargeting section to `AGENTS.md` or equivalent project instructions:\n\n- PlanetScale organization.\n- Database.\n- Branch.\n- Engine: Vitess or Postgres.\n- Production branch name.\n- Whether agents may use MCP insights-only or full MCP.\n- Whether write queries are forbidden.\n- Required approval protocol for schema, Traffic Control, webhooks, roles, and network changes.\n\nDo not edit `AGENTS.md` without approval.\n\n## Safe autonomous tasks\n\nAllowed by default:\n\n- Read Insights.\n- Read schema recommendations.\n- Read schema metadata.\n- Read existing webhooks and Traffic Control configuration.\n- Read branch metadata.\n- Inspect repository code.\n- Correlate query patterns with code.\n- File issues.\n- Open pull requests.\n- Create development branches.\n- Apply DDL and migrations to non-production development branches.\n- Open deploy requests into branches protected by a review workflow.\n- Draft Traffic Control budget proposals.\n- Draft webhook receiver requirements.\n\nWhere a PR + deploy-request workflow exists, the default deliverable for a\nschema recommendation is the complete reviewable unit: development branch\nwith the DDL applied, PR with evidence (fingerprint, metrics, expected\neffect), and an open deploy request. The human action is the merge\u002Fdeploy\ndecision, not shepherding the proposal into existence.\n\nNot allowed by default (the review-gate actions and non-reviewable mutations):\n\n- Execute write SQL against production.\n- Execute DDL directly against production branches.\n- Deploy a deploy request \u002F apply schema to production.\n- Merge pull requests.\n- Create webhooks.\n- Create or enforce Traffic Control budgets.\n- Rotate credentials.\n- Change roles.\n- Change IP restrictions or private connectivity.\n- Restore or promote branches.\n\n## Agent loops\n\n### Daily recommendation loop\n\n1. Read open schema recommendations.\n2. Read top Insights regressions.\n3. Correlate with repository code.\n4. Generate ranked issues or PRs.\n5. Human reviews.\n6. Human approves any database-affecting action.\n\n### Anomaly loop\n\n1. Receive or inspect anomaly.\n2. Gather affected query patterns and tags.\n3. Identify source route\u002Fjob\u002Fdeploy.\n4. Produce incident note and proposed remediation.\n5. If code fix is obvious, open PR.\n6. If database change is needed, create a proposed change set only.\n\n### Traffic Control loop\n\n1. Identify unsafe traffic slice from Insights\u002Ftags.\n2. Draft `warn` budget proposal.\n3. Human approves creation.\n4. Observe warnings.\n5. Human approves enforce mode only after validation.\n\n## Scheduled loops (cron \u002F Automations)\n\nThe loops above run interactively. They can also run on a schedule with no\nhuman in the loop, in two tiers. Tier 2 requires a standing authorization\nper `..\u002F13-autonomous-execution-mode\u002FSKILL.md`; Tier 1 requires none.\n\nEvery scheduled loop, both tiers: re-read authorization at run start,\nstream status to a configured delivery channel, persist a run log, and\navoid filing duplicates (do not re-file an issue that is already open\nfor the same fingerprint\u002Frecommendation ID).\n\n### Tier 1 — propose through the review workflow (no authorization needed)\n\n- **Recommendation-to-PR loop** (daily): list open schema recommendations\n  via MCP; for each new one matching the workflow (additive or destructive\n  — the PR review is the gate), create a development branch, apply the\n  DDL, open a PR with fingerprint, metrics, and expected effect, and open\n  the deploy request. The reviewable unit is complete when a human can\n  ship it with one merge\u002Fdeploy action. Output: branch + PR + deploy\n  request per recommendation.\n- **Regression watch** (hourly or per-deploy): compare top patterns\n  against a stored baseline (p50\u002Fp99, rows read, execution count); on\n  material regression, identify the deploy SHA from query tags and file\n  a report linking pattern to commit range. Output: report.\n- **Tag coverage audit** (weekly): measure percentage of query time\n  carrying tags; list untagged high-cost patterns with likely code\n  paths; open or update a single tracking issue. Output: issue.\n- **Anomaly triage** (webhook-triggered, not polled): on `branch.anomaly`,\n  gather affected patterns, classify probable cause, post triage note to\n  the incident channel. Output: triage note.\n- **Posture drift check** (daily): diff current safe-migrations flags,\n  webhook config, role list, and backup schedule against the last\n  assessment report; report any drift. Output: report.\n\n### Tier 2 — execute the review-gate action (standing authorization required)\n\n- **Recommendation deployer** (daily, after the PR loop): deploy open\n  deploy requests that match the allowlist — typically \"additive DDL,\n  PR approved or authored from an open recommendation, deploy with revert\n  window, max N per run\" — then verify via schema read-back and an\n  Insights follow-up on the target fingerprint. Destructive DDL deploys\n  autonomously only when the authorization states a runtime-verifiable\n  bound (e.g. \"drop only indexes with zero reads in 30 days, confirmed\n  via Insights at run time\"). Where the org requires PR approval before\n  deploy, an approved PR satisfies the review gate and the authorization\n  covers only the mechanical deploy.\n- **Branch hygiene** (weekly): delete development branches older than the\n  authorized age bound with no open deploy request; never touch\n  production or protected branches. \n- **Warn-budget gardener** (weekly): create warn-mode Traffic Control\n  budgets for newly identified expensive slices matching the allowlist;\n  report warn counts on existing budgets. Enforce mode is never entered\n  autonomously unless the authorization names the specific budget.\n- **Credential expiry enforcement** (daily): delete or flag passwords\n  past the authorized max age, only where the authorization lists the\n  affected roles and a rotation runbook exists.\n\n### Loop anti-patterns\n\n- Polling MCP on a cron for events webhooks already deliver — use the\n  webhook as the trigger; use cron for baselines, sweeps, and audits.\n- A Tier 2 loop whose allowlist is an intent (\"keep things healthy\")\n  rather than bounded operations.\n- Loops that mutate without a delivery channel for status.\n- Unbounded fan-out: one run applying every open recommendation at once\n  with no per-run cap.\n\n## Query execution safeguards\n\nFor read queries:\n\n- Prefer replicas when available.\n- `planetscale_execute_read_query` routes reads to replicas by default when a\n  branch has replicas configured (`use_replica: true`). Set\n  `use_replica: false` only when the task needs primary-read semantics, such\n  as checking immediately-after-write state or primary-only behavior.\n- Add source tags\u002Fcomments for agent work.\n- Avoid unbounded scans.\n- Avoid `EXPLAIN ANALYZE` on production unless explicitly approved.\n- Limit result sizes.\n- Avoid querying sensitive columns unless required and approved.\n- For Postgres tables with row-level security, remember that the MCP read role\n  uses `pg_read_all_data` and does not bypass RLS. If a read query returns zero\n  rows or a zero count and the MCP response warns that RLS may be filtering\n  results, treat the result as policy-filtered\u002Funknown until confirmed through\n  an approved path; do not conclude the table is empty.\n- When debugging high CPU on Postgres, use Insights data sorted by CPU\n  usage (via MCP where available, or `sort=cpuTime` on the Insights API).\n  CPU time metrics are Postgres-only; do not ask for the same CPU-sorted\n  view on Vitess.\n\nFor write queries:\n\n- Default is forbidden.\n- If approved, prefer non-production branch.\n- Require exact SQL review.\n- Require rollback plan.\n- Require branch and database name confirmation.\n\n## Output\n\nReturn:\n\n- Recommended MCP server choice.\n- Required scopes.\n- AGENTS.md instructions to add.\n- Allowed autonomous work.\n- Disallowed work.\n- Proposed agent loops.\n- Approval gates.\n\nEnd with:\n\n“No MCP write tools or database mutations have been used.”\n",{"data":32,"body":33},{"name":4,"description":6},{"type":34,"children":35},"root",[36,45,52,58,64,69,74,79,85,99,198,217,261,273,279,284,357,362,367,420,426,433,466,472,505,511,547,553,566,571,577,638,644,687,693,716,722,727,821,826,854,860,865,903,908],{"type":37,"tag":38,"props":39,"children":41},"element","h1",{"id":40},"mcp-agent-operating-model",[42],{"type":43,"value":44},"text","MCP agent operating model",{"type":37,"tag":46,"props":47,"children":49},"h2",{"id":48},"purpose",[50],{"type":43,"value":51},"Purpose",{"type":37,"tag":53,"props":54,"children":55},"p",{},[56],{"type":43,"value":57},"Define how agents should use PlanetScale MCP safely. Agents should use production telemetry to generate useful work while avoiding autonomous production changes.",{"type":37,"tag":46,"props":59,"children":61},{"id":60},"default-mcp-choice",[62],{"type":43,"value":63},"Default MCP choice",{"type":37,"tag":53,"props":65,"children":66},{},[67],{"type":43,"value":68},"Use the PlanetScale MCP insights-only server when the task only needs Insights and Schema Recommendations.",{"type":37,"tag":53,"props":70,"children":71},{},[72],{"type":43,"value":73},"Use the full PlanetScale MCP server only when the task explicitly requires database\u002Fschema access beyond Insights. Prefer read-only scopes.",{"type":37,"tag":53,"props":75,"children":76},{},[77],{"type":43,"value":78},"The full MCP server has query execution tools. Treat write query tools as disabled unless the operator explicitly approves a specific non-production action or a carefully reviewed production action.",{"type":37,"tag":46,"props":80,"children":82},{"id":81},"agentsmd-guidance",[83],{"type":43,"value":84},"AGENTS.md guidance",{"type":37,"tag":53,"props":86,"children":87},{},[88,90,97],{"type":43,"value":89},"Two different documents both named ",{"type":37,"tag":91,"props":92,"children":94},"code",{"className":93},[],[95],{"type":43,"value":96},"AGENTS.md",{"type":43,"value":98}," serve different purposes:",{"type":37,"tag":100,"props":101,"children":102},"ol",{},[103,173],{"type":37,"tag":104,"props":105,"children":106},"li",{},[107,113,115,121,123,128,130,139,141,147,149,155,157,163,165,171],{"type":37,"tag":108,"props":109,"children":110},"strong",{},[111],{"type":43,"value":112},"CLI agent guide",{"type":43,"value":114}," — shipped with ",{"type":37,"tag":91,"props":116,"children":118},{"className":117},[],[119],{"type":43,"value":120},"pscale",{"type":43,"value":122}," (",{"type":37,"tag":91,"props":124,"children":126},{"className":125},[],[127],{"type":43,"value":96},{"type":43,"value":129}," in the\n",{"type":37,"tag":131,"props":132,"children":136},"a",{"href":133,"rel":134},"https:\u002F\u002Fgithub.com\u002Fplanetscale\u002Fcli",[135],"nofollow",[137],{"type":43,"value":138},"planetscale\u002Fcli",{"type":43,"value":140}," repo, or\n",{"type":37,"tag":91,"props":142,"children":144},{"className":143},[],[145],{"type":43,"value":146},"pscale agent-guide --format json",{"type":43,"value":148},"). Covers auth, ",{"type":37,"tag":91,"props":150,"children":152},{"className":151},[],[153],{"type":43,"value":154},"--format json",{"type":43,"value":156},", flag\nplacement, and ",{"type":37,"tag":91,"props":158,"children":160},{"className":159},[],[161],{"type":43,"value":162},"pscale sql",{"type":43,"value":164},". Load skill ",{"type":37,"tag":91,"props":166,"children":168},{"className":167},[],[169],{"type":43,"value":170},"14-pscale-cli-automation",{"type":43,"value":172}," for the\nsame conventions inside this skills pack.",{"type":37,"tag":104,"props":174,"children":175},{},[176,181,183,188,190,196],{"type":37,"tag":108,"props":177,"children":178},{},[179],{"type":43,"value":180},"Project agent guide",{"type":43,"value":182}," — your application repository's ",{"type":37,"tag":91,"props":184,"children":186},{"className":185},[],[187],{"type":43,"value":96},{"type":43,"value":189}," (or\nequivalent). Covers database targeting and approval policy for ",{"type":37,"tag":191,"props":192,"children":193},"em",{},[194],{"type":43,"value":195},"this",{"type":43,"value":197}," app.",{"type":37,"tag":53,"props":199,"children":200},{},[201,203,208,210,215],{"type":43,"value":202},"When working inside a repository, recommend adding a ",{"type":37,"tag":108,"props":204,"children":205},{},[206],{"type":43,"value":207},"project",{"type":43,"value":209}," database\ntargeting section to ",{"type":37,"tag":91,"props":211,"children":213},{"className":212},[],[214],{"type":43,"value":96},{"type":43,"value":216}," or equivalent project instructions:",{"type":37,"tag":218,"props":219,"children":220},"ul",{},[221,226,231,236,241,246,251,256],{"type":37,"tag":104,"props":222,"children":223},{},[224],{"type":43,"value":225},"PlanetScale organization.",{"type":37,"tag":104,"props":227,"children":228},{},[229],{"type":43,"value":230},"Database.",{"type":37,"tag":104,"props":232,"children":233},{},[234],{"type":43,"value":235},"Branch.",{"type":37,"tag":104,"props":237,"children":238},{},[239],{"type":43,"value":240},"Engine: Vitess or Postgres.",{"type":37,"tag":104,"props":242,"children":243},{},[244],{"type":43,"value":245},"Production branch name.",{"type":37,"tag":104,"props":247,"children":248},{},[249],{"type":43,"value":250},"Whether agents may use MCP insights-only or full MCP.",{"type":37,"tag":104,"props":252,"children":253},{},[254],{"type":43,"value":255},"Whether write queries are forbidden.",{"type":37,"tag":104,"props":257,"children":258},{},[259],{"type":43,"value":260},"Required approval protocol for schema, Traffic Control, webhooks, roles, and network changes.",{"type":37,"tag":53,"props":262,"children":263},{},[264,266,271],{"type":43,"value":265},"Do not edit ",{"type":37,"tag":91,"props":267,"children":269},{"className":268},[],[270],{"type":43,"value":96},{"type":43,"value":272}," without approval.",{"type":37,"tag":46,"props":274,"children":276},{"id":275},"safe-autonomous-tasks",[277],{"type":43,"value":278},"Safe autonomous tasks",{"type":37,"tag":53,"props":280,"children":281},{},[282],{"type":43,"value":283},"Allowed by default:",{"type":37,"tag":218,"props":285,"children":286},{},[287,292,297,302,307,312,317,322,327,332,337,342,347,352],{"type":37,"tag":104,"props":288,"children":289},{},[290],{"type":43,"value":291},"Read Insights.",{"type":37,"tag":104,"props":293,"children":294},{},[295],{"type":43,"value":296},"Read schema recommendations.",{"type":37,"tag":104,"props":298,"children":299},{},[300],{"type":43,"value":301},"Read schema metadata.",{"type":37,"tag":104,"props":303,"children":304},{},[305],{"type":43,"value":306},"Read existing webhooks and Traffic Control configuration.",{"type":37,"tag":104,"props":308,"children":309},{},[310],{"type":43,"value":311},"Read branch metadata.",{"type":37,"tag":104,"props":313,"children":314},{},[315],{"type":43,"value":316},"Inspect repository code.",{"type":37,"tag":104,"props":318,"children":319},{},[320],{"type":43,"value":321},"Correlate query patterns with code.",{"type":37,"tag":104,"props":323,"children":324},{},[325],{"type":43,"value":326},"File issues.",{"type":37,"tag":104,"props":328,"children":329},{},[330],{"type":43,"value":331},"Open pull requests.",{"type":37,"tag":104,"props":333,"children":334},{},[335],{"type":43,"value":336},"Create development branches.",{"type":37,"tag":104,"props":338,"children":339},{},[340],{"type":43,"value":341},"Apply DDL and migrations to non-production development branches.",{"type":37,"tag":104,"props":343,"children":344},{},[345],{"type":43,"value":346},"Open deploy requests into branches protected by a review workflow.",{"type":37,"tag":104,"props":348,"children":349},{},[350],{"type":43,"value":351},"Draft Traffic Control budget proposals.",{"type":37,"tag":104,"props":353,"children":354},{},[355],{"type":43,"value":356},"Draft webhook receiver requirements.",{"type":37,"tag":53,"props":358,"children":359},{},[360],{"type":43,"value":361},"Where a PR + deploy-request workflow exists, the default deliverable for a\nschema recommendation is the complete reviewable unit: development branch\nwith the DDL applied, PR with evidence (fingerprint, metrics, expected\neffect), and an open deploy request. The human action is the merge\u002Fdeploy\ndecision, not shepherding the proposal into existence.",{"type":37,"tag":53,"props":363,"children":364},{},[365],{"type":43,"value":366},"Not allowed by default (the review-gate actions and non-reviewable mutations):",{"type":37,"tag":218,"props":368,"children":369},{},[370,375,380,385,390,395,400,405,410,415],{"type":37,"tag":104,"props":371,"children":372},{},[373],{"type":43,"value":374},"Execute write SQL against production.",{"type":37,"tag":104,"props":376,"children":377},{},[378],{"type":43,"value":379},"Execute DDL directly against production branches.",{"type":37,"tag":104,"props":381,"children":382},{},[383],{"type":43,"value":384},"Deploy a deploy request \u002F apply schema to production.",{"type":37,"tag":104,"props":386,"children":387},{},[388],{"type":43,"value":389},"Merge pull requests.",{"type":37,"tag":104,"props":391,"children":392},{},[393],{"type":43,"value":394},"Create webhooks.",{"type":37,"tag":104,"props":396,"children":397},{},[398],{"type":43,"value":399},"Create or enforce Traffic Control budgets.",{"type":37,"tag":104,"props":401,"children":402},{},[403],{"type":43,"value":404},"Rotate credentials.",{"type":37,"tag":104,"props":406,"children":407},{},[408],{"type":43,"value":409},"Change roles.",{"type":37,"tag":104,"props":411,"children":412},{},[413],{"type":43,"value":414},"Change IP restrictions or private connectivity.",{"type":37,"tag":104,"props":416,"children":417},{},[418],{"type":43,"value":419},"Restore or promote branches.",{"type":37,"tag":46,"props":421,"children":423},{"id":422},"agent-loops",[424],{"type":43,"value":425},"Agent loops",{"type":37,"tag":427,"props":428,"children":430},"h3",{"id":429},"daily-recommendation-loop",[431],{"type":43,"value":432},"Daily recommendation loop",{"type":37,"tag":100,"props":434,"children":435},{},[436,441,446,451,456,461],{"type":37,"tag":104,"props":437,"children":438},{},[439],{"type":43,"value":440},"Read open schema recommendations.",{"type":37,"tag":104,"props":442,"children":443},{},[444],{"type":43,"value":445},"Read top Insights regressions.",{"type":37,"tag":104,"props":447,"children":448},{},[449],{"type":43,"value":450},"Correlate with repository code.",{"type":37,"tag":104,"props":452,"children":453},{},[454],{"type":43,"value":455},"Generate ranked issues or PRs.",{"type":37,"tag":104,"props":457,"children":458},{},[459],{"type":43,"value":460},"Human reviews.",{"type":37,"tag":104,"props":462,"children":463},{},[464],{"type":43,"value":465},"Human approves any database-affecting action.",{"type":37,"tag":427,"props":467,"children":469},{"id":468},"anomaly-loop",[470],{"type":43,"value":471},"Anomaly loop",{"type":37,"tag":100,"props":473,"children":474},{},[475,480,485,490,495,500],{"type":37,"tag":104,"props":476,"children":477},{},[478],{"type":43,"value":479},"Receive or inspect anomaly.",{"type":37,"tag":104,"props":481,"children":482},{},[483],{"type":43,"value":484},"Gather affected query patterns and tags.",{"type":37,"tag":104,"props":486,"children":487},{},[488],{"type":43,"value":489},"Identify source route\u002Fjob\u002Fdeploy.",{"type":37,"tag":104,"props":491,"children":492},{},[493],{"type":43,"value":494},"Produce incident note and proposed remediation.",{"type":37,"tag":104,"props":496,"children":497},{},[498],{"type":43,"value":499},"If code fix is obvious, open PR.",{"type":37,"tag":104,"props":501,"children":502},{},[503],{"type":43,"value":504},"If database change is needed, create a proposed change set only.",{"type":37,"tag":427,"props":506,"children":508},{"id":507},"traffic-control-loop",[509],{"type":43,"value":510},"Traffic Control loop",{"type":37,"tag":100,"props":512,"children":513},{},[514,519,532,537,542],{"type":37,"tag":104,"props":515,"children":516},{},[517],{"type":43,"value":518},"Identify unsafe traffic slice from Insights\u002Ftags.",{"type":37,"tag":104,"props":520,"children":521},{},[522,524,530],{"type":43,"value":523},"Draft ",{"type":37,"tag":91,"props":525,"children":527},{"className":526},[],[528],{"type":43,"value":529},"warn",{"type":43,"value":531}," budget proposal.",{"type":37,"tag":104,"props":533,"children":534},{},[535],{"type":43,"value":536},"Human approves creation.",{"type":37,"tag":104,"props":538,"children":539},{},[540],{"type":43,"value":541},"Observe warnings.",{"type":37,"tag":104,"props":543,"children":544},{},[545],{"type":43,"value":546},"Human approves enforce mode only after validation.",{"type":37,"tag":46,"props":548,"children":550},{"id":549},"scheduled-loops-cron-automations",[551],{"type":43,"value":552},"Scheduled loops (cron \u002F Automations)",{"type":37,"tag":53,"props":554,"children":555},{},[556,558,564],{"type":43,"value":557},"The loops above run interactively. They can also run on a schedule with no\nhuman in the loop, in two tiers. Tier 2 requires a standing authorization\nper ",{"type":37,"tag":91,"props":559,"children":561},{"className":560},[],[562],{"type":43,"value":563},"..\u002F13-autonomous-execution-mode\u002FSKILL.md",{"type":43,"value":565},"; Tier 1 requires none.",{"type":37,"tag":53,"props":567,"children":568},{},[569],{"type":43,"value":570},"Every scheduled loop, both tiers: re-read authorization at run start,\nstream status to a configured delivery channel, persist a run log, and\navoid filing duplicates (do not re-file an issue that is already open\nfor the same fingerprint\u002Frecommendation ID).",{"type":37,"tag":427,"props":572,"children":574},{"id":573},"tier-1-propose-through-the-review-workflow-no-authorization-needed",[575],{"type":43,"value":576},"Tier 1 — propose through the review workflow (no authorization needed)",{"type":37,"tag":218,"props":578,"children":579},{},[580,590,600,610,628],{"type":37,"tag":104,"props":581,"children":582},{},[583,588],{"type":37,"tag":108,"props":584,"children":585},{},[586],{"type":43,"value":587},"Recommendation-to-PR loop",{"type":43,"value":589}," (daily): list open schema recommendations\nvia MCP; for each new one matching the workflow (additive or destructive\n— the PR review is the gate), create a development branch, apply the\nDDL, open a PR with fingerprint, metrics, and expected effect, and open\nthe deploy request. The reviewable unit is complete when a human can\nship it with one merge\u002Fdeploy action. Output: branch + PR + deploy\nrequest per recommendation.",{"type":37,"tag":104,"props":591,"children":592},{},[593,598],{"type":37,"tag":108,"props":594,"children":595},{},[596],{"type":43,"value":597},"Regression watch",{"type":43,"value":599}," (hourly or per-deploy): compare top patterns\nagainst a stored baseline (p50\u002Fp99, rows read, execution count); on\nmaterial regression, identify the deploy SHA from query tags and file\na report linking pattern to commit range. Output: report.",{"type":37,"tag":104,"props":601,"children":602},{},[603,608],{"type":37,"tag":108,"props":604,"children":605},{},[606],{"type":43,"value":607},"Tag coverage audit",{"type":43,"value":609}," (weekly): measure percentage of query time\ncarrying tags; list untagged high-cost patterns with likely code\npaths; open or update a single tracking issue. Output: issue.",{"type":37,"tag":104,"props":611,"children":612},{},[613,618,620,626],{"type":37,"tag":108,"props":614,"children":615},{},[616],{"type":43,"value":617},"Anomaly triage",{"type":43,"value":619}," (webhook-triggered, not polled): on ",{"type":37,"tag":91,"props":621,"children":623},{"className":622},[],[624],{"type":43,"value":625},"branch.anomaly",{"type":43,"value":627},",\ngather affected patterns, classify probable cause, post triage note to\nthe incident channel. Output: triage note.",{"type":37,"tag":104,"props":629,"children":630},{},[631,636],{"type":37,"tag":108,"props":632,"children":633},{},[634],{"type":43,"value":635},"Posture drift check",{"type":43,"value":637}," (daily): diff current safe-migrations flags,\nwebhook config, role list, and backup schedule against the last\nassessment report; report any drift. Output: report.",{"type":37,"tag":427,"props":639,"children":641},{"id":640},"tier-2-execute-the-review-gate-action-standing-authorization-required",[642],{"type":43,"value":643},"Tier 2 — execute the review-gate action (standing authorization required)",{"type":37,"tag":218,"props":645,"children":646},{},[647,657,667,677],{"type":37,"tag":104,"props":648,"children":649},{},[650,655],{"type":37,"tag":108,"props":651,"children":652},{},[653],{"type":43,"value":654},"Recommendation deployer",{"type":43,"value":656}," (daily, after the PR loop): deploy open\ndeploy requests that match the allowlist — typically \"additive DDL,\nPR approved or authored from an open recommendation, deploy with revert\nwindow, max N per run\" — then verify via schema read-back and an\nInsights follow-up on the target fingerprint. Destructive DDL deploys\nautonomously only when the authorization states a runtime-verifiable\nbound (e.g. \"drop only indexes with zero reads in 30 days, confirmed\nvia Insights at run time\"). Where the org requires PR approval before\ndeploy, an approved PR satisfies the review gate and the authorization\ncovers only the mechanical deploy.",{"type":37,"tag":104,"props":658,"children":659},{},[660,665],{"type":37,"tag":108,"props":661,"children":662},{},[663],{"type":43,"value":664},"Branch hygiene",{"type":43,"value":666}," (weekly): delete development branches older than the\nauthorized age bound with no open deploy request; never touch\nproduction or protected branches.",{"type":37,"tag":104,"props":668,"children":669},{},[670,675],{"type":37,"tag":108,"props":671,"children":672},{},[673],{"type":43,"value":674},"Warn-budget gardener",{"type":43,"value":676}," (weekly): create warn-mode Traffic Control\nbudgets for newly identified expensive slices matching the allowlist;\nreport warn counts on existing budgets. Enforce mode is never entered\nautonomously unless the authorization names the specific budget.",{"type":37,"tag":104,"props":678,"children":679},{},[680,685],{"type":37,"tag":108,"props":681,"children":682},{},[683],{"type":43,"value":684},"Credential expiry enforcement",{"type":43,"value":686}," (daily): delete or flag passwords\npast the authorized max age, only where the authorization lists the\naffected roles and a rotation runbook exists.",{"type":37,"tag":427,"props":688,"children":690},{"id":689},"loop-anti-patterns",[691],{"type":43,"value":692},"Loop anti-patterns",{"type":37,"tag":218,"props":694,"children":695},{},[696,701,706,711],{"type":37,"tag":104,"props":697,"children":698},{},[699],{"type":43,"value":700},"Polling MCP on a cron for events webhooks already deliver — use the\nwebhook as the trigger; use cron for baselines, sweeps, and audits.",{"type":37,"tag":104,"props":702,"children":703},{},[704],{"type":43,"value":705},"A Tier 2 loop whose allowlist is an intent (\"keep things healthy\")\nrather than bounded operations.",{"type":37,"tag":104,"props":707,"children":708},{},[709],{"type":43,"value":710},"Loops that mutate without a delivery channel for status.",{"type":37,"tag":104,"props":712,"children":713},{},[714],{"type":43,"value":715},"Unbounded fan-out: one run applying every open recommendation at once\nwith no per-run cap.",{"type":37,"tag":46,"props":717,"children":719},{"id":718},"query-execution-safeguards",[720],{"type":43,"value":721},"Query execution safeguards",{"type":37,"tag":53,"props":723,"children":724},{},[725],{"type":43,"value":726},"For read queries:",{"type":37,"tag":218,"props":728,"children":729},{},[730,735,762,767,772,785,790,795,808],{"type":37,"tag":104,"props":731,"children":732},{},[733],{"type":43,"value":734},"Prefer replicas when available.",{"type":37,"tag":104,"props":736,"children":737},{},[738,744,746,752,754,760],{"type":37,"tag":91,"props":739,"children":741},{"className":740},[],[742],{"type":43,"value":743},"planetscale_execute_read_query",{"type":43,"value":745}," routes reads to replicas by default when a\nbranch has replicas configured (",{"type":37,"tag":91,"props":747,"children":749},{"className":748},[],[750],{"type":43,"value":751},"use_replica: true",{"type":43,"value":753},"). Set\n",{"type":37,"tag":91,"props":755,"children":757},{"className":756},[],[758],{"type":43,"value":759},"use_replica: false",{"type":43,"value":761}," only when the task needs primary-read semantics, such\nas checking immediately-after-write state or primary-only behavior.",{"type":37,"tag":104,"props":763,"children":764},{},[765],{"type":43,"value":766},"Add source tags\u002Fcomments for agent work.",{"type":37,"tag":104,"props":768,"children":769},{},[770],{"type":43,"value":771},"Avoid unbounded scans.",{"type":37,"tag":104,"props":773,"children":774},{},[775,777,783],{"type":43,"value":776},"Avoid ",{"type":37,"tag":91,"props":778,"children":780},{"className":779},[],[781],{"type":43,"value":782},"EXPLAIN ANALYZE",{"type":43,"value":784}," on production unless explicitly approved.",{"type":37,"tag":104,"props":786,"children":787},{},[788],{"type":43,"value":789},"Limit result sizes.",{"type":37,"tag":104,"props":791,"children":792},{},[793],{"type":43,"value":794},"Avoid querying sensitive columns unless required and approved.",{"type":37,"tag":104,"props":796,"children":797},{},[798,800,806],{"type":43,"value":799},"For Postgres tables with row-level security, remember that the MCP read role\nuses ",{"type":37,"tag":91,"props":801,"children":803},{"className":802},[],[804],{"type":43,"value":805},"pg_read_all_data",{"type":43,"value":807}," and does not bypass RLS. If a read query returns zero\nrows or a zero count and the MCP response warns that RLS may be filtering\nresults, treat the result as policy-filtered\u002Funknown until confirmed through\nan approved path; do not conclude the table is empty.",{"type":37,"tag":104,"props":809,"children":810},{},[811,813,819],{"type":43,"value":812},"When debugging high CPU on Postgres, use Insights data sorted by CPU\nusage (via MCP where available, or ",{"type":37,"tag":91,"props":814,"children":816},{"className":815},[],[817],{"type":43,"value":818},"sort=cpuTime",{"type":43,"value":820}," on the Insights API).\nCPU time metrics are Postgres-only; do not ask for the same CPU-sorted\nview on Vitess.",{"type":37,"tag":53,"props":822,"children":823},{},[824],{"type":43,"value":825},"For write queries:",{"type":37,"tag":218,"props":827,"children":828},{},[829,834,839,844,849],{"type":37,"tag":104,"props":830,"children":831},{},[832],{"type":43,"value":833},"Default is forbidden.",{"type":37,"tag":104,"props":835,"children":836},{},[837],{"type":43,"value":838},"If approved, prefer non-production branch.",{"type":37,"tag":104,"props":840,"children":841},{},[842],{"type":43,"value":843},"Require exact SQL review.",{"type":37,"tag":104,"props":845,"children":846},{},[847],{"type":43,"value":848},"Require rollback plan.",{"type":37,"tag":104,"props":850,"children":851},{},[852],{"type":43,"value":853},"Require branch and database name confirmation.",{"type":37,"tag":46,"props":855,"children":857},{"id":856},"output",[858],{"type":43,"value":859},"Output",{"type":37,"tag":53,"props":861,"children":862},{},[863],{"type":43,"value":864},"Return:",{"type":37,"tag":218,"props":866,"children":867},{},[868,873,878,883,888,893,898],{"type":37,"tag":104,"props":869,"children":870},{},[871],{"type":43,"value":872},"Recommended MCP server choice.",{"type":37,"tag":104,"props":874,"children":875},{},[876],{"type":43,"value":877},"Required scopes.",{"type":37,"tag":104,"props":879,"children":880},{},[881],{"type":43,"value":882},"AGENTS.md instructions to add.",{"type":37,"tag":104,"props":884,"children":885},{},[886],{"type":43,"value":887},"Allowed autonomous work.",{"type":37,"tag":104,"props":889,"children":890},{},[891],{"type":43,"value":892},"Disallowed work.",{"type":37,"tag":104,"props":894,"children":895},{},[896],{"type":43,"value":897},"Proposed agent loops.",{"type":37,"tag":104,"props":899,"children":900},{},[901],{"type":43,"value":902},"Approval gates.",{"type":37,"tag":53,"props":904,"children":905},{},[906],{"type":43,"value":907},"End with:",{"type":37,"tag":53,"props":909,"children":910},{},[911],{"type":43,"value":912},"“No MCP write tools or database mutations have been used.”",{"items":914,"total":1084},[915,938,951,962,975,991,1002,1017,1033,1050,1056,1071],{"slug":916,"name":916,"fn":917,"description":918,"org":919,"tags":920,"stars":935,"repoUrl":936,"updatedAt":937},"mysql","plan and optimize MySQL database schemas","Plan and review MySQL\u002FInnoDB schema, indexing, query tuning, transactions, and operations. Use when creating or modifying MySQL tables, indexes, or queries; diagnosing slow\u002Flocking behavior; planning migrations; or troubleshooting replication and connection issues. Load when using a MySQL database.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[921,924,927,929,932],{"name":922,"slug":923,"type":15},"Data Modeling","data-modeling",{"name":925,"slug":926,"type":15},"Database","database",{"name":928,"slug":916,"type":15},"MySQL",{"name":930,"slug":931,"type":15},"Performance","performance",{"name":933,"slug":934,"type":15},"SQL","sql",557,"https:\u002F\u002Fgithub.com\u002Fplanetscale\u002Fdatabase-skills","2026-04-06T18:43:45.381961",{"slug":939,"name":939,"fn":940,"description":941,"org":942,"tags":943,"stars":935,"repoUrl":936,"updatedAt":950},"neki","manage sharded PostgreSQL with Neki","Overview and information about Neki, the sharded Postgres product by PlanetScale. Load when working with Neki-related tasks and the need to scale or shard postgres. Load when facing Postgres scaling or sharding issues.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[944,945,946,947],{"name":925,"slug":926,"type":15},{"name":930,"slug":931,"type":15},{"name":9,"slug":8,"type":15},{"name":948,"slug":949,"type":15},"PostgreSQL","postgresql","2026-07-24T05:38:09.09841",{"slug":952,"name":952,"fn":953,"description":954,"org":955,"tags":956,"stars":935,"repoUrl":936,"updatedAt":961},"postgres","optimize PostgreSQL database performance","PostgreSQL best practices, query optimization, connection troubleshooting, and performance improvement. Load when working with Postgres databases.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[957,958,959,960],{"name":925,"slug":926,"type":15},{"name":930,"slug":931,"type":15},{"name":948,"slug":949,"type":15},{"name":933,"slug":934,"type":15},"2026-04-06T18:43:44.126777",{"slug":963,"name":963,"fn":964,"description":965,"org":966,"tags":967,"stars":935,"repoUrl":936,"updatedAt":974},"vitess","optimize Vitess database performance and sharding","Vitess best practices, query optimization, and connection troubleshooting for PlanetScale Vitess databases. Load when working with Vitess databases, sharding, VSchema configuration, keyspace management, or MySQL scaling issues.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[968,969,970,971,972],{"name":925,"slug":926,"type":15},{"name":930,"slug":931,"type":15},{"name":9,"slug":8,"type":15},{"name":933,"slug":934,"type":15},{"name":973,"slug":963,"type":15},"Vitess","2026-04-06T18:43:42.890969",{"slug":976,"name":976,"fn":977,"description":978,"org":979,"tags":980,"stars":20,"repoUrl":21,"updatedAt":990},"planetscale-autonomous-execution-mode","execute autonomous PlanetScale database changes","Execute approved PlanetScale changes end-to-end without per-step approval when the operator has explicitly acknowledged the risk. Defines the risk-acknowledgment contract, scoped autonomy levels, sensible execution ordering, continuous status reporting, halt conditions, and rollback discipline. Extremely safe, very enabling.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[981,984,985,986,987],{"name":982,"slug":983,"type":15},"Automation","automation",{"name":925,"slug":926,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"name":988,"slug":989,"type":15},"Risk Assessment","risk-assessment","2026-07-05T06:32:41.490537",{"slug":992,"name":992,"fn":993,"description":994,"org":995,"tags":996,"stars":20,"repoUrl":21,"updatedAt":1001},"planetscale-best-practices-matrix","evaluate PlanetScale best practices feature matrix","A concise feature matrix for deciding which PlanetScale safety, observability, and automation recommendations apply by engine.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[997,998,999,1000],{"name":982,"slug":983,"type":15},{"name":925,"slug":926,"type":15},{"name":930,"slug":931,"type":15},{"name":9,"slug":8,"type":15},"2026-07-27T06:07:48.188419",{"slug":1003,"name":1003,"fn":1004,"description":1005,"org":1006,"tags":1007,"stars":20,"repoUrl":21,"updatedAt":1016},"planetscale-change-gates-and-approval-contract","enforce approval gates for database mutations","Enforce explicit approval gates for any PlanetScale, database, repository, credential, network, or automation mutation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1008,1011,1012,1015],{"name":1009,"slug":1010,"type":15},"Approvals","approvals",{"name":925,"slug":926,"type":15},{"name":1013,"slug":1014,"type":15},"Governance","governance",{"name":9,"slug":8,"type":15},"2026-07-07T06:38:42.512288",{"slug":1018,"name":1018,"fn":1019,"description":1020,"org":1021,"tags":1022,"stars":20,"repoUrl":21,"updatedAt":1032},"planetscale-codebase-sqlcommenter-instrumentation","instrument PlanetScale applications with SQLCommenter","Inspect an application repository connected to PlanetScale and recommend SQLCommenter-compatible query tagging packages and conventions.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1023,1026,1027,1030,1031],{"name":1024,"slug":1025,"type":15},"Code Analysis","code-analysis",{"name":925,"slug":926,"type":15},{"name":1028,"slug":1029,"type":15},"Observability","observability",{"name":9,"slug":8,"type":15},{"name":933,"slug":934,"type":15},"2026-07-07T06:38:43.813568",{"slug":1034,"name":1034,"fn":1035,"description":1036,"org":1037,"tags":1038,"stars":20,"repoUrl":21,"updatedAt":1049},"planetscale-customer-report-template","generate PlanetScale best practices reports","Produce the final PlanetScale best-practices report after running the inventory and relevant review skills.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1039,1042,1043,1046],{"name":1040,"slug":1041,"type":15},"Documentation","documentation",{"name":9,"slug":8,"type":15},{"name":1044,"slug":1045,"type":15},"Reporting","reporting",{"name":1047,"slug":1048,"type":15},"Templates","templates","2026-07-07T06:38:37.362061",{"slug":4,"name":4,"fn":5,"description":6,"org":1051,"tags":1052,"stars":20,"repoUrl":21,"updatedAt":22},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1053,1054,1055],{"name":17,"slug":18,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"slug":1057,"name":1057,"fn":1058,"description":1059,"org":1060,"tags":1061,"stars":20,"repoUrl":21,"updatedAt":1070},"planetscale-postgres-safety-review","review PlanetScale Postgres safety and configuration","Review PlanetScale Postgres for Traffic Control, query tags, roles, pg_strict, backups\u002FPITR, private connectivity, webhooks, branches, and safe agent operation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1062,1065,1066,1067],{"name":1063,"slug":1064,"type":15},"Audit","audit",{"name":9,"slug":8,"type":15},{"name":948,"slug":949,"type":15},{"name":1068,"slug":1069,"type":15},"Security","security","2026-07-07T06:38:34.75135",{"slug":1072,"name":1072,"fn":1073,"description":1074,"org":1075,"tags":1076,"stars":20,"repoUrl":21,"updatedAt":1083},"planetscale-pscale-cli-automation","automate PlanetScale CLI operations","Use the PlanetScale CLI (pscale) from automated agents with --format json, auth check, pscale sql, and per-command --force. Run before other PlanetScale skills when driving pscale directly. Use when the user asks to automate pscale, run CLI commands headless, or verify pscale auth from an agent.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1077,1078,1081,1082],{"name":982,"slug":983,"type":15},{"name":1079,"slug":1080,"type":15},"CLI","cli",{"name":925,"slug":926,"type":15},{"name":9,"slug":8,"type":15},"2026-07-07T06:38:33.465495",19,{"items":1086,"total":1137},[1087,1095,1102,1109,1117,1124,1130],{"slug":976,"name":976,"fn":977,"description":978,"org":1088,"tags":1089,"stars":20,"repoUrl":21,"updatedAt":990},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1090,1091,1092,1093,1094],{"name":982,"slug":983,"type":15},{"name":925,"slug":926,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"name":988,"slug":989,"type":15},{"slug":992,"name":992,"fn":993,"description":994,"org":1096,"tags":1097,"stars":20,"repoUrl":21,"updatedAt":1001},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1098,1099,1100,1101],{"name":982,"slug":983,"type":15},{"name":925,"slug":926,"type":15},{"name":930,"slug":931,"type":15},{"name":9,"slug":8,"type":15},{"slug":1003,"name":1003,"fn":1004,"description":1005,"org":1103,"tags":1104,"stars":20,"repoUrl":21,"updatedAt":1016},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1105,1106,1107,1108],{"name":1009,"slug":1010,"type":15},{"name":925,"slug":926,"type":15},{"name":1013,"slug":1014,"type":15},{"name":9,"slug":8,"type":15},{"slug":1018,"name":1018,"fn":1019,"description":1020,"org":1110,"tags":1111,"stars":20,"repoUrl":21,"updatedAt":1032},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1112,1113,1114,1115,1116],{"name":1024,"slug":1025,"type":15},{"name":925,"slug":926,"type":15},{"name":1028,"slug":1029,"type":15},{"name":9,"slug":8,"type":15},{"name":933,"slug":934,"type":15},{"slug":1034,"name":1034,"fn":1035,"description":1036,"org":1118,"tags":1119,"stars":20,"repoUrl":21,"updatedAt":1049},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1120,1121,1122,1123],{"name":1040,"slug":1041,"type":15},{"name":9,"slug":8,"type":15},{"name":1044,"slug":1045,"type":15},{"name":1047,"slug":1048,"type":15},{"slug":4,"name":4,"fn":5,"description":6,"org":1125,"tags":1126,"stars":20,"repoUrl":21,"updatedAt":22},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1127,1128,1129],{"name":17,"slug":18,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"slug":1057,"name":1057,"fn":1058,"description":1059,"org":1131,"tags":1132,"stars":20,"repoUrl":21,"updatedAt":1070},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1133,1134,1135,1136],{"name":1063,"slug":1064,"type":15},{"name":9,"slug":8,"type":15},{"name":948,"slug":949,"type":15},{"name":1068,"slug":1069,"type":15},15]