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.

81

1.00x
Quality

62%

Does it follow best practices?

Impact

94%

1.00x

Average score across 6 eval scenarios

SecuritybySnyk

Passed

No known issues

Optimize this skill with Tessl

npx tessl skill review --optimize ./plugins/developer-essentials/skills/sql-optimization-patterns/SKILL.md
SKILL.md
Quality
Evals
Security

Quality

Discovery

82%

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

This is a solid description with a clear 'Use when...' clause and good trigger terms that users would naturally use when facing database performance issues. Its main weaknesses are slightly vague capability descriptions (topic areas rather than concrete actions) and some marketing-style language ('dramatically improve', 'Master', 'eliminate') that adds fluff without aiding skill selection. The description could also be more distinctive to avoid overlap with general database or schema design skills.

Suggestions

Replace topic-area language with concrete actions, e.g., 'Analyzes EXPLAIN plans, recommends index creation, rewrites slow SQL queries, identifies missing indexes and N+1 patterns' instead of 'Master SQL query optimization, indexing strategies'.

Remove marketing fluff like 'dramatically', 'Master', and 'eliminate' — these don't help Claude select the right skill and reduce clarity.

DimensionReasoningScore

Specificity

Names the domain (SQL/database performance) and some actions (query optimization, indexing strategies, EXPLAIN analysis), but these are more like topic areas than concrete discrete actions. Compare to the level 3 example which lists specific verbs like 'extract', 'fill', 'merge'.

2 / 3

Completeness

Clearly answers both what ('SQL query optimization, indexing strategies, and EXPLAIN analysis') and when ('Use when debugging slow queries, designing database schemas, or optimizing application performance') with an explicit 'Use when...' clause.

3 / 3

Trigger Term Quality

Includes strong natural trigger terms users would actually say: 'slow queries', 'database performance', 'SQL query optimization', 'indexing', 'EXPLAIN', 'database schemas', 'application performance'. These cover common variations of how users describe database performance issues.

3 / 3

Distinctiveness Conflict Risk

While SQL optimization is a fairly specific niche, terms like 'database schemas' and 'application performance' could overlap with general database design skills or broader performance tuning skills. The 'dramatically improve' phrasing is also fluffy and doesn't aid distinctiveness.

2 / 3

Total

10

/

12

Passed

Implementation

42%

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

This skill reads like a comprehensive SQL optimization textbook chapter rather than a targeted skill file. While the code examples are excellent and actionable, the content is far too verbose for a skill—Claude already knows SQL optimization fundamentals. The lack of a diagnostic workflow (diagnose → optimize → verify) and the monolithic structure significantly reduce its effectiveness as a quick-reference skill.

Suggestions

Reduce content by 70%+ by removing explanations of concepts Claude already knows (what index types are, what EXPLAIN metrics mean) and keeping only project-specific conventions or non-obvious patterns.

Add a clear diagnostic workflow at the top: 1) Run EXPLAIN ANALYZE 2) Identify bottleneck type 3) Apply matching pattern 4) Re-run EXPLAIN to verify improvement.

Split into multiple files: keep SKILL.md as a concise overview (~50 lines) with links to separate files for index strategies, query patterns, monitoring queries, and maintenance commands.

Remove the 'When to Use This Skill' bullet list and 'Common Pitfalls' prose—these are things Claude can infer. Replace with a decision tree or quick-reference table.

DimensionReasoningScore

Conciseness

The skill is extremely verbose at ~400+ lines, covering topics Claude already knows well (SQL optimization is core knowledge). It explains basic concepts like what a Seq Scan is, what B-Tree indexes are, and includes extensive code examples for well-known patterns. Much of this is textbook SQL knowledge that doesn't need to be in a skill file.

1 / 3

Actionability

The content provides fully executable SQL and Python code examples throughout. Every pattern includes concrete before/after examples with copy-paste ready queries, index creation statements, and monitoring queries.

3 / 3

Workflow Clarity

While individual patterns are well-structured with bad/good/better progressions, there's no clear overall workflow for diagnosing and fixing a slow query (e.g., run EXPLAIN → identify bottleneck → apply pattern → verify improvement). The monitoring section at the end should logically come first as a diagnostic step, and there are no explicit validation checkpoints after applying optimizations.

2 / 3

Progressive Disclosure

This is a monolithic wall of text with everything inline. At this length, content like index types, partitioning, materialized views, and monitoring queries should be split into separate reference files with the SKILL.md serving as a concise overview with links.

1 / 3

Total

7

/

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.

Validation11 / 11 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.