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.
58
66%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./plugins/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. The main weaknesses are slightly vague capability descriptions (could list more concrete actions) and some overlap risk with broader database or performance skills due to terms like 'optimizing application performance'. The use of 'dramatically improve' is unnecessary fluff that doesn't aid skill selection.
Suggestions
Replace vague fluff like 'dramatically improve' with additional concrete actions such as 'rewrite subqueries, recommend composite indexes, analyze execution plans'.
Narrow 'optimizing application performance' to something more specific like 'optimizing SQL-layer performance' to reduce conflict risk with general application performance skills.
| Dimension | Reasoning | Score |
|---|---|---|
Specificity | Names the domain (SQL/database performance) and some actions (query optimization, indexing strategies, EXPLAIN analysis), but uses somewhat broad terms rather than listing multiple concrete discrete actions like 'rewrite subqueries', 'add composite indexes', 'analyze execution plans'. | 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 keywords users would say: 'slow queries', 'SQL query optimization', 'indexing', 'EXPLAIN', 'database performance', '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 or application profiling skills. The core focus on query optimization and EXPLAIN analysis helps, but 'optimizing application performance' is broad enough to cause conflicts. | 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.
The skill provides comprehensive, executable SQL optimization guidance with good code examples, but is significantly over-verbose for Claude's existing knowledge level — much of the content covers well-known SQL concepts and anti-patterns. It lacks a clear diagnostic workflow with validation steps, and the content organization could benefit from moving reference material (monitoring queries, index type catalog) into separate files.
Suggestions
Cut 50%+ of explanatory text — remove descriptions of what EXPLAIN metrics mean, what SELECT * does, and other basic SQL concepts Claude already knows. Focus on non-obvious patterns, project-specific conventions, or unusual edge cases.
Add a clear diagnostic workflow: EXPLAIN ANALYZE → identify bottleneck type → apply specific fix → re-run EXPLAIN ANALYZE → verify improvement, with explicit validation checkpoints.
Move the monitoring queries, index type catalog, and common pitfalls into separate reference files (e.g., references/monitoring.md, references/index-types.md) and link from the main skill.
Remove the 'When to Use This Skill' section entirely — it adds no actionable value and the description already covers this.
| Dimension | Reasoning | Score |
|---|---|---|
Conciseness | The skill is very verbose, explaining many concepts Claude already knows well (what EXPLAIN is, what different join types mean, what SELECT * does, basic SQL optimization). The 'When to Use This Skill' section lists 8 bullet points that are largely redundant. The 'Key Metrics to Watch' section explains basic EXPLAIN output concepts. The 'Common Pitfalls' section lists well-known SQL anti-patterns with brief explanations Claude would already know. Much of this content is textbook-level SQL knowledge that doesn't earn its token cost. | 1 / 3 |
Actionability | The skill provides fully executable SQL code throughout — EXPLAIN commands, CREATE INDEX statements, query optimization examples with before/after patterns, monitoring queries using pg_stat_statements and pg_stat_user_tables. All code is copy-paste ready and specific to PostgreSQL. | 3 / 3 |
Workflow Clarity | While individual optimization patterns are clear, there's no systematic workflow for diagnosing and fixing a slow query (e.g., run EXPLAIN → identify bottleneck → apply fix → verify improvement). The content presents patterns in parallel rather than as a sequenced diagnostic process. There are no validation checkpoints or feedback loops for verifying that an optimization actually improved performance. | 2 / 3 |
Progressive Disclosure | There is a reference to 'references/details.md' for detailed patterns, but no bundle files are provided to verify this exists. The main file contains a large amount of inline content (monitoring queries, best practices, common pitfalls, full index type explanations) that could be split into reference files. The structure has sections but the content is front-loaded rather than progressively disclosed. | 2 / 3 |
Total | 8 / 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.
Validation — 11 / 11 Passed
Validation for skill structure
No warnings or errors.
cf6059d
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.