mysql

Plan and review MySQL and InnoDB schema, indexing, query, and operational changes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you make safe, measurable MySQL and InnoDB changes by turning schema, index, query, transaction, and operational decisions into clear, evidence-based guidance.

Core Features & Use Cases

  • Schema design: Choose durable primary keys, data types, character sets, JSON patterns, and partitioning strategies.
  • Query and index tuning: Analyze EXPLAIN plans, fix non-sargable queries, design composite and covering indexes, and reduce N+1 patterns.
  • Concurrency and operations: Diagnose deadlocks, manage isolation levels, plan online DDL, handle replication lag, and control connection usage.
  • Use case: A developer preparing a migration can use this Skill to confirm the least risky ALTER strategy, validate index impact, and prepare rollback steps before touching production data.

Quick Start

Ask for a MySQL schema, query, or migration review with the table definitions, workload details, and any EXPLAIN output you already have.

Frequently Asked Questions about mysql

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

FAQPage Schema
How do I analyze MySQL EXPLAIN plans to optimize slow queries?

To optimize slow MySQL queries, analyze EXPLAIN plans to identify non-sargable conditions, design composite and covering indexes, and eliminate N+1 query patterns for measurable performance tuning.

What is the safest way to run online DDL migrations in InnoDB?

The safest way to run online DDL migrations in InnoDB is to evaluate the least risky ALTER strategy, validate index impact, and prepare rollback steps before touching production data.

How can I troubleshoot MySQL deadlocks and manage isolation levels?

To troubleshoot MySQL deadlocks, diagnose lock metrics and concurrency issues, adjust transaction isolation levels, and apply evidence-based validation to resolve conflicts safely.

How do I choose durable primary keys and partitioning strategies for schema design?

To choose durable primary keys and partitioning strategies for MySQL schema design, select appropriate data types, character sets, and JSON patterns based on workload requirements and version-aware safety checks.

What should I do to handle MySQL replication lag and control connection usage?

To handle MySQL replication lag and control connection usage, monitor operational metrics, manage connection pools, and apply evidence-based validation to ensure stable concurrency and operations.