Skip to content
SkillModel-led1,235 tokens in use

Database Optimizer

Tunes PostgreSQL and MySQL by capturing an EXPLAIN ANALYZE baseline, designing indexes and rewrites, and measuring each change on its own.

12,471 stars on the repository MIT LicenseJeffallan/claude-skills · skills/database-optimizer
/plugin marketplace add jeffallan/claude-skills /plugin install fullstack-dev-skills@fullstack-dev-skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing Database Optimizer costs

53tokens idle
1,235tokens in use
13,972tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

Nothing detected: no shell, network, file writes, git or credentials in its files.

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Excellent
  • Frontmatter15/15
  • Structure23/25
  • Examples12/15
  • Output15/15
  • Size15/15
  • Resources15/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent

No findings.

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Excellent
  • Development activity100
  • Maintenance100
  • Community60
  • Maturity36
  • Momentum40

Database Optimizer follows a measure-first routine. It captures baseline metrics and an execution plan, finds the bottleneck, applies one change at a time and re-measures.

The skill includes queries to find the slowest statements with pg_stat_statements, a guide to reading EXPLAIN output, covering index examples and MySQL digest queries.

What You Get

  • A performance analysis with baseline metrics and EXPLAIN evidence
  • Identified bottlenecks and root causes
  • An optimization strategy with specific index, query and config changes
  • Implementation SQL
  • Validation queries and monitoring recommendations

Common Use Cases

  • Finding and fixing the slowest queries
  • Designing a covering index
  • Tuning PostgreSQL or MySQL configuration
  • Reducing lock contention
  • Planning table partitioning

What Makes It Unique

It forbids optimizing without a measured baseline and forbids making several changes at once, since the impact could not be attributed. Indexes are created with CONCURRENTLY on PostgreSQL to avoid table locks. References cover query optimization, indexes, PostgreSQL, MySQL and monitoring.

Under The Hood

The skill is a SKILL.md with five reference files and no scripts. It gives the agent SQL to run against your database, including EXPLAIN ANALYZE, which executes the query, and statements that create indexes and run ANALYZE, so it can change a live database if pointed at one. The skill warns to test in non-production first. It does not fetch web pages or call outside APIs.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers