CtrlK
BlogDocsLog inGet started
Tessl Logo

postgres-patterns

用于查询优化、模式设计、索引和安全性的PostgreSQL数据库模式。基于Supabase最佳实践。

81

1.26x
Quality

75%

Does it follow best practices?

Impact

91%

1.26x

Average score across 3 eval scenarios

SecuritybySnyk

Passed

No findings from the security scan

Fix and improve this skill with Tessl

tessl review fix ./docs/zh-CN/skills/postgres-patterns/SKILL.md
SKILL.md
Quality
Evals
Security

Evaluation results

90%

13%

Database Schema for a Multi-Currency Marketplace

Data types and index selection

Criteria
Without this skill
With this skill

bigint for IDs

100%

100%

text for strings

70%

100%

timestamptz for timestamps

100%

100%

numeric for currency

100%

100%

boolean for flags

100%

100%

GIN for JSONB

100%

100%

BRIN for time-series

0%

100%

Partial index usage

100%

100%

Covering index INCLUDE

0%

0%

Composite index column order

100%

100%

95%

45%

Harden a Multi-Tenant SaaS PostgreSQL Instance

RLS policy optimization and security configuration

Criteria
Without this skill
With this skill

SELECT wraps auth.uid() in RLS

0%

100%

REVOKE public schema

50%

100%

max_connections set

0%

100%

work_mem set

50%

100%

idle_in_transaction timeout

50%

100%

statement_timeout set

50%

100%

pg_stat_statements enabled

100%

100%

pg_reload_conf called

100%

100%

RLS enabled on table

100%

100%

Correct timestamp type in schema

100%

100%

bigint for user/tenant IDs

0%

50%

90%

Optimize a Slow Product Catalog with Background Processing

Cursor pagination and queue processing

Criteria
Without this skill
With this skill

Cursor pagination pattern

100%

100%

No OFFSET in pagination

100%

100%

FOR UPDATE SKIP LOCKED

100%

100%

RETURNING clause in queue update

100%

100%

UPSERT ON CONFLICT

100%

100%

Composite index equality-first order

100%

100%

Covering index for listing query

0%

0%

Queue status index

100%

100%

Correct timestamp type

100%

100%

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