CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

optimize-query

Use this procedure when a user reports slow queries or asks to optimize a repository query. It calls for examining query plans before index changes, matching indexes to real predicates, coordinating schema changes with migrations, and recording material before-and-after benchmarks.

Quality

79%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Low

Low-risk findings worth noting

Fix and improve this skill with Tessl

tessl review fix ./.cursor/skills/optimize-query/SKILL.md
SKILL.md
Quality
Evals
Security

Quality

Scored by GLM 5.3

Content

72%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 exceptionally concise and well-structured for a simple skill, but the method reads more like a checklist of principles than an executable procedure: no example commands for running EXPLAIN ANALYZE against repository code, and no explicit post-change verification loop despite involving database operations. Strengthening actionability and adding an explicit verify-after-change step are the highest-leverage fixes.

Suggestions

Make step 1 executable: show a concrete example of obtaining the query plan, e.g. a sample `EXPLAIN ANALYZE SELECT ...` invocation or how to extract and EXPLAIN the SQL issued by the repository layer, and name what '(or equivalent)' means per datastore.

Add an explicit verification step after the change — re-run EXPLAIN ANALYZE, compare against the recorded baseline, and state what to do if the index did not help (e.g., revert the migration) — instead of the conditional 'Record before/after ... when material'.

Sharpen step 2 into actionable guidance: give a rule of thumb or short example of deriving an index from the actual predicates of a captured query plan rather than the abstract 'Prefer indexes matched to real predicates'.

DimensionReasoningScore

Conciseness

The ~12-line body is lean and assumes Claude's competence: no explaining what EXPLAIN ANALYZE or N+1 is, no padding, every step carries information ("Get EXPLAIN ANALYZE (or equivalent) before changing indexes", "Record before/after in /docs/benchmarks when material"). It matches the 'every token earns its place' anchor; the only near-redundancy is the Role line echoed from frontmatter, which is too minor to drop it to 4.

5 / 5

Actionability

Steps reference concrete artifacts (EXPLAIN ANALYZE, generate-flyway, /docs/benchmarks) but provide no executable commands or examples — how to actually capture EXPLAIN ANALYZE output from repository/ORM code is unspecified, "(or equivalent)" is undefined, and "Prefer indexes matched to real predicates" is a principle rather than an executable instruction. This matches the 'some concrete guidance but incomplete, missing key details' anchor: below 4 because nothing is copy-paste executable, above 2 because named tools and paths give real direction.

3 / 5

Workflow Clarity

The 5-step Method is clearly sequenced, but validation is implicit at best: step 1 establishes a baseline and step 4 says "Record before/after ... when material", with no explicit post-change re-run of EXPLAIN ANALYZE, no comparison threshold, and no recovery path if performance does not improve. Since this involves database operations (index and schema changes), the rubric's feedback-loop guidance caps workflow clarity at 3 for missing explicit verification loops; it is not 2 because the sequence itself is well-ordered with an implicit measure-before/measure-after shape.

3 / 5

Progressive Disclosure

This is a simple skill under 50 lines with no references/, scripts/, or assets/ directories and no content that warrants external files; the body is well-organized with a title, an explicit Trigger line, and a single ## Method section. Per the rubric's simple-skill guidance, that organization merits the top score.

5 / 5

Total

16

/

20

Passed

Description

78%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 tied to specific tools (EXPLAIN ANALYZE, indexing) and an explicit 'Use when' clause with natural trigger phrases (slow queries, N+1). The main gap is breadth of capability coverage and trigger synonyms, and slight overlap risk with adjacent database skills.

DimensionReasoningScore

Specificity

"Analyze and improve SQL/repository queries using EXPLAIN ANALYZE and indexing strategy" names the domain plus two concrete actions (analyze via EXPLAIN ANALYZE, improve via indexing), matching the anchor for 1-2 concrete actions without comprehensive coverage. It is below 4 because it does not list several specific actions (no mention of migration generation, benchmarking, or other optimization techniques beyond indexing), and above 2 because the actions named are concrete rather than generic.

3 / 5

Completeness

The description explicitly answers both: what — "Analyze and improve SQL/repository queries using EXPLAIN ANALYZE and indexing strategy" — and when — "Use when queries are slow or N+1 is suspected", with two concrete trigger phrases. Both clauses are explicit and specific, matching the top anchor; a 4 would require the 'when' to be less explicit or the triggers less concrete, which is not the case here.

5 / 5

Trigger Term Quality

"Use when queries are slow or N+1 is suspected" plus "SQL/repository queries" gives good coverage of natural phrases a developer would actually say ("slow queries", "N+1"). A few natural terms are missing (e.g., "optimize", "database performance", "query plan"), keeping it below the comprehensive-synonym coverage of a 5 but clearly above the sparse keyword coverage of a 3.

4 / 5

Distinctiveness Conflict Risk

Terms like "EXPLAIN ANALYZE", "N+1", and "repository queries" carve out a clear query-optimization niche with distinct triggers. There is minor overlap risk with closely related database/ORM administration skills (a generic "database" or "schema migration" skill could also trigger on SQL mentions), which keeps it just below the minimal-conflict 5 anchor.

4 / 5

Total

16

/

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

allowed_tools_field

'allowed-tools' contains unusual tool name(s)

Warning

frontmatter_unknown_keys

Unknown frontmatter key(s) found; consider removing or moving to metadata

Warning

Total

14

/

16

Passed

Repository

chandrakanthbalaraman/spring-boot-microservices

Path

.cursor/skills/optimize-query/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.