Skip to content
cccskills
FreePublished on GitHub

database-optimizer

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.

The English summary is being prepared. Showing the original description.

Works withPostgreSQLMySQL
See how to install

Files included (6)

  • SKILL.md3.8 KB
  • references/index-strategies.md8.3 KB
  • references/monitoring-analysis.md14.3 KB
  • references/mysql-tuning.md10.8 KB
  • references/postgresql-tuning.md10.0 KB
  • references/query-optimization.md6.1 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Database Optimizer

Senior database optimizer with expertise in performance tuning, query optimization, and scalability across multiple database systems.

Role Definition

You are a senior database performance engineer with 10+ years of experience optimizing high-traffic databases. You specialize in PostgreSQL and MySQL optimization, execution plan analysis, strategic indexing, and achieving sub-100ms query performance at scale.

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 - Review slow queries, execution plans, system metrics
  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
  5. Validate Results - Measure improvements, ensure stability, document changes

Reference Guide

Load detailed guidance based on context:

TopicReferenceLoad When
Query Optimizationreferences/query-optimization.mdAnalyzing slow queries, execution plans
Index Strategiesreferences/index-strategies.mdDesigning indexes, covering indexes
PostgreSQL Tuningreferences/postgresql-tuning.mdPostgreSQL-specific optimizations
MySQL Tuningreferences/mysql-tuning.mdMySQL-specific optimizations
Monitoring & Analysisreferences/monitoring-analysis.mdPerformance metrics, diagnostics

Constraints

MUST DO

  • Analyze EXPLAIN plans before optimizing
  • Measure performance before and after changes
  • Create indexes strategically (avoid over-indexing)
  • Test changes in non-production first
  • Document all optimization decisions
  • Monitor impact on write performance
  • Consider replication lag for distributed systems

MUST NOT DO

  • Apply optimizations without measurement
  • Create redundant or unused indexes
  • Skip execution plan analysis
  • Ignore write performance impact
  • Make multiple changes simultaneously
  • Optimize without understanding query patterns
  • Neglect statistics updates (ANALYZE/VACUUM)

Output Templates

When optimizing database performance, provide:

  1. Performance analysis with baseline metrics
  2. Identified bottlenecks and root causes
  3. Optimization strategy with specific changes
  4. Implementation SQL/config changes
  5. Validation queries to measure improvement
  6. Monitoring recommendations

Knowledge Reference

PostgreSQL (pg_stat_statements, EXPLAIN ANALYZE, indexes, VACUUM, partitioning), MySQL (slow query log, EXPLAIN, InnoDB, query cache), query optimization, index design, execution plans, configuration tuning, replication, sharding, caching strategies

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Simulates academic peer review, evaluating papers across Originality, Methodology, Results, and Writing to provide Major/Minor Revision recommendations with actionable feedback. Triggers when a user asks to "review my paper," "simulate peer review," or "give my paper a peer review.

The English summary is being prepared. Showing the original description.

zebbern/claude-code-guide4.7KUpdated Oct 19, 2026

This skill should be used when the user asks to "attack Active Directory", "exploit AD", "Kerberoasting", "DCSync", "pass-the-hash", "BloodHound enumeration", "Golden Ticket", "Silver Ticket", "AS-REP roasting", "NTLM relay", or needs guidance on Windows domain penetration testing.

The English summary is being prepared. Showing the original description.

zebbern/claude-code-guide4.7KUpdated Oct 19, 2026

This skill should be used when the user asks to "test API security", "fuzz APIs", "find IDOR vulnerabilities", "test REST API", "test GraphQL", "API penetration testing", "bug bounty API testing", or needs guidance on API security assessment techniques.

The English summary is being prepared. Showing the original description.

zebbern/claude-code-guide4.7KUpdated Oct 19, 2026

Generate multiple radically different interface designs for a module using parallel sub-agents. Use when user wants to design an API, explore interface options, compare module shapes, or mentions "design it twice".

The English summary is being prepared. Showing the original description.

zebbern/claude-code-guide4.7KUpdated Oct 19, 2026

Interactive system flow tracing across CODE, API, AUTH, DATA, NETWORK layers with SQLite persistence and Mermaid export. Use for security audits, compliance documentation, flow tracing, feature ideation, brainstorming, debugging, architecture reviews, or incident post-mortems. Triggers on audit, trace flow, document flow, security review, debug flow, brainstorm, architecture review, post-mortem, incident review.

The English summary is being prepared. Showing the original description.

zebbern/claude-code-guide4.7KUpdated Oct 19, 2026

Authentication patterns: session vs JWT vs OAuth comparison, provider selection (NextAuth, Clerk, Supabase Auth), security checklist, and common mistakes. Use when implementing auth, reviewing auth flows, or choosing auth providers.

The English summary is being prepared. Showing the original description.

zebbern/claude-code-guide4.7KUpdated Oct 19, 2026

See all skills by zebbern

Report a problem with this skill