Agent skill · data analytics · affaan-m
mysql-patterns
MySQL and MariaDB schema, query, indexing, transaction, replication, and connection-pool patterns for production backends. Use when designing MySQL or MariaDB schemas and indexes, or when a query, transaction, or replica lags.
Why this skill is useful
Provides specific MySQL and MariaDB schema and query patterns that the AI wouldn't reliably generate on its own.
What it needs
About 7k tokens when loaded. Last updated 2026-08-06. 238,342 stars on the source repository.
What this skill does
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: Keep MySQL and MariaDB guidance separate when syntax differs: MySQL documents row aliases as the replacement for VALUES(col) in ON DUPLICATE KEY UPDATE; VALUES(col) is deprecated there. MariaDB documents VALUES(col) as the supported way to reference inserted values in ON DUPLICATE KEY UPDATE; use it for cross-engine compatibility. SKIP LOCKED is appropriate for queue-like work only. It skips locked rows and can return an inconsistent view, so do not use it for general accounting or integrity-sensitive reads. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills affaan-m/mysql-patterns--ea8ef1