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.
76
66%
Does it follow best practices?
Impact
93%
0.98xAverage score across 3 eval scenarios
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./tests/ext_conformance/artifacts/agents-wshobson/developer-essentials/skills/sql-optimization-patterns/SKILL.mdQuality
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 slightly vague capability descriptions (topic areas rather than concrete actions) and some overlap risk with the broad 'optimizing application performance' trigger. The use of 'Master' and 'dramatically improve' reads as slightly promotional rather than purely descriptive.
Suggestions
Replace topic-area language with more concrete actions, e.g., 'Rewrites slow SQL queries, recommends index creation, analyzes EXPLAIN plans, identifies missing indexes and N+1 query patterns'
Narrow the broad 'optimizing application performance' trigger to something more distinct like 'optimizing database query performance' to reduce conflict risk with non-database performance skills
| Dimension | Reasoning | Score |
|---|---|---|
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, EXPLAIN analysis) and when (debugging slow queries, designing database schemas, 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 fairly specific niche, terms like 'database schemas' and 'application performance' could overlap with general database design skills or broader performance tuning skills. The 'optimizing application performance' trigger is particularly broad and could conflict with non-database performance skills. | 2 / 3 |
Total | 10 / 12 Passed |
Implementation
50%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 significantly from verbosity - it reads like a textbook chapter rather than a concise skill file for Claude. The actionability is excellent with real, executable SQL examples throughout, but the content would be far more effective if the main file were condensed to key patterns and decision points, with detailed examples pushed to referenced files. The lack of a systematic diagnostic workflow (EXPLAIN → identify → fix → verify) is a notable gap.
Suggestions
Reduce the main file to ~100 lines covering a diagnostic workflow and pattern index, moving detailed examples for each pattern into referenced files (e.g., references/n-plus-one.md, references/pagination.md)
Add a systematic optimization workflow: 1. Run EXPLAIN ANALYZE 2. Identify scan type/bottleneck 3. Select appropriate pattern 4. Apply fix 5. Re-run EXPLAIN ANALYZE to verify improvement
Remove explanations of concepts Claude already knows (what B-Tree is, what SELECT * does, what N+1 means) and replace with just the actionable fix patterns
Add verification steps after batch operations and index creation (e.g., confirm index is being used via EXPLAIN, check row counts after bulk updates)
| Dimension | Reasoning | Score |
|---|---|---|
Conciseness | The skill is extremely verbose at ~400+ lines. It explains concepts Claude already knows well (what B-Tree indexes are, what SELECT * does, what N+1 queries are, basic JOIN syntax). The 'When to Use This Skill' section is unnecessary padding. Many patterns are textbook SQL knowledge that doesn't need this level of explanation. | 1 / 3 |
Actionability | The skill provides fully executable SQL code throughout, with concrete before/after examples for each optimization pattern. Commands are copy-paste ready with specific PostgreSQL syntax, index creation statements, and monitoring queries. | 3 / 3 |
Workflow Clarity | While individual patterns are clear, there's no systematic workflow for diagnosing and fixing a slow query (e.g., 1. Run EXPLAIN ANALYZE, 2. Identify bottleneck, 3. Apply pattern, 4. Verify improvement). The batch operations section lacks validation/verification steps - no guidance on checking results after bulk updates or confirming index effectiveness after creation. | 2 / 3 |
Progressive Disclosure | The Resources section references external files appropriately, but the main content is a monolithic wall of text that should have much of its detail pushed into those referenced files. The core SKILL.md tries to be comprehensive rather than serving as an overview with pointers to detailed materials. | 2 / 3 |
Total | 8 / 12 Passed |
Validation
90%Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.
Validation — 10 / 11 Passed
Validation for skill structure
| Criteria | Description | Result |
|---|---|---|
skill_md_line_count | SKILL.md is long (510 lines); consider splitting into references/ and linking | Warning |
Total | 10 / 11 Passed | |
6e3d68c
Table of Contents
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.