mcpbeat Sign in

Planetscale Schema Recommendations Agent Loop Agent Skill

Safely triage PlanetScale schema recommendations and turn them into reviewed branches, migrations, issues, or pull requests without applying production changes.

981 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
103
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/planetscale/skills --skill planetscale-schema-recommendations-agent-loop

The instruction itself

11 sections, as written by the author

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:

  • Create or use a development branch.
  • Apply the schema change to that branch only after approval.
  • Open a deploy request only after approval.
  • Use deploy request review to inspect schema, shard impact, data-loss warnings, lint errors, and conflicts.
  • Use normal safe migration path unless instant deployment is explicitly justified.
  • Deploy only after approval.
  • 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:

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

Default output before approval: migration PR or issue, not production DDL.

Codebase correlation

When a repository is available:

  • Search for the table and column names.
  • Search for ORM model definitions.
  • Search for migrations.
  • Search for query fingerprints, route tags, job names, and controller/action names from Insights.
  • Identify whether the recommendation should be implemented in database DDL, ORM schema, raw migration, or application query code.

Safety checks before proposing implementation

Block direct application when:

  • The recommendation is stale or already addressed.
  • The affected table is small enough that the benefit is unclear.
  • The index would be redundant with an existing index.
  • The index would hurt write-heavy workloads without enough read benefit.
  • The table appears unused but repository references are ambiguous.
  • Dropping a table or index lacks owner confirmation.
  • The migration framework has a different schema source of truth.
  • The recommendation targets production and no branch/test plan exists.

Output

For each recommendation, produce:

  • Recommendation ID/number.
  • Type.
  • Severity and expected benefit.
  • Evidence from Insights.
  • Affected schema.
  • Suggested DDL.
  • Application code owner or likely location.
  • Safe implementation path.
  • Validation plan.
  • Rollback/revert plan.
  • Approval requirement.

End with:

“No schema recommendations have been applied.”

Other skills for the same job

different authors, same section of the catalogue
Receiving Code Review
by ZhanlinCui
×7

Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation

2k tokens
Requesting Code Review
by ZhanlinCui
×6

Use when completing tasks, implementing major features, or before merging to verify work meets requirements

2k tokens
Git Commit
by github
vendor ×3

Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping

799 tokens
Github Code Review
by ComeOnOliver
×3

Comprehensive GitHub code review with AI-powered swarm coordination

13k tokens
Karpathy Guidelines
by hyyhf
×3

Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.

629 tokens
Code Reviewer
by google-gemini
vendor ×2

Use this skill to review code. It supports both local changes (staged or working tree) and remote Pull Requests (by ID or URL). It focuses on correctness, maintainability, and adherence to project standards.

795 tokens
Agent MD Refactor
by softaworks
×2

Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation.

4k tokens
Commit Work
by softaworks
×2

Create high-quality git commits: review/stage intended changes, split into logical commits, and write clear commit messages (including Conventional Commits). Use when the user asks to commit, craft a commit message, stage changes, or split work into multiple commits.

2k tokens

How to use it

Copy the folder

Take planetscale/planetscale-schema-recommendations-agent-loop from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

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.