home / skills / partme-ai / full-stack-skills / mysql
This skill helps you design, query, and optimize MySQL databases with practical guidance on SQL, data types, indexing, transactions, and procedures.
npx playbooks add skill partme-ai/full-stack-skills --skill mysqlReview the files below or copy the command above to add this skill to your agents.
---
name: mysql
description: Provides comprehensive guidance for MySQL database including SQL syntax, data types, indexes, transactions, stored procedures, and optimization. Use when the user asks about MySQL, needs to write SQL queries, design database schemas, optimize MySQL performance, or work with MySQL features.
license: Complete terms in LICENSE.txt
---
## When to use this skill
Use this skill whenever the user wants to:
- [待完善:根据具体工具添加使用场景]
## How to use this skill
[待完善:根据具体工具添加使用指南]
## Best Practices
[待完善:根据具体工具添加最佳实践]
## Keywords
[待完善:根据具体工具添加关键词]
This skill provides practical, detailed guidance for working with MySQL databases, covering SQL syntax, data types, indexing, transactions, stored routines, and performance tuning. It helps you write queries, design schemas, troubleshoot slow queries, and apply MySQL-specific features reliably. Use it to improve correctness, maintainability, and performance of MySQL-backed applications.
The skill inspects the user's MySQL needs and produces focused advice: example SQL queries, schema design suggestions, index strategies, transaction and isolation recommendations, and optimization steps. It can translate high-level requirements into normalized schema drafts, generate sample stored procedures or triggers, and propose EXPLAIN-based query rewrites. It also outlines measurable steps to profile and fix common performance problems.
How do I choose between INT, BIGINT, and VARCHAR?
Choose numeric types based on expected range and storage: INT for up to ~2 billion, BIGINT for larger ranges. Use VARCHAR for variable-length text; prefer fixed-length CHAR only for truly fixed-size fields.
When should I create a composite index?
Create composite indexes when queries routinely filter or sort on multiple columns together. Order columns by selectivity and matching query patterns for best use.
How can I find why a query is slow?
Enable the slow query log, run EXPLAIN on the query to inspect access plans, check indexes and row estimates, and profile with performance_schema to identify CPU, I/O, or locking issues.