vitess

Optimize Vitess database routing, sharding, and migration validation for MySQL-compatible clusters.

Updated May 17, 2022
One-click install
npx skills add https://github.com/kanade0404/dotfiles --skill vitess-kanade0404
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vitess
Source: https://github.com/kanade0404/dotfiles/tree/main/.opencode/skills/vitess
Command: npx skills add https://github.com/kanade0404/dotfiles --skill vitess-kanade0404

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps database engineers work effectively with Vitess by reducing sharding mistakes, query routing issues, and migration risk in MySQL-compatible distributed systems.

Core Features & Use Cases

  • Sharding and VSchema design: Choose primary vindexes, lookup vindexes, and sequences that keep queries single-shard and data evenly distributed.
  • Query performance troubleshooting: Diagnose scatter queries, cross-shard joins, transaction boundaries, and other Vitess routing or compatibility problems.
  • Operational database changes: Plan and verify online schema changes, MoveTables, Reshard workflows, and VReplication-based data movement.
  • Use Case: A team preparing a production schema change can use this Skill to confirm the routing impact, pick the right DDL strategy, and validate the migration with VDiff before cutover.

Quick Start

Use the vitess skill to review my cluster design, identify routing or sharding risks, and recommend the safest Vitess settings and migration steps.

Frequently Asked Questions about vitess

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose primary and lookup vindexes for Vitess sharding?

To optimize Vitess sharding, choose primary vindexes, lookup vindexes, and sequences that maintain even data distribution and keep queries single-shard. Proper VSchema design preserves shard locality and prevents scatter queries.

Why does my Vitess query result in a scatter query across all shards?

Vitess scatter queries occur when your query lacks the necessary vindex routing data. You can diagnose these cross-shard routing issues and transaction boundaries using VEXPLAIN to analyze the VTGate query planner and identify compatibility problems.

What is the best way to run online schema changes in a PlanetScale cluster?

The best way to run online schema changes in PlanetScale is to validate the routing impact, select the appropriate DDL strategy, and verify the migration using VDiff before cutover. This approach minimizes operational risk in distributed MySQL-compatible systems.

How do I validate data consistency during a Vitess VReplication workflow?

You validate data consistency during Vitess VReplication workflows by running VDiff. This operational check verifies that MoveTables and Reshard workflows have correctly replicated data before you execute the final cutover.

Does this Skill support self-hosted Vitess or only PlanetScale?

This Skill supports both self-hosted Vitess and PlanetScale environments. It provides guidance for keyspace management, query routing, and VReplication workflows across any MySQL-compatible distributed database cluster.