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 that clearly communicates both what the skill does and when to use it, with good trigger terms that match natural user language. Its main weaknesses are that the capability descriptions lean toward topic areas rather than specific concrete actions, and some trigger terms like 'optimizing application performance' are broad enough to potentially conflict with other skills. The use of 'Master' as a leading verb and 'dramatically improve' adds unnecessary fluff.

Suggestions

Replace topic-area language with more specific concrete actions, e.g., 'Rewrites slow SQL queries, recommends index creation, analyzes EXPLAIN plans, identifies missing indexes and N+1 query patterns'.

Narrow the 'Use when' clause to reduce overlap risk—'optimizing application performance' is too broad; consider replacing with more specific triggers like 'when queries take too long, when analyzing query execution plans, or when choosing indexes'.

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'. These cover common variations of how users describe database performance issues.

3 / 3

Distinctiveness Conflict Risk

While SQL optimization is a reasonably specific niche, terms like 'database schemas' and 'application performance' could overlap with general database design skills or broader performance tuning skills. The core focus on query optimization and EXPLAIN analysis helps, but 'optimizing application performance' is quite broad.

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 is a comprehensive SQL optimization reference but suffers from being overly verbose and monolithic. It explains many concepts Claude already knows (basic index types, what SELECT * does, what JOINs are) and packs everything into a single massive file without progressive disclosure. The actionability is strong with executable examples throughout, but the lack of a coherent diagnostic workflow and validation steps limits its practical utility as a skill.

Suggestions

Reduce content by 60-70% — remove explanations of basic SQL concepts Claude already knows (e.g., what Seq Scan means, what B-Tree indexes are) and focus only on non-obvious patterns and decision heuristics.

Add a clear diagnostic workflow at the top: 'Run EXPLAIN ANALYZE → identify bottleneck type → apply specific pattern → re-run EXPLAIN to verify improvement' with explicit validation checkpoints.

Split into multiple files: keep SKILL.md as a concise overview with a decision tree, then reference separate files like INDEXING.md, QUERY_PATTERNS.md, and MONITORING.md for detailed examples.

Remove the 'When to Use This Skill' and 'Common Pitfalls' bullet lists which are generic knowledge, and replace with a compact decision matrix mapping symptoms to specific optimization patterns.

DimensionReasoningScore

Conciseness

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

1 / 3

Actionability

The skill provides fully executable SQL code examples throughout, with concrete before/after patterns, specific PostgreSQL commands, and copy-paste ready queries. Every pattern includes working code with clear bad/good comparisons.

3 / 3

Workflow Clarity

While individual patterns are well-structured with bad/good comparisons, there's no clear diagnostic workflow (e.g., 'first run EXPLAIN ANALYZE, then check for seq scans, then add indexes, then re-validate'). The skill lacks explicit validation checkpoints — for instance, after adding an index, there's no step to verify it's being used. The monitoring section at the end is disconnected from the optimization patterns.

2 / 3

Progressive Disclosure

This is a monolithic wall of text with no references to external files and no bundle structure. All content — from basic EXPLAIN usage to advanced partitioning to monitoring queries — is crammed into a single file. The content would benefit greatly from splitting into separate files for index strategies, query patterns, monitoring, etc.

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.