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 terms like 'application performance' are broad enough to potentially conflict with other skills. The use of 'Master' as a leading verb and 'dramatically improve' are slightly promotional but don't significantly detract.

Suggestions

Replace topic-area phrases with more concrete actions, e.g., 'Rewrites slow SQL queries, recommends index creation, interprets EXPLAIN/EXPLAIN ANALYZE output, and identifies missing indexes or full table scans.'

Narrow 'optimizing application performance' to something more distinct like 'optimizing SQL-layer performance' to reduce overlap with general application performance skills.

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 would 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.

The skill provides excellent, executable SQL examples with clear bad/good pattern comparisons, making it highly actionable. However, it is far too verbose for a skill file—it explains many concepts Claude already knows (index types, join methods, basic SQL best practices) and dumps everything into a single monolithic document. It would benefit greatly from aggressive trimming and splitting into focused sub-files.

Suggestions

Cut 60%+ of the content: remove explanations of concepts Claude already knows (what Seq Scan means, what B-Tree indexes are, basic best practices like 'use appropriate data types') and keep only the actionable patterns and code.

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

Split into sub-files: keep SKILL.md as a concise overview with links to separate files like INDEXING.md, QUERY_PATTERNS.md, MONITORING.md, and ADVANCED.md (materialized views, partitioning).

Remove the 'When to Use This Skill' section entirely—it's redundant with the skill description and wastes tokens listing obvious use cases.

DimensionReasoningScore

Conciseness

The skill is extremely verbose at ~400+ lines, covering topics Claude already knows well (SQL optimization is core knowledge). The 'When to Use This Skill' list, 'Core Concepts' explanations of what Seq Scan and Hash Join mean, and 'Best Practices' bullet points like 'Use Appropriate Data Types' are all things Claude inherently understands. Much of this could be cut by 60-70% without losing actionable value.

1 / 3

Actionability

The skill provides fully executable SQL and Python code examples throughout. Every pattern includes concrete bad/good comparisons with copy-paste ready queries, index creation statements, and monitoring queries.

3 / 3

Workflow Clarity

While individual patterns are clearly presented with bad/good comparisons, there's no overarching workflow for diagnosing and fixing a slow query (e.g., run EXPLAIN → identify bottleneck → apply pattern → verify improvement). The patterns are listed but not sequenced into a diagnostic process with validation checkpoints.

2 / 3

Progressive Disclosure

This is a monolithic wall of text with everything inline. At this length (~400+ lines), content like advanced techniques (materialized views, partitioning), monitoring queries, and detailed index type explanations should be split into separate referenced files. There are no references to external files for deeper dives.

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.