CtrlK
BlogDocsLog inGet started
Tessl Logo

sql-patterns

Quick reference for common SQL patterns, CTEs, window functions, and indexing strategies. Triggers on: sql patterns, cte example, window functions, sql join, index strategy, pagination sql.

90

1.00x
Quality

86%

Does it follow best practices?

Impact

100%

1.00x

Average score across 3 eval scenarios

SecuritybySnyk

Passed

No known issues

SKILL.md
Quality
Evals
Security

Evaluation results

100%

Daily Sales Performance Report

Window functions and sales trend analysis

Criteria
Without context
With context

LAG for prior day

100%

100%

LAG with PARTITION BY

100%

100%

RANK present

100%

100%

DENSE_RANK present

100%

100%

Both rank functions used

100%

100%

SUM OVER for running total

100%

100%

AVG OVER for moving average

100%

100%

Moving average window frame

100%

100%

No SELECT *

100%

100%

PARTITION BY category

100%

100%

Notes file present

100%

100%

100%

Product Catalog Query Audit

Pagination strategy and anti-pattern avoidance

Criteria
Without context
With context

SELECT * removed

100%

100%

Keyset pagination used

100%

100%

NOT IN replaced

100%

100%

Date function removed

100%

100%

N+1 fixed

100%

100%

B-tree for range/sort

100%

100%

Hash for equality

100%

100%

GIN for arrays

100%

100%

GIN for JSONB

100%

100%

Covering index

100%

100%

Review document present

100%

100%

100%

User Engagement Summary Report

Chained CTEs and JOIN patterns

Criteria
Without context
With context

Multiple CTEs used

100%

100%

CTEs are chained

100%

100%

LEFT JOIN for all users

100%

100%

COALESCE for NULL counts

100%

100%

No SELECT *

100%

100%

Date range not function-wrapped

100%

100%

Dormant users identified

100%

100%

NOT IN avoided

100%

100%

Recently active flag

100%

100%

Notes file present

100%

100%

Repository
NeverSight/skills_feed
Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

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.