database-schema-designer

database-schema-designer is a skill for Codex from bestagentkits/agency-skills. It costs 29 tokens per session (1,814 once invoked), scanned A, a copy of database-schema-designer, MIT.

A database design guide for turning product requirements into tables, relationships, constraints, migrations, data types, test data, and access rules.

In plain words
What is it for?
Use it to design schemas, draw entity-relationship diagrams, plan migrations, create application types and seed data, and support multi-tenant applications.
Why use it?
It helps teams create database structures that are consistent, secure, and easier to change as an application grows.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: positional $N argument.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { hashPassword } from '../src/lib/auth'.

Good fit Use it to design schemas, draw entity-relationship diagrams, plan migrations, create application types and seed data, and support multi-tenant applications.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/bestagentkits/agency-skills
agentmods
npx agentmods add skills/bestagentkits/agency-skills/database-schema-designer

Made for: Codex.

Wrote 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.

agentmods badge for database-schema-designer

README.md
[![agentmods](https://agentmods.dev/badge/skills/bestagentkits/agency-skills/database-schema-designer/github.svg)](https://agentmods.dev/skills/bestagentkits/agency-skills/database-schema-designer)
Your own site
<a href="https://agentmods.dev/skills/bestagentkits/agency-skills/database-schema-designer"><img src="https://agentmods.dev/badge/skills/bestagentkits/agency-skills/database-schema-designer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for database-schema-designer

Your own site · 80×15
<a href="https://agentmods.dev/skills/bestagentkits/agency-skills/database-schema-designer"><img src="https://agentmods.dev/badge/skills/bestagentkits/agency-skills/database-schema-designer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,814 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 86% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.01814
Opus 5 $0.00015 $0.00907
Sonnet 5 $0.00006 $0.00363
Haiku 4.5 $0.00003 $0.00181

Measured 7d ago against content hash 7f56c9b7b404, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

database-schema-designer 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 7d 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.

Origin

This is a copy

86% identical to database-schema-designer — 128 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/claude-skills/database-schema-designer/SKILL.md · 249 lines

How it starts

The opening of the file, as written. The whole thing — 249 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Database Schema Designer

Tier: POWERFUL
Category: Engineering
Domain: Data Architecture / Backend


Overview

Design relational database schemas from requirements and generate migrations, TypeScript/Python types, seed data, RLS policies, and indexes. Handles multi-tenancy, soft deletes, audit trails, versioning, and polymorphic associations.

Core Capabilities

  • Schema design — normalize requirements into tables, relationships, constraints
  • Migration generation — Drizzle, Prisma, TypeORM, Alembic
  • Type generation — TypeScript interfaces, Python dataclasses/Pydantic models
  • RLS policies — Row-Level Security for multi-tenant apps
  • Index strategy — composite indexes, partial indexes, covering indexes
  • Seed data — realistic test data generation
  • ERD generation — Mermaid diagram from schema

When to Use

  • Designing a new feature that needs database tables
  • Reviewing a schema for performance or normalization issues
  • Adding multi-tenancy to an existing schema
  • Generating TypeScript types from a Prisma schema
  • Planning a schema migration for a breaking change

Schema Design Process

Step 1: Requirements → Entities

Given requirements:

"Users can create projects. Each project has tasks. Tasks can have labels. Tasks can be assigned to users. We need a full audit trail."

Extract entities:

User, Project, Task, Label, TaskLabel (junction), TaskAssignment, AuditLog

Step 2: Identify Relationships

User 1──* Project         (owner)
Project 1──* Task
Task *──* Label            (via TaskLabel)
Task *──* User            (via TaskAssignment)
User 1──* AuditLog

Step 3: Add Cross-cutting Concerns

  • Multi-tenancy: add organization_id to all tenant-scoped tables
  • Soft deletes: add deleted_at TIMESTAMPTZ instead of hard deletes
  • Audit trail: add created_by, updated_by, created_at, updated_at
  • Versioning: add version INTEGER for optimistic locking

Full Schema Example (Task Management SaaS)

→ See references/full-schema-examples.md for details

Read the full file on GitHub · 249 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 7d ago First seen · 249 lines · 29 tokens per session scan A 7f56c9b7b404

Subscribe to this mod's changes

database-schema-designer is a skill published in the GitHub repository bestagentkits/agency-skills (11 stars, last pushed 2mo ago), licensed MIT. It adds 29 tokens to every session and 1,814 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to database-schema-designer, differing in 128 lines, and is treated as a copy.

Related

Other skills, from other repositories

supabase

Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies…

supabase/agent-skills · 185 tokens

supabase

Use this skill when developing applications with Supabase, running the Supabase CLI, designing migrations and RLS policies, testing database behavior, generating client types, deploying the official self-hosted Docker stack, or administering its Postgres, Auth, Storage, Realtime, Functions, API gateway, backups…

magnus919/agent-skills · 94 tokens

postgres-drizzle

Proactively apply when creating APIs, backends, or data models. Triggers on PostgreSQL, Postgres, Drizzle, drizzle-orm, drizzle-kit, database, schema, pgTable, tables, columns, indexes, queries, migrations, ORM, relations, relational queries, joins, transactions, SQL, connection pooling, PgBouncer, N+1, JSONB, RLS…

ccheney/robust-skills · 119 tokens

golang-database

This skill should be used when the user asks to "configure a Go database connection pool", "use database/sql in Go", "set up pgxpool", "why is my Go app running out of connections", "scan rows into a Go struct", "handle sql.ErrNoRows", or writes Go code that opens, pools, queries, or scans a PostgreSQL/MySQL…

shennawardana23/skillme · 160 tokens

stack-supabase

Supabase platform knowledge overlay for the ETYB team. Loads when work involves the Supabase ecosystem — Postgres (Supabase-hosted), Row-Level Security (RLS), Supabase Auth, Storage, Realtime, Edge Functions, Database Webhooks, Database Functions, Supavisor pooler, pgvector, pgcron, pgnet, pggraphql, pgjsonschema…

e-t-y-b/etyb-skills · 263 tokens

backend-setup-stack

Bootstraps a local Node.js backend development stack with Docker, PostgreSQL, and an ORM (Prisma or Sequelize). Use this skill whenever the user wants to: initialize a new backend project, set up a Dockerized database locally, wire up an ORM with automated migrations, scaffold an Express server with a health endpoint…

WESTsyre21/setup-backend-stack · 155 tokens