CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

sql-query-optimizer

The content explains how to identify SQL performance bottlenecks and improve queries with index recommendations, rewrites, and benchmarking examples. It also provides a checklist and sample code for detecting and monitoring slow queries.

Quality

77%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Medium

Suggest reviewing before use

Fix and improve this skill with Tessl

tessl review fix ./.agents/skills/sql-query-optimizer/SKILL.md
SKILL.md
Quality
Evals
Security

Quality

Scored by GLM 5.3

Content

57%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 content is rich with concrete, copy-paste-ready SQL examples and illustrative before/after plans, but it reads as a technique catalog rather than an operational workflow. Key gaps: no sequenced process with validation checkpoints for database operations, inlined scripts that should be real bundle files, and restatement of basic optimization concepts Claude already knows.

Suggestions

Add an explicit step-by-step workflow with validation checkpoints (e.g., 1. Run EXPLAIN ANALYZE, 2. Identify seq scans/missing indexes, 3. Apply rewrite or index, 4. Re-run EXPLAIN to verify improvement, 5. Benchmark before/after), since feedback loops are required for database operations.

Move the full benchmark-queries.ts and detect-slow-queries.ts code into actual scripts/ files and reference them from SKILL.md instead of inlining ~130 lines of TypeScript; keep only usage examples inline.

Trim content Claude already knows (the Avoid SELECT *, EXISTS vs IN, and function-on-indexed-column primers) and merge the duplicated 'Best Practices' list and two checklists into a single output checklist.

DimensionReasoningScore

Conciseness

The body is mostly code with little prose, but it explains well-known SQL basics ('Avoid SELECT *', 'Use EXISTS Instead of IN', functions on indexed columns) Claude already knows and duplicates content — the 'Best Practices' list restates the rewrite rules and there are two overlapping checklists — so it could be meaningfully tightened.

3 / 5

Actionability

Mostly concrete, executable SQL: EXPLAIN ANALYZE commands, CREATE INDEX statements, and before/after plans. Minor gaps keep it below 5: 'detect-slow-queries.ts' uses an undefined 'prisma' variable (missing import/client setup), and the labeled 'scripts/benchmark-queries.ts' and 'scripts/detect-slow-queries.ts' files do not exist in the bundle.

4 / 5

Workflow Clarity

Sections are organized topically rather than as a sequenced workflow; the EXPLAIN → identify issues → rewrite/index → benchmark order is only implied, and there are no explicit validation checkpoints or feedback loops (e.g., re-run EXPLAIN to confirm the index is used), which the rubric caps at 3 for database-operation skills.

3 / 5

Progressive Disclosure

Section headers are clear, but the ~290-line body inlines content that belongs in separate bundle files — full TypeScript benchmarking/detection scripts labeled 'scripts/*.ts' that don't actually exist, plus a long raw EXPLAIN plan dump — with no references/ or scripts/ directory present.

3 / 5

Total

13

/

20

Passed

Description

88%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 states concrete capabilities in third person and includes an explicit 'Use for' clause with natural trigger phrases. The only weaknesses are a few missing trigger synonyms and the slightly broad 'database performance' trigger that could collide with general database skills.

DimensionReasoningScore

Specificity

The description lists multiple concrete actions — 'EXPLAIN plans, index recommendations, query rewrites, and performance benchmarking' — giving comprehensive coverage of the skill's capabilities, matching the level-5 anchor rather than level 4's 'minor gaps in coverage'.

5 / 5

Completeness

It explicitly answers both what ('Analyzes and optimizes SQL queries using EXPLAIN plans, index recommendations, query rewrites, and performance benchmarking') and when ('Use for "query optimization", "slow queries", "database performance", or "EXPLAIN analysis"') with concrete trigger phrases, matching the level-5 anchor.

5 / 5

Trigger Term Quality

Triggers 'query optimization', 'slow queries', 'database performance', and 'EXPLAIN analysis' are natural phrases users would say, but common synonyms like 'speed up queries', 'SQL tuning', or 'index tuning' are missing, placing it at good-but-not-comprehensive coverage.

4 / 5

Distinctiveness Conflict Risk

SQL query optimization is a clear niche with mostly distinct triggers, but 'database performance' is broad enough to overlap with general database-administration or monitoring skills, indicating minor overlap risk consistent with level 4.

4 / 5

Total

18

/

20

Passed

Validation

93%

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

Validation — 15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

referenced_paths_exist

Referenced path issues: 2 possibly missing (scripts/benchmark-queries.ts, scripts/detect-slow-queries.ts)

Warning

Total

15

/

16

Passed

Repository

sathishssj3/Stereix-Engine

Path

.agents/skills/sql-query-optimizer/SKILL.md

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.