Design a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features
Install with Tessl CLI
npx tessl i github:Dicklesworthstone/pi_agent_rust --skill postgresql-table-design69
Does it follow best practices?
If you maintain this skill, you can automatically optimize it using the tessl CLI to improve its score:
npx tessl skill review --optimize ./path/to/skillValidation for skill structure
Core data types and FK indexing
BIGINT IDENTITY PK
0%
83%
No SERIAL type
0%
100%
NUMERIC for price/money
100%
100%
No money type
100%
100%
TIMESTAMPTZ for timestamps
100%
100%
No plain TIMESTAMP
100%
100%
TEXT not VARCHAR
0%
100%
No VARCHAR/CHAR
0%
100%
FK indexes present
100%
100%
snake_case naming
100%
100%
NOT NULL on required fields
100%
100%
Status as TEXT + CHECK
0%
50%
Without context: $0.1995 · 46s · 10 turns · 59 in / 2,579 out tokens
With context: $0.4058 · 1m 48s · 15 turns · 13 in / 5,725 out tokens
Full-text search and JSONB design
TSVECTOR column
100%
100%
GIN index on tsvector
100%
100%
Language in to_tsvector
100%
100%
Language in to_tsquery
100%
100%
JSONB not JSON
100%
100%
GIN index on JSONB
0%
100%
TIMESTAMPTZ not TIMESTAMP
100%
100%
BIGINT IDENTITY PK
0%
100%
No SERIAL type
0%
100%
BRIN or RANGE partition for dates
100%
0%
UNLOGGED staging table
100%
100%
Without context: $0.2963 · 1m 34s · 10 turns · 59 in / 5,409 out tokens
With context: $0.5318 · 1m 54s · 21 turns · 522 in / 5,634 out tokens
Range types, exclusion constraints, update-heavy design
tstzrange for time slots
100%
100%
GiST index on range
100%
100%
EXCLUDE for double-booking
100%
100%
Array + GIN for tags
100%
100%
Junction table for teams
100%
100%
fillfactor on reservations
100%
100%
Hot/cold column separation
100%
100%
ENUM for stable values
100%
0%
TEXT+CHECK for reservation status
0%
100%
BIGINT IDENTITY PKs
0%
100%
FK indexes present
100%
100%
Without context: $0.2864 · 1m 20s · 12 turns · 12 in / 4,387 out tokens
With context: $0.6387 · 2m 35s · 22 turns · 267 in / 7,944 out tokens
Table of Contents
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.