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.

73

0.98x
Quality

61%

Does it follow best practices?

Impact

93%

0.98x

Average score across 3 eval scenarios

SecuritybySnyk

Passed

No findings from the security scan

Fix and improve this skill with Tessl

tessl review fix ./tests/ext_conformance/artifacts/agents-wshobson/developer-essentials/skills/sql-optimization-patterns/SKILL.md

The canonical home for this skill is sql-optimization-patterns in wshobson/agents

SKILL.md
Quality
Evals
Security

Quality

Content

40%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

The body is rich with executable SQL examples but reads as a generic SQL-optimization textbook: long on knowledge Claude already has, short on a sequenced diagnostic workflow with verification steps, and its progressive-disclosure layer is broken — all seven referenced bundle files are missing. Biggest wins are trimming known material into the (to-be-created) reference files and adding a validated optimize-and-recheck loop.

Suggestions

Trim or move content Claude already knows (index type definitions, avoid SELECT *, batch INSERT basics) — conciseness

Add a numbered optimization workflow (find slow queries via pg_stat_statements → EXPLAIN ANALYZE → apply one fix → re-run EXPLAIN to verify improvement) with explicit validation checkpoints — workflow_clarity

Fix the broken bundle: create the seven referenced files (references/, assets/, scripts/ all absent) and move the database-specific detail there, or remove the Resources section — progressive_disclosure

DimensionReasoningScore

Conciseness

At 509 lines the body extensively covers concepts Claude already knows — index type definitions ('B-Tree: Default, good for equality and range queries'), 'Avoid SELECT *', batch INSERT VALUES syntax, and basic EXPLAIN semantics — with several padded bad/good/better triplets for the same idea. Not 1 because the material is organized and mostly relevant rather than introductory filler; not 3 because large sections are pure restatement of standard database knowledge.

2 / 5

Actionability

Concrete, mostly copy-paste-ready SQL throughout — 'EXPLAIN (ANALYZE, BUFFERS, VERBOSE)', 'CREATE INDEX idx_users_cursor ON users(created_at DESC, id DESC)', the pg_stat_statements monitoring queries. Not 5 because of minor gaps: the Python batch example uses 'WHERE user_id IN (?)' with a list (not executable as written) and 'WHERE id IN (1, 2, 3, 4, 5, ...)' contains a literal ellipsis.

4 / 5

Workflow Clarity

The body is a topic catalog (concepts → patterns → advanced → pitfalls), not a sequenced optimization process; there is no 'identify via pg_stat_statements → EXPLAIN ANALYZE → apply fix → re-verify' loop, and validation is absent despite this being a database-operation skill, which caps the score at 3 and the missing sequence pulls it to 2. Not 1 because the section ordering does loosely imply an approach (monitoring queries appear, EXPLAIN is introduced first).

2 / 5

Progressive Disclosure

The Resources section lists seven bundle paths ('references/postgres-optimization-guide.md', 'assets/index-strategy-checklist.md', 'scripts/analyze-slow-queries.sql', etc.), but none of these files exist in the bundle — every reference is dead. Combined with ~500 lines of reference-grade detail inlined in SKILL.md (material the missing files were meant to hold), navigation fails. Not 3 because the references are clearly signaled yet point to nothing, which is worse than unclear signaling; not 1 because the section structure itself is well organized.

2 / 5

Total

10

/

20

Passed

Description

83%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong description: it names three concrete capabilities and pairs them with an explicit, natural 'Use when...' trigger clause. Minor improvements possible by dropping the 'dramatically' hype word, adding common trigger synonyms (N+1, query plans, indexes), and narrowing the schema-design trigger to reduce overlap with schema-design skills.

DimensionReasoningScore

Specificity

Quotes 'Master SQL query optimization, indexing strategies, and EXPLAIN analysis' and 'eliminate slow queries' — several concrete, specific actions with only minor coverage gaps (no database-specific triggers). Not 5 because 'dramatically improve database performance' is promotional padding rather than a concrete capability; not 3 because it names more than 1-2 concrete actions.

4 / 5

Completeness

Explicitly answers both: what ('SQL query optimization, indexing strategies, and EXPLAIN analysis... eliminate slow queries') and when (a concrete 'Use when' clause with three trigger scenarios). Matches the anchor-5 example structure; not 4 because the when-clause is already explicit and specific.

5 / 5

Trigger Term Quality

'Use when debugging slow queries, designing database schemas, or optimizing application performance' contains natural phrases users would say. Not 5 because common variations are missing — users would also say 'add an index', 'N+1 queries', 'query plan', 'slow query log'; not 3 because the included terms are natural rather than jargon-only.

4 / 5

Distinctiveness Conflict Risk

The SQL performance niche with triggers like 'debugging slow queries' and 'EXPLAIN analysis' is mostly distinct. Not 5 because 'designing database schemas' is broad and overlaps with general schema-design or database-modeling skills; not 3 because the core triggers are clearly database-performance-specific.

4 / 5

Total

17

/

20

Passed

Validation

87%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 14 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

skill_md_line_count

SKILL.md is long (510 lines); consider splitting into references/ and linking

Warning

referenced_paths_exist

Referenced path issues: 7 missing

Warning

Total

14

/

16

Passed

Repository
Dicklesworthstone/pi_agent_rust
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.