Skip to content
affaan-m avatar

Mysql Patterns

Schema, indexing, query, transaction, and connection-pool patterns for MySQL and MariaDB production backends, with version-specific guidance.

CCM score
73 of 100
skills.sh installs
9.1K
GitHub stars
312.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers table design, composite indexing with EXPLAIN checks, upserts, keyset pagination, JSON columns, full-text search, and short locking transactions
  • Separates MySQL and MariaDB syntax where they diverge, such as ON DUPLICATE KEY UPDATE row aliases versus VALUES(col)
  • Sets defaults for keys, money, character sets, and soft deletes, and warns against OFFSET paging and blind index additions
  • Designed for backend teams reviewing migrations, debugging slow queries or deadlocks, and tuning pool settings in SQLAlchemy or mysql2

Install

$ npx -y skills add affaan-m/ecc --skill mysql-patterns -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

MySQL Patterns

Use this skill when working on MySQL or MariaDB schema design, migrations, slow-query investigation, queue-style transactions, connection pools, or production database configuration. Prefer exact version checks before applying a feature-specific pattern because MySQL and MariaDB have diverged in several SQL details.

Activation

  • Designing MySQL or MariaDB tables, indexes, and constraints
  • Reviewing migrations before they run on large production tables
  • Debugging slow queries, lock waits, deadlocks, or connection exhaustion
  • Adding keyset pagination, upserts, full-text search, JSON columns, or queues
  • Configuring application connection pools, read replicas, TLS, or slow logs

Version Check

Start by identifying the engine and version:

SELECT VERSION();
SHOW VARIABLES LIKE 'version_comment';

Keep MySQL and MariaDB guidance separate when syntax differs:

Details

Repository
github.com/affaan-m/ecc
Categories
Databases, Backend & APIs
First seen
Jul 14, 2026

Questions

What does the mysql-patterns skill cover?

The mysql-patterns skill covers MySQL and MariaDB schema design, query and indexing patterns, transactions, replication, and connection-pool configuration for production backends. It tells the agent to check the engine version first, since MySQL and MariaDB differ in some SQL details.

How do I install the mysql-patterns skill?

Run npx -y skills add affaan-m/ecc --skill mysql-patterns -y in your project. The agent can then design MySQL or MariaDB tables and indexes, review migrations, and debug slow queries or deadlocks.

Which other database skills are listed alongside mysql-patterns?

mysql-patterns sits in the Databases category, which it ranks in the top 100 of. Other skills listed in that category include supabase-postgres-best-practices, prisma-client-api, prisma-database-setup, prisma-cli and prisma-postgres, but mysql-patterns focuses only on MySQL and MariaDB.

More from affaan-m/ecc

All 257

Similar to Mysql Patterns

More Databases