CtrlK
BlogDocsLog inGet started
Tessl Logo

sql-optimization-patterns

Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.

64

Quality

Does it follow best practices?

Impact

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

SKILL.md
Quality
Evals
Security

Quality

Content

65%

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

A highly actionable SQL optimization reference with strong executable examples and a real referenced details file, but it is lengthy for a SKILL.md and lacks validation checkpoints for its destructive/batch operations.

Suggestions

Move the Monitoring Queries, Maintenance/VACUUM, and Common Pitfalls sections into references and keep SKILL.md as a lean overview plus index/EXPLAIN essentials.

Add explicit validation steps for risky operations, e.g. run EXPLAIN ANALYZE before/after an index change and verify the plan switches to an Index Scan before declaring success.

Trim filler sentences like "Indexes are the most powerful optimization tool." that restate knowledge Claude already has.

DimensionReasoningScore

Conciseness

Code blocks are lean and executable, but the ~210-line body includes filler lines ("Indexes are the most powerful optimization tool.", "Understanding EXPLAIN output is fundamental to optimization.") and inline monitoring/maintenance sections that could live in references.

2 / 3

Actionability

Provides fully executable, copy-paste-ready SQL throughout — EXPLAIN variants, multiple CREATE INDEX forms, and monitoring queries against pg_stat_statements/pg_stat_user_tables.

3 / 3

Workflow Clarity

Guidance is organized as Good/Bad/Better patterns rather than a sequenced workflow, and database operations involving locks or batches (VACUUM FULL, REINDEX, batch UPDATE) lack explicit validate-then-verify checkpoints.

2 / 3

Progressive Disclosure

SKILL.md signals a one-level-deep reference (references/details.md) that exists and is well-linked, but the body itself is long and retains inline material (monitoring, maintenance, pitfall lists) that could be split into references.

2 / 3

Total

9

/

12

Passed

Description

85%

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 that clearly conveys both capability and trigger conditions with concrete, SQL-specific actions. Trigger-term coverage is good but could add more everyday phrasings users actually say.

Suggestions

Broaden trigger terms to include colloquial phrasings users say aloud, e.g. "the database is slow", "query is taking forever", "add an index", or "read an EXPLAIN plan".

Consider adding EXPLAIN-plan-specific triggers like "EXPLAIN ANALYZE" or "query plan" since EXPLAIN analysis is a core capability.

DimensionReasoningScore

Specificity

Names multiple concrete actions — "SQL query optimization, indexing strategies, and EXPLAIN analysis" plus "improve database performance and eliminate slow queries" — matching the multi-action anchor.

3 / 3

Completeness

Explicitly states what it does ("Master SQL query optimization, indexing strategies, and EXPLAIN analysis...") and when to use it ("Use when debugging slow queries, designing database schemas, or optimizing application performance"), satisfying both anchors.

3 / 3

Trigger Term Quality

Includes natural triggers like "debugging slow queries", "designing database schemas", and "optimizing application performance", but misses common user phrasings such as "the database is slow", "add an index", or "EXPLAIN plan".

2 / 3

Distinctiveness Conflict Risk

Targets a clear niche (SQL performance/EXPLAIN analysis) with distinct triggers unlikely to fire for unrelated skills.

3 / 3

Total

11

/

12

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.

Validation16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository
wshobson/agents
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.