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 for database performance scenarios. Its main weaknesses are slightly vague capability descriptions (topic areas rather than concrete actions) and some overlap risk with broader performance or database design skills due to terms like 'optimizing application performance'. The use of 'Master' as a leading verb and 'dramatically improve' are slightly promotional but the description is otherwise well-structured.
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 'optimizing application performance' trigger to something more specific 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 reasonably specific niche, terms like 'database schemas' and 'application performance' could overlap with general database design skills or broader performance optimization 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 with excellent, executable code examples covering a wide range of patterns. However, it is far too verbose for a skill file—it reads like a textbook chapter rather than a concise guide for Claude, explaining many concepts Claude already knows. It lacks an explicit optimization workflow with validation steps, which would be critical for systematically debugging slow queries.
Suggestions
Reduce content by 60-70%: Remove explanations of basic concepts (what indexes are, what N+1 means, what SELECT * does) and keep only the actionable patterns and code. Claude already understands these fundamentals.
Add an explicit optimization workflow with validation: e.g., '1. Run EXPLAIN ANALYZE on slow query → 2. Identify scan type → 3. Apply matching pattern → 4. Re-run EXPLAIN ANALYZE to verify improvement → 5. Only deploy if cost/time improved'
Move detailed patterns (partitioning, materialized views, batch operations) into separate referenced files and keep SKILL.md as a concise overview with quick-reference patterns.
Remove the 'When to Use This Skill' and 'Common Pitfalls' bullet lists—these are generic knowledge that wastes tokens without adding actionable guidance.
| 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 well-structured with bad/good/better progressions, there's no overarching optimization workflow (e.g., 'first run EXPLAIN, then identify bottleneck, then apply pattern X, then verify improvement'). For batch operations and destructive changes like VACUUM FULL, there are no validation checkpoints or feedback loops. | 2 / 3 |
Progressive Disclosure | The Resources section references external files appropriately, but the main content is a monolithic wall of text that could benefit from splitting advanced techniques, monitoring, and individual patterns into separate referenced files. The SKILL.md itself tries to be comprehensive rather than serving as an overview. | 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 | |
47823e3
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.