CtrlK
BlogDocsLog inGet started
Tessl Logo

mysql

Plan and review MySQL/InnoDB schema, indexing, query tuning, transactions, and operations. Use when creating or modifying MySQL tables, indexes, or queries; diagnosing slow/locking behavior; planning migrations; or troubleshooting replication and connection issues. Load when using a MySQL database.

93

1.14x
Quality

92%

Does it follow best practices?

Impact

93%

1.14x

Average score across 8 eval scenarios

SecuritybySnyk

Advisory

Suggest reviewing before use

SKILL.md
Quality
Evals
Security

Evaluation results

97%

23%

Design a MySQL Schema for a Multi-Tenant SaaS Order Management System

Schema design and data type selection

Criteria
Without context
With context

BIGINT UNSIGNED AUTO_INCREMENT PK

100%

70%

UUID in secondary column

100%

100%

UUID stored as BINARY(16)

0%

100%

utf8mb4 character set

100%

100%

utf8mb4_0900_ai_ci collation

0%

100%

DATETIME not TIMESTAMP

100%

100%

NOT NULL preference

100%

100%

Lookup tables over ENUM

33%

100%

DECIMAL for money

100%

100%

Appropriate VARCHAR sizing

100%

100%

3NF normalization

100%

100%

96%

Optimize Slow Queries for an E-Commerce Analytics Dashboard

Composite index design and query optimization

Criteria
Without context
With context

Equality before range in composite index

100%

100%

Range stops subsequent index usage

50%

50%

Remove function on indexed column

100%

100%

Cursor pagination for Query C

100%

100%

No SELECT * in rewritten queries

100%

100%

UNION ALL for Query D

100%

100%

EXPLAIN red flag identification

100%

100%

Composite index for tenant + status queries

100%

100%

Index for GROUP BY optimization

100%

100%

Separate indexes or UNION for OR across columns

100%

100%

DESC in index or ORDER BY awareness

100%

100%

96%

14%

Design a Robust Inventory Reservation System with MySQL Transactions

Transaction isolation and deadlock handling

Criteria
Without context
With context

Consistent row access order

100%

100%

Error 1213 retry with backoff

100%

100%

I/O outside transaction

100%

100%

REPEATABLE READ as default

70%

100%

FOR UPDATE used sparingly

50%

60%

Short transaction duration

100%

100%

Backoff uses exponential delay

100%

100%

Max retry limit

100%

100%

Idempotency consideration

33%

100%

No global isolation change

100%

100%

Indexed WHERE columns

25%

100%

100%

Design a Partitioned Event Logging Table with Automated Retention

Time-series partitioning and data retention

Criteria
Without context
With context

RANGE partitioning used

100%

100%

Partition column in PRIMARY KEY

100%

100%

Partition column in UNIQUE KEY

100%

100%

MAXVALUE catch-all partition

100%

100%

DROP PARTITION for retention

100%

100%

REORGANIZE for new partitions

100%

100%

Monthly partition boundaries

100%

100%

BIGINT UNSIGNED AUTO_INCREMENT PK

100%

100%

No foreign keys on partitioned table

100%

100%

DATETIME not TIMESTAMP for recorded_at

100%

100%

Composite index for device lookups

100%

100%

100%

11%

Plan a Production Schema Migration and Data Backfill for a High-Traffic MySQL Database

Online DDL migration and bulk data operations

Criteria
Without context
With context

INSTANT for adding column

100%

100%

INPLACE for adding index

100%

100%

Explicit ALGORITHM specification

100%

100%

Column type change risks identified

70%

100%

External tool for large table rebuild

0%

100%

Batch update sizing

100%

100%

Connection pool formula

100%

100%

LOCK=NONE specified

100%

100%

Rollback steps included

100%

100%

Backfill uses batched WHERE with range or LIMIT

100%

100%

Replica testing recommended

100%

100%

77%

-1%

Optimize a Slow Product Catalog API

N+1 query elimination and covering index design

Criteria
Without context
With context

N+1 fixed with batch/join

100%

100%

NOT EXISTS instead of NOT IN

100%

100%

SELECT only needed columns

100%

100%

Covering index designed

100%

100%

Filter columns first in covering index

100%

100%

Batch IN list sizing

50%

60%

performance_schema N+1 detection query

37%

100%

Avoiding SELECT * rationale

100%

37%

InnoDB implicit PK in secondary index

0%

0%

Batch consolidation over sequential per-row queries

100%

100%

Join vs IN trade-off addressed

40%

20%

84%

23%

Database Index Cleanup for a Legacy E-Commerce Platform

Index audit and maintenance using performance_schema

Criteria
Without context
With context

performance_schema for unused indexes

100%

100%

Write-only indexes flagged separately

25%

100%

Redundant index detection

100%

100%

Invisible indexes before drop

66%

100%

Counter reset warning

100%

100%

Prefix indexes for long strings

30%

100%

1-5 indexes per table guideline

0%

0%

EXPLAIN verification

100%

100%

DROP uses ALGORITHM=INPLACE

25%

100%

UNIQUE/constraint index exemption

100%

62%

Write amplification explanation

0%

37%

100%

27%

MySQL Read Scaling Architecture for a Social Feed Application

Read replica routing and stale read prevention

Criteria
Without context
With context

PlanetScale recommended

0%

100%

Stale read problem explained

100%

100%

Post-write reads routed to primary

100%

100%

GTID-based lag strategy included

70%

100%

Seconds_Behind_Source limitation noted

37%

100%

Connection pool formula applied

100%

100%

Separate pools for primary and replica

100%

100%

Large transaction replication warning

87%

100%

Replica monitoring alerting

100%

100%

DDL replication impact noted

25%

100%

Write to primary only

100%

100%

Assume replicas always slightly behind

50%

100%

Repository
planetscale/database-skills
Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.