mysql-conventions

Enforce MySQL schema conventions for engines, charsets, keys, and indexes.

Updated Feb 7, 2026
One-click install
npx skills add https://github.com/jsamuelsen11/claude-config --skill mysql-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mysql-conventions
Source: https://github.com/jsamuelsen11/claude-config/tree/main/plugins/ccfg-mysql/skills/mysql-conventions
Command: npx skills add https://github.com/jsamuelsen11/claude-config --skill mysql-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This set of MySQL conventions standardizes schema design and governance to reduce drift, improve consistency, and accelerate development by ensuring uniform engines, character sets, keys, indexing strategies, and data types across projects.

Core Features & Use Cases

  • Engine and Charset Rules: Enforce InnoDB with utf8mb4 for reliability and full Unicode support.
  • Schema Design Rules: Use snake_case naming, BIGINT UNSIGNED primary keys, NOT NULL with sensible defaults, and generated columns for computed values.
  • Indexing & Constraints: Ensure proper indexing of foreign keys, apply left-prefix rules for composite indexes, utilize full-text search patterns, and avoid redundant indexes; prefer lookup tables for mutable enums where appropriate.
  • Use Cases: Guiding the design of new schemas, refactoring legacy schemas, and standardizing migrations to maintain cross-team consistency.

Quick Start

Review existing schemas and apply these conventions to new tables and migrations.

Frequently Asked Questions about mysql-conventions

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

FAQPage Schema
What are the standard MySQL schema design conventions for safe databases?

Standard MySQL schema design conventions enforce InnoDB with utf8mb4, BIGINT UNSIGNED primary keys, NOT NULL defaults, and proper foreign key indexing to ensure consistency and maintainability.

How do I enforce proper indexing on MySQL foreign keys and composite keys?

Proper indexing on MySQL foreign keys and composite keys requires indexing foreign keys directly and applying left-prefix rules for composite indexes to avoid redundant indexes and optimize performance.

Why should I use utf8mb4 and InnoDB for MySQL schema design?

You should use utf8mb4 and InnoDB for MySQL schema design to ensure full Unicode support and database reliability, providing robust transaction handling and complete character compatibility.

When do I need generated columns in MySQL migrations?

You need generated columns in MySQL migrations when defining computed values directly within the schema, ensuring consistency and eliminating application-level calculation logic.

What is the best way to standardize MySQL migrations across teams?

The best way to standardize MySQL migrations across teams is applying uniform schema conventions like snake_case naming and consistent engine selection to reduce drift and accelerate development.

How do I handle mutable enums in MySQL schema design?

Handle mutable enums in MySQL schema design by preferring lookup tables instead of native enum constraints, allowing flexible data updates without requiring complex migrations.