CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

testland/db-query-plan-analyzer

Use for any question or task about a slow SQL query or a database bottleneck, including how to read EXPLAIN or EXPLAIN ANALYZE output and database CPU that saturates under load. Reads plans 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

87%

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-crafted skill body: an actionable four-step diagnostic workflow with executable SQL for three engines, a complete output template including validation, and appropriate offloading of lookup tables to a single real, clearly-signaled reference file. The only improvements are trimming minor explanatory asides and version mentions, and adding an explicit error-recovery step when validation fails.

DimensionReasoningScore

Conciseness

The body is efficient — short sequenced steps, details delegated to references/plan-signatures.md, no basic-concept tutorials — with only minor trimmable asides ("order matters; leading column is the most selective") and version-number mentions ("PostgreSQL 11+", "MySQL 8.0+", "postgresql 17" in the output template) that the guidelines treat as time-sensitive. It is noticeably above the 3 anchor's unnecessary-explanation level but not the 5 anchor's every-token-earns-its-place level.

4 / 5

Actionability

Fully executable throughout: a complete `EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON, SETTINGS)` example query for PostgreSQL, templates for MySQL and SQLite, five copy-paste-ready CREATE INDEX recipes (single, composite, partial, functional, covering), and a complete worked output example with diagnosis, fix, and expected impact. The only ellipses are placeholders for the user's own query, which is inherently variable — this matches the 5 anchor.

5 / 5

Workflow Clarity

A clear four-step sequence (capture ANALYZE plan -> identify dominant cost -> match cost to fix -> emit index/rewrite) with an explicit validation checkpoint in the output template ("After applying: EXPLAIN (ANALYZE, BUFFERS) ... Confirm the new plan uses idx_orders_customer_created and the actual time is below the budget"). It falls short of the 5 anchor because there is no explicit error-recovery branch (what to do if the plan does not change or time stays over budget), and validation lives in the output template rather than the step sequence itself.

4 / 5

Progressive Disclosure

Clean split: the workflow, examples, and output template stay inline while the four lookup tables (cost signatures, diagnosis-to-fix, index-choice principles, anti-patterns) are delegated to references/plan-signatures.md, which exists and contains exactly the claimed sections. Each reference is clearly signaled by section name and is one level deep, matching the 5 anchor's well-signaled one-level-deep structure.

5 / 5

Total

18

/

20

Passed

Description

83%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 with an explicit 'Use for...' trigger clause, concrete diagnostic actions, an enumerated cost vocabulary, and named database engines. Its main weakness is the broad 'any database bottleneck' trigger, which slightly inflates scope beyond the query-plan niche, and a few missing natural synonyms like 'optimize' or 'query performance'.

DimensionReasoningScore

Specificity

Lists several concrete actions — "Reads plans from PostgreSQL, MySQL or SQLite", "finds the main cost (sequential scans, nested loops, sort spills, missing or unusable indexes)", "proposes the index or query rewrite" — with a specific enumerated cost vocabulary. It falls just short of the 5 anchor because coverage of capabilities (read, diagnose, propose) is slightly less comprehensive than the anchor's multi-action enumeration, and well above the 3 anchor's 1-2 concrete actions.

4 / 5

Completeness

Explicitly answers both: what ("Reads plans from PostgreSQL, MySQL or SQLite, finds the main cost ... and proposes the index or query rewrite") and when ("Use for any question or task about a slow SQL query or a database bottleneck, including how to read EXPLAIN or EXPLAIN ANALYZE output ...") with concrete trigger phrases. This matches the 5 anchor's explicit what-and-when-with-triggers pattern, exceeding the 4 anchor where the 'when' is less specific.

5 / 5

Trigger Term Quality

Contains natural phrases users would say: "slow SQL query", "database bottleneck", "EXPLAIN or EXPLAIN ANALYZE output", "database CPU that saturates under load", plus engine names. It is not a 5 because common variations such as "optimize/tune a query", "query performance", or "execution plan" are missing; it is clearly above 3's partial keyword coverage.

4 / 5

Distinctiveness Conflict Risk

The EXPLAIN/plan-analysis niche with named engines is mostly distinct with specific triggers. It is not a 5 because the broad trigger "any ... database bottleneck" and "database CPU that saturates under load" create minor overlap risk with infrastructure or database-performance skills (the body itself excludes connection-pool and replication-lag cases, but the description does not).

4 / 5

Total

17

/

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