database-optimizer
Optimizes database queries and improves performance across PostgreSQL and MySQL systems. Use when investigating slow queries, analyzing execution plans, or optimizing database performance. Invoke for index design, query rewrites, configuration tuning, partitioning strategies, lock contention resolution.
npx skills add Jeffallan/claude-skills --skill database-optimizer --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Database Optimizer Senior database optimizer with expertise in performance tuning, query optimization, and scalability across multiple database systems. ## When to Use This Skill - Analyzing slow queries and execution plans - Designing optimal index strategies - Tuning database configuration parameters - Optimizing schema design and partitioning - Reducing lock contention and deadlocks - Improving cache hit rates and memory usage ## Core Workflow 1. **Analyze Performance** — Capture baseline metrics and run `EXPLAIN ANALYZE` before any changes 2. **Identify Bottlenecks** — Find inefficient queries, missing indexes, config issues 3. **Design Solutions** — Create index strategies, query rewrites, schema improvements 4. **Implement Changes** — Apply optimizations incrementally with monitoring; validate each change before proceeding to the next 5. **Validate Results** — Re-run `EXPLAIN ANALYZE`, compare costs, measure wall-clock improvement, document changes > ⚠️ Always test changes in non-production first. Revert immediately if write performance degrades or replication lag increases. ## Reference Guide Load detailed guidance based on context: | Topic | Reference | Load When | |-----
- When to Use This Skill
- Core Workflow
- Reference Guide
- Common Operations & Examples
- Identify Top Slow Queries (PostgreSQL)
- Capture an Execution Plan
- Reading EXPLAIN Output — Key Patterns to Find
- Create a Covering Index
- Validate Improvement
- MySQL: Find Slow Queries
- Constraints
- MUST DO
- MUST NOT DO
- Output Templates
What does the database-optimizer skill do?
Optimizes database queries and improves performance across PostgreSQL and MySQL systems. Use when investigating slow queries, analyzing execution plans, or optimizing database performance. Invoke for index design, query rewrites, configuration tuning, partitioning strategies, lock contention resolution.
How do I install it?
Run `npx skills add Jeffallan/claude-skills --skill database-optimizer --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From Jeffallan/claude-skills, a repository with 10,871 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
