planetscale-schema-recommendations-agent-loop

planetscale-schema-recommendations-agent-loop is a skill for Claude Code, Codex from planetscale/claude-plugin. It costs 37 tokens per session (758 once invoked), scanned A, a copy of planetscale-schema-recommendations-agent-loop, Apache-2.0.

A review process for PlanetScale schema recommendations, which are suggestions for changing how database tables store or find data.

In plain words
What is it for?
Use it to investigate recommendations such as adding or removing indexes, trace them to application queries, assess their effects, and test proposed changes on a separate branch.
Why use it?
It helps turn database advice into reviewed plans, migrations, issues, or pull requests without applying changes directly to production.

Skill for Claude CodeCodex

Part of the planetscale plugin — 19 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/planetscale/claude-plugin/07-schema-recommendations-agent-loop
Any agent
npx skills add planetscale/claude-plugin --skill 07-schema-recommendations-agent-loop
Clone the repo
git clone --depth 1 https://github.com/planetscale/claude-plugin

Made for: Claude Code, Codex.

Or install planetscale, the plugin that ships this one along with the rest of its 19 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for planetscale-schema-recommendations-agent-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/planetscale/claude-plugin/07-schema-recommendations-agent-loop.svg)](https://agentmods.dev/skills/planetscale/claude-plugin/07-schema-recommendations-agent-loop)
Your own site
<a href="https://agentmods.dev/skills/planetscale/claude-plugin/07-schema-recommendations-agent-loop"><img src="https://agentmods.dev/badge/skills/planetscale/claude-plugin/07-schema-recommendations-agent-loop.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 758 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00037 $0.00758
Opus 5 $0.00018 $0.00379
Sonnet 5 $0.00007 $0.00152
Haiku 4.5 $0.00004 $0.00076

Measured 4d ago against content hash d94bfcc4e511, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

planetscale-schema-recommendations-agent-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to planetscale-schema-recommendations-agent-loop — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

planetscale-skills/07-schema-recommendations-agent-loop/SKILL.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Schema recommendations agent loop

Purpose

Use PlanetScale schema recommendations as high-quality input to agents. Convert recommendations into safe implementation plans, issues, branches, migrations, or pull requests. Do not apply recommendations directly.

Inputs

Collect:

  • Open schema recommendations.
  • Recommendation type.
  • Affected table, keyspace, schema, and query pattern.
  • Suggested DDL.
  • Supporting Insights evidence.
  • Application repository and migration system.
  • Engine: Vitess or Postgres.
  • Target branch.

Recommendation types to recognize

  • Add index for inefficient query.
  • Remove redundant index.
  • Prevent primary key ID exhaustion.
  • Drop unused table.
  • Upgrade legacy charset or collation.
  • Other DDL recommendation.

Triage questions

For each recommendation, answer:

  • Is this still open and relevant?
  • Which query patterns triggered it?
  • Which application code paths generate those queries?
  • Is the recommendation safely expressible in the application’s migration framework?
  • Does the ORM/schema source of truth need to change?
  • Can it be tested on a non-production branch?
  • What is the expected impact on reads, writes, storage, and deploy time?
  • Is there a rollback or revert path?
  • Is there a competing recommendation or migration?

Engine-specific implementation path

Vitess

Recommended path:

  1. Create or use a development branch.
  2. Apply the schema change to that branch only after approval.
  3. Open a deploy request only after approval.
  4. Use deploy request review to inspect schema, shard impact, data-loss warnings, lint errors, and conflicts.
  5. Use normal safe migration path unless instant deployment is explicitly justified.
  6. Deploy only after approval.
  7. Monitor Insights and anomaly state after deployment.

Default output before approval: issue or PR with migration proposal, not a live deploy request.

Postgres

Recommended path:

  1. Convert DDL into the application’s migration framework where possible.
  2. Test against a non-production branch.
  3. Run application tests and relevant query checks.
  4. Open PR.
  5. Apply production migration only after approval.
  6. Use backups/PITR runbook as recovery plan, not as a substitute for migration review.

Read the full file on GitHub · 119 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 119 lines · 37 tokens per session scan A d94bfcc4e511

Subscribe to this mod's changes

planetscale-schema-recommendations-agent-loop is a skill published in the GitHub repository planetscale/claude-plugin (4 stars, last pushed 3d ago), licensed Apache-2.0. It adds 37 tokens to every session and 758 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to planetscale-schema-recommendations-agent-loop, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

stale-sweep

Sweep the googleapis/mcp-toolbox repo for issues and PRs with no real activity in N days (default 60), sort each by whose silence it is (the author's, ours, or nobody's), and draft the nudge or close comment. Use whenever a maintainer asks for a stale sweep, backlog cleanup, or an SLO check, e.g. "stale sweep", "find…

googleapis/mcp-toolbox · 159 tokens

skip-test-with-issue

Skip a flaky or broken test with proper issue tracking. Use when asked to skip a test, disable a test, or mark a test as flaky.

cockroachdb/cockroach · 36 tokens

archive

Query the Switchboard plan archive — the SQLite cold store (kanban-archive.db) that holds plans aged out of the hot kanban board, plus the optional legacy DuckDB archive.

TentacleOpera/switchboard · 40 tokens

debug-failed-run

Debug a failed Activepieces flow run end-to-end: given a flow run id (or BullMQ job id), find why it failed, cross-referencing the live BullMQ job + Postgres rows (SSH script on the DevOps box), the centralized ClickHouse logs (ClickStack MCP), and the code in this repo, then categorize the failed-job backlog on…

activepieces/activepieces · 80 tokens

ecosystem-intake

Use when monitoring a curated ecosystem source and you need to turn new items into concrete adopt/adapt/reject backlog candidates — combines GitHub-native reading with SQL triage and repository-fit scoring.

drvoss/everything-copilot-cli · 43 tokens

jira-operations

JIRA cache and performance operations. TRIGGERS: 'warm the cache', 'warm cache', 'cache status', 'clear cache', 'cache warm', 'cache for project', 'discover project', 'project discovery', 'cache hit rate', 'optimize performance', 'rate limit'. Use for JIRA API performance optimization and project context discovery.…

grandcamel/JIRA-Assistant-Skills · 104 tokens