CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

testland/db-query-plan-analyzer

Use when load tests or production telemetry show the database is the bottleneck. Reads EXPLAIN or EXPLAIN ANALYZE output from PostgreSQL, MySQL or SQLite, finds the main cost (sequential scans, nested loops, sort spills, missing or unusable indexes) and proposes the index or query rewrite.

Quality

91%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

Quality

Content

86%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A well-built skill body: fully executable SQL at every step, a clear four-step workflow with an embedded validation checkpoint, and exemplary one-level-deep progressive disclosure to a real, well-organized reference file. The only gaps are slight - a trimmed rationale sentence or two, and an explicit what-if-validation-fails loop for the post-fix re-EXPLAIN step.

Suggestions

Tighten Step 1's justification paragraph ('Always use ANALYZE... can be wildly wrong') to a single sentence, since the anti-patterns table in plan-signatures.md already covers reading EXPLAIN without ANALYZE.

Add an explicit failure-path step after the validation re-EXPLAIN: what to do when the plan does not improve (e.g., check stale statistics with ANALYZE <table>, or verify the index is actually usable for the predicate) to earn a full feedback loop.

Consider moving the sibling-skill cross-references (flame-graph-analyzer, k6-load-testing) into a one-line 'Related skills' note or the reference file, trimming the main body's token budget.

DimensionReasoningScore

Conciseness

The body is efficient - a five-case overview, per-engine EXPLAIN commands, and a worked output template with no padding or explanation of basics Claude already knows. Minor trimming opportunities exist (the rationale for "Always use ANALYZE... plain EXPLAIN gives only planner estimates" and the trailing cross-skill references to flame-graph-analyzer / k6-load-testing partially restate what the reference file or description already covers), which fits anchor 4 rather than the lean anchor 5.

4 / 5

Actionability

Every step ships copy-paste-ready SQL: `EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON, SETTINGS) SELECT ...`, five concrete CREATE INDEX variants (single, composite, partial, functional, covering) with inline rationale, and a fully worked output-format example including a validation re-run. This matches anchor 5 - executable, specific examples covering the common cases.

5 / 5

Workflow Clarity

Steps 1-4 are clearly sequenced (capture ANALYZE plan -> find dominant node reading innermost-outward -> match diagnosis to fix via lookup table -> emit index/rewrite), and the output template embeds an explicit validation checkpoint ("Confirm the new plan uses idx_orders_customer_created and the actual time is below the budget") with expected impact. It stops short of anchor 5's explicit error-recovery feedback loop (what to do if the plan does NOT improve, e.g., re-check stats or drop the speculative index), so anchor 4 fits best.

4 / 5

Progressive Disclosure

SKILL.md is a concise overview that delegates all lookup tables to one level-deep, well-signaled references - [references/plan-signatures.md](references/plan-signatures.md) is cited four times, each time naming the specific table it contains (cost-signature table, diagnosis-to-fix table, index-choice principles, anti-patterns), and that file exists and contains exactly those sections. This matches anchor 5: clear overview, appropriately split content, easy navigation.

5 / 5

Total

18

/

20

Passed

Description

92%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong description: third-person voice, explicit 'Use when' triggers, named engines, and a precise enumeration of the cost signatures it diagnoses. The only improvement space is adding a couple more natural trigger synonyms ("slow query", "query plan", "add an index") users might phrase differently.

DimensionReasoningScore

Specificity

"Reads EXPLAIN or EXPLAIN ANALYZE output from PostgreSQL, MySQL or SQLite, finds the main cost (sequential scans, nested loops, sort spills, missing or unusable indexes) and proposes the index or query rewrite" lists multiple concrete actions with an enumerated breakdown of the cost types and named database engines - comprehensive coverage of the skill's scope. It clearly matches the anchor for multiple specific concrete actions; the score-4 anchor (minor gaps in coverage) applies less well since the actions and their sub-cases are all stated explicitly.

5 / 5

Completeness

It opens with an explicit "Use when load tests or production telemetry show the database is the bottleneck" trigger clause and then clearly states what it does (reads EXPLAIN output, finds the dominant cost, proposes the fix) - both 'what' and 'when' are explicit with concrete trigger phrases. This matches anchor 5; anchor 4 ('when' could be more explicit) does not apply because the when-clause names two specific triggering situations.

5 / 5

Trigger Term Quality

Natural triggers include "load tests", "production telemetry", "database is the bottleneck", "EXPLAIN / EXPLAIN ANALYZE", and engine names (PostgreSQL, MySQL, SQLite) - good keyword coverage an engineer would actually say. A few common variations are missing (e.g., "slow query", "query plan", "query optimization", "add an index"), which keeps it just below the comprehensive-with-synonyms anchor 5 but comfortably above anchor 3.

4 / 5

Distinctiveness Conflict Risk

"Reads EXPLAIN or EXPLAIN ANALYZE output... finds the main cost (sequential scans, nested loops, sort spills, missing or unusable indexes)" carves out a clear niche (query-plan analysis) with distinct technical triggers that no generic SQL or performance skill would claim. Minimal conflict risk - matches anchor 5; anchor 4's 'minor overlap risk with closely related skills' is less fitting since the EXPLAIN-plan framing is highly distinctive.

5 / 5

Total

19

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Reviewed

On this page