CtrlK
BlogDocsLog inGet started
Tessl Logo

postgres-patterns

PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices. Use when designing PostgreSQL schemas, indexes, or RLS policies, or when a query is too slow.

68

Quality

83%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

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

An exemplarily lean and fully executable quick reference whose only meaningful gap is the absence of validation/verification steps for the database changes it recommends, which caps workflow clarity. Structure is good but the full content sits in a single inline file rather than splitting deep material into references.

Suggestions

Add verification steps to the index and policy patterns: e.g., verify index usage with `EXPLAIN ANALYZE` before/after creating an index, and test RLS policies by querying as a non-owner role.

Add a validation checkpoint to the Configuration Template (e.g., check `pg_settings` or current connection counts after `ALTER SYSTEM` + `pg_reload_conf()`) since those are system-wide changes.

Move the Anti-Pattern Detection queries and Configuration Template into a references/ file, keeping SKILL.md as a lean overview that points to them.

DimensionReasoningScore

Conciseness

The body is a lean quick reference of tables and code snippets with terse instructive comments ("Wrap in SELECT!", "O(1) vs OFFSET which is O(n)") and no re-explanation of concepts Claude already knows; every section earns its place.

5 / 5

Actionability

Every pattern is copy-paste-ready executable SQL (GIN/BRIN/composite indexes, `ON CONFLICT` upsert, `FOR UPDATE SKIP LOCKED` queue, cursor pagination, pg_stat_statements diagnostics, ALTER SYSTEM config), covering the common database cases.

5 / 5

Workflow Clarity

Database operations are an explicitly feedback-loop-critical context, and the skill recommends consequential changes (CREATE INDEX, ALTER SYSTEM, CREATE POLICY) with no verification steps such as EXPLAIN ANALYZE after indexing, testing RLS policies under a role, or confirming config changes. The rubric's destructive/batch-operation cap applies despite the skill being a single-purpose reference.

3 / 5

Progressive Disclosure

Well-organized sections with clear headers and a pointer to the `database-reviewer` agent for detail, but at ~140 lines everything (anti-pattern queries, configuration template) is inlined in one file with no reference split; the under-50-lines exception for a top score does not apply.

4 / 5

Total

17

/

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 with an explicit and concrete 'Use when' clause covering design and troubleshooting triggers. Its weaknesses are the absence of common synonyms (Postgres, SQL, database) and capability phrasing that names domains rather than actions.

DimensionReasoningScore

Specificity

The description lists several specific capability areas ("query optimization, schema design, indexing, and security"), which goes beyond naming the domain, but these are capability areas rather than concrete actions like 'optimize' or 'design', leaving minor coverage gaps.

4 / 5

Completeness

Both parts are explicit: the 'what' ("PostgreSQL database patterns for query optimization, schema design, indexing, and security") and a concrete 'when' clause ("Use when designing PostgreSQL schemas, indexes, or RLS policies, or when a query is too slow") with natural trigger phrases.

5 / 5

Trigger Term Quality

Good natural keyword coverage ("PostgreSQL", "schema", "indexes", "RLS policies", "too slow") but misses common synonyms a user would say such as "Postgres", "SQL", "database", or ".sql".

4 / 5

Distinctiveness Conflict Risk

"PostgreSQL", "Supabase", and "RLS policies" anchor a clear niche, but the generic "when a query is too slow" trigger carries minor overlap risk with general SQL, database, or backend-performance skills.

4 / 5

Total

17

/

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

metadata_version

'metadata.version' is missing

Warning

Total

15

/

16

Passed

Repository
affaan-m/ECC
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.