Diagnose and resolve database performance issues across PostgreSQL and MySQL with query analysis and optimization strategies.
Works with
Analyzes slow queries using EXPLAIN ANALYZE , identifies missing indexes, and designs covering index strategies
Provides database-specific tuning guidance for PostgreSQL and MySQL configuration, schema design, and partitioning
Includes reference materials for query optimization, index strategies, monitoring, and lock contention resolution
Delivers before/af
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versiondatabase-optimizerExecute the skills CLI command in your project's root directory to begin installation:
Fetches database-optimizer from jeffallan/claude-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate database-optimizer. Access via /database-optimizer in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
0
total installs
0
this week
7.9K
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
7.9K
stars
Senior database optimizer with expertise in performance tuning, query optimization, and scalability across multiple database systems.
EXPLAIN ANALYZE before any changesEXPLAIN 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.
Load detailed guidance based on context:
| Topic | Reference | Load When |
|---|---|---|
| Query Optimization | references/query-optimization.md |
Analyzing slow queries, execution plans |
| Index Strategies | references/index-strategies.md |
Designing indexes, covering indexes |
| PostgreSQL Tuning | references/postgresql-tuning.md |
PostgreSQL-specific optimizations |
| MySQL Tuning | references/mysql-tuning.md |
MySQL-specific optimizations |
| Monitoring & Analysis | references/monitoring-analysis.md |
Performance metrics, diagnostics |
-- Requires pg_stat_statements extension
SELECT query,
calls,
round(total_exec_time::numeric, 2) AS total_ms,
round(mean_exec_time::numeric, 2) AS mean_ms,
round(stddev_exec_time::numeric, 2) AS stddev_ms,
rows
FROM pg_stat_statements
ORDER BY mean_exec_time DESC
LIMIT 20;
-- Use BUFFERS to expose cache hit vs. disk read ratio
EXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT)
SELECT o.id, c.name
FROM orders o
JOIN customers c ON c.id = o.customer_id
WHERE o.status = 'pending'
AND o.created_at > now() - interval '7 days';
| Pattern | Symptom | Typical Remedy |
|---|---|---|
Seq Scan on large table |
High row estimate, no filter selectivity | Add B-tree index on filter column |
Nested Loop with large outer set |
Exponential row growth in inner loop | Consider Hash Join; index inner join key |
cost=... rows=1 but actual rows=50000 |
Stale statistics | Run ANALYZE <table>; |
Buffers: hit=10 read=90000 |
Low buffer cache hit rate | Increase shared_buffers; add covering index |
Sort Method: external merge |
Sort spilling to disk | Increase work_mem for the session |
-- Covers the filter AND the projected columns, eliminating a heap fetch
CREATE INDEX CONCURRENTLY idx_orders_status_created_covering
ON orders (status, created_at)
INCLUDE (customer_id, total_amount);
-- Before optimization: save plan & timing
EXPLAIN (ANALYZE, BUFFERS) <query>; -- note "Execution Time: X ms"
-- After optimization: compare
EXPLAIN (ANALYZE, BUFFERS) <query>; -- target meaningful reduction in cost & time
-- Confirm index is actually used
SELECT indexname, idx_scan, idx_tup_read, idx_tup_fetch
FROM pg_stat_user_indexes
WHERE relname = 'orders';
-- Inspect slow query log candidates
SELECT * FROM performance_schema.events_statements_summary_by_digest
ORDER BY SUM_TIMER_WAIT DESC
LIMIT 20;
-- Execution plan
EXPLAIN FORMAT=JSON
SELECT * FROM orders WHERE status = 'pending' AND created_at > NOW() - INTERVAL 7 DAY;
EXPLAIN (ANALYZE, BUFFERS) output before optimizing — this is the baselineCONCURRENTLY (PostgreSQL) to avoid table locksANALYZE after bulk data changes to refresh statisticsVACUUM / statistics maintenanceWhen optimizing database performance, provide:
Make data-driven prioritization decisions faster
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Prerequisites
Time Estimate
30-60 minutes to see productivity improvements
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
mattpocock/skills
parcadei/continuous-claude-v3
cursor/plugins
ailabs-393/ai-labs-claude-skills
ailabs-393/ai-labs-claude-skills
pproenca/dot-skills
I recommend database-optimizer for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
We added database-optimizer from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
Keeps context tight: database-optimizer is the kind of skill you can hand to a new teammate without a long onboarding doc.
Keeps context tight: database-optimizer is the kind of skill you can hand to a new teammate without a long onboarding doc.
database-optimizer has been reliable in day-to-day use. Documentation quality is above average for community skills.
database-optimizer fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
database-optimizer reduced setup friction for our internal harness; good balance of opinion and flexibility.
database-optimizer has been reliable in day-to-day use. Documentation quality is above average for community skills.
Solid pick for teams standardizing on skills: database-optimizer is focused, and the summary matches what you get after install.
Solid pick for teams standardizing on skills: database-optimizer is focused, and the summary matches what you get after install.
showing 1-10 of 46