Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add kazdenc/builder-skills --skill db-schemagit clone --depth 1 https://github.com/kazdenc/builder-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/kazdenc/builder-skills/db-schema)<a href="https://agentmods.dev/skills/kazdenc/builder-skills/db-schema"><img src="https://agentmods.dev/badge/skills/kazdenc/builder-skills/db-schema.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00061 | $0.01942 |
| Opus 5 | $0.00030 | $0.00971 |
| Sonnet 5 | $0.00012 | $0.00388 |
| Haiku 4.5 | $0.00006 | $0.00194 |
Grade A, and why
db-schema scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 214 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Database Schema Design
Design a Postgres database schema from product requirements. If target is provided, scope to that feature. Otherwise, ask the user what they're building.
Step 1: Identify Entities and Relationships
Read the requirements (PRD, user stories, or conversation). Extract:
- Nouns = candidate tables (users, projects, comments, invoices)
- Verbs = candidate relationships (creates, belongs to, has many)
- Adjectives/states = candidate columns or enums (active, draft, published)
Ask clarifying questions if the requirements are ambiguous. Don't guess at business logic.
Step 2: Design Tables
Follow these conventions on every table:
| Convention | Rule | Example |
|---|---|---|
| Table names | snake_case, plural |
user_profiles, org_members |
| Column names | snake_case |
first_name, created_at |
| Primary keys | uuid, auto-generated |
id uuid default gen_random_uuid() primary key |
| Timestamps | On every table, non-nullable | created_at timestamptz default now() not null |
| Updated timestamp | On every table | updated_at timestamptz default now() not null |
| Foreign keys | Named explicitly, with on delete |
user_id uuid references users(id) on delete cascade |
| Soft deletes | Use deleted_at timestamptz when needed |
Only when business requires undo/recovery |
| Booleans | Prefix with is_ or has_ |
is_active, has_verified_email |
Postgres Type Recommendations
| Data | Use | Don't use | Why |
|---|---|---|---|
| Identifiers | uuid |
serial, integer |
Non-sequential, safe to expose, no collision across tables |
| Timestamps | timestamptz |
timestamp |
Always store timezone-aware. Convert on display. |
| Money | numeric(12,2) or bigint (cents) |
float, real |
Floating point causes rounding errors |
text with check constraint |
varchar(255) |
text is faster in Postgres. Constrain with check. |
|
| Short strings | text |
varchar(n) |
Postgres text has no performance penalty. Use check(length(col) <= n) if needed. |
| Status/enum | text with check, or Postgres enum |
Magic integers | check (status in ('draft','published','archived')) |
| JSON data | jsonb |
json |
jsonb is indexable and more efficient |
| IP addresses | inet |
text |
Native type supports operations |
| Tags/arrays | text[] or junction table |
CSV in text column | Arrays for simple cases, junction table for queryable tags |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 214 lines · 61 tokens per session scan A a8e8fd4ecdcc
db-schema is a skill published in the GitHub repository kazdenc/builder-skills (45 stars, last pushed 6mo ago), licensed MIT. It adds 61 tokens to every session and 1,942 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
alembic-migration
Create, review, and apply database schema changes with Alembic. Use whenever a SQLAlchemy model is added or changed, a column/index/constraint needs to change, or a data backfill is required — anything that alters the PostgreSQL schema.
postgres-semantic-search
PostgreSQL-based semantic and hybrid search with pgvector and ParadeDB. Use when implementing vector search, semantic search, hybrid search, or full-text search in PostgreSQL. Covers pgvector indexing, hybrid FTS/BM25 + RRF, ParadeDB, reranking, halfvec, multilingual search, query translation, and domain evals.…
tuturuuu-database
Change Tuturuuu migrations, RLS, protected-table access, storage policies, and generated database types.
supabase
Use when doing ANY task involving Supabase: Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues, supabase-js, @supabase/ssr, RLS, schema migrations, CLI, MCP server. Includes security checklist.
supabase-postgres-best-practices
Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.
migration-start
Begin a zero-downtime schema migration using pgroll.