CtrlK
BlogDocsLog inGet started
Tessl Logo

write-query

Write optimized SQL for your dialect with best practices. Use when translating a natural-language data need into SQL, building a multi-CTE query with joins and aggregations, optimizing a query against a large partitioned table, or getting dialect-specific syntax for Snowflake, BigQuery, Postgres, etc.

66

Quality

83%

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

SKILL.md
Quality
Evals
Security

Quality

Content

75%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.

A well-organized, concise workflow-oriented skill body with concrete best practices and good example invocations. Weaknesses are the missing validation step for generated SQL, the dangling reference to an external `sql-queries` skill in place of a real bundle reference, and mild redundancy between the Tips section and the workflow.

Suggestions

Add a validation checkpoint after writing the query — e.g., 'If a warehouse is connected, dry-run the query (or EXPLAIN it) and fix errors before presenting' — which would also address the deferred-correctness gap in step 6.

Replace '(see `sql-queries` skill for details)' with an actual reference path in this skill's bundle (e.g., references/dialects.md) or inline the key dialect differences, so dialect-specific guidance is verifiable and one level deep.

Trim the Tips section or fold it into the workflow (it repeats step 2's dialect guidance), and drop the cloud-provider parentheticals from the dialect list to save tokens.

DimensionReasoningScore

Conciseness

The body is lean bullet-style guidance that assumes Claude's competence ("Never use `SELECT *`", "Prefer `EXISTS` over `IN`") without explaining what SQL or a CTE is. Not 5 because the 10-item dialect list with cloud-provider parentheticals and the Tips section partially restate workflow guidance ("Mention your SQL dialect upfront" duplicates step 2), adding tokens that could be trimmed. Not 3 because padding is minor and there is no concept-teaching.

4 / 5

Actionability

Concrete, executable guidance throughout: a 6-step workflow, specific best-practice rules, and three realistic example invocations ("Count of orders by status for the last 30 days", cohort retention, 500M-row partitioned table). Not 5 because dialect-specific syntax — a core promise — is deferred without a path ("see `sql-queries` skill for details", which is not a bundle file), and no illustrative SQL snippet grounds the expected output format. Not 3 because the guidance is specific and directly executable, not high-level hints.

4 / 5

Workflow Clarity

A clear, well-sequenced 6-step process (understand request → determine dialect → discover schema → write → present → offer to execute) with a user-interaction checkpoint ("ask which they use") and an execution offer. Not 5 because there is no validation checkpoint on the produced SQL (e.g., dry-run/EXPLAIN against a connected warehouse, or re-reading the request against output columns) — validation is only implicit. Not 3 because the sequence is complete and explicit; the skill is also non-destructive, so the batch/destruction cap does not apply.

4 / 5

Progressive Disclosure

Good structure with clear section headers (Usage, Workflow, Examples, Tips) and appropriate inline length (~120 lines of overview-level guidance, no monolithic reference dump). Not 5 because no bundle files exist: dialect-specific detail is deferred to an unverifiable external `sql-queries` skill and a `../../CONNECTORS.md` path outside the bundle, rather than well-signaled one-level-deep references. Not 3 because the inline content is appropriately overview-level and navigation is easy.

4 / 5

Total

16

/

20

Passed

Description

87%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 with comprehensive concrete actions, explicit enumerated 'Use when' triggers, and good natural keyword coverage anchored by named SQL dialects. Its only flaw is second-person voice ("for your dialect"), which costs it the top specificity score.

DimensionReasoningScore

Specificity

"Write optimized SQL for your dialect with best practices" plus concrete actions ("translating a natural-language data need into SQL", "building a multi-CTE query with joins and aggregations", "optimizing a query against a large partitioned table", "getting dialect-specific syntax for Snowflake, BigQuery, Postgres") gives multiple specific, comprehensive actions (anchor 5), but the second-person phrasing "for your dialect" triggers the 1-point voice penalty, landing at 4. Not 3 because coverage is clearly comprehensive, not merely 1-2 actions.

4 / 5

Completeness

Explicitly answers both: what ("Write optimized SQL for your dialect with best practices") and when ("Use when translating... building... optimizing... or getting dialect-specific syntax"), with four concrete trigger phrases — a direct match for the anchor-5 example. Not 4 because the 'when' clause is fully explicit and enumerated, not merely present.

5 / 5

Trigger Term Quality

Natural trigger phrases users would actually say are well covered: "translating a natural-language data need into SQL", "multi-CTE query", "joins and aggregations", "optimizing a query against a large partitioned table", plus dialect names (Snowflake, BigQuery, Postgres). Not 5 because common synonyms like "database query", "write a SELECT", "Redshift/Databricks/MySQL", or "SQL dialect" variations are missing.

4 / 5

Distinctiveness Conflict Risk

Clear niche (SQL query authoring/optimization) with distinct triggers including named dialects ("Snowflake, BigQuery, Postgres") and specific scenarios ("multi-CTE query", "large partitioned table"), giving minimal conflict risk with adjacent data-analysis skills. Not 4 because the triggers are specific enough that wrong-skill triggering is unlikely.

5 / 5

Total

18

/

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

frontmatter_unknown_keys

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

Warning

relative_links

Relative link issues: 1 suspicious

Warning

Total

14

/

16

Passed

Repository
anthropics/knowledge-work-plugins
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.