database-design

database-design is a skill for Claude Code, Codex from srstomp/pokayokay. It costs 58 tokens per session (428 once invoked), scanned A, original, MIT.

A database-design guide for planning how application data is stored in relational databases such as PostgreSQL, MySQL, and SQLite, document databases such as MongoDB, and projects using ORMs.

In plain words
What is it for?
For designing schemas, reviewing data models, planning safe migrations, improving slow queries, and choosing patterns for Prisma, Drizzle, or TypeORM.
Why use it?
It helps avoid disorganized data, unsafe database changes, and slow queries by covering schema structure, indexes, migrations, and query planning.

Skill for Claude CodeCodex

Part of the pokayokay plugin — 17 skills, 23 commands, 14 agents, 4 hooks, 1 MCP server shipped together

Install

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.

agentmods
npx agentmods add skills/srstomp/pokayokay/database-design
Any agent
npx skills add srstomp/pokayokay --skill database-design
Clone the repo
git clone --depth 1 https://github.com/srstomp/pokayokay

Made for: Claude Code, Codex.

Or install pokayokay, the plugin that ships this one along with the rest of its 17 skills, 23 commands, 14 agents, 4 hooks, 1 MCP server.

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-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/srstomp/pokayokay/database-design.svg)](https://agentmods.dev/skills/srstomp/pokayokay/database-design)
Your own site
<a href="https://agentmods.dev/skills/srstomp/pokayokay/database-design"><img src="https://agentmods.dev/badge/skills/srstomp/pokayokay/database-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 428 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00058 $0.00428
Opus 5 $0.00029 $0.00214
Sonnet 5 $0.00012 $0.00086
Haiku 4.5 $0.00006 $0.00043

Measured 3d ago against content hash c52cb917bb29, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

database-design 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 3d 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.

plugins/pokayokay/skills/database-design/SKILL.md · 39 lines

What it actually says

Database Design

Design efficient, maintainable database schemas with safe migration strategies.

Key Principles

  • Start from requirements: identify entities, attributes, and relationships first
  • Normalize for data integrity, denormalize selectively for read performance
  • Design indexes based on actual query patterns, not guesses
  • Migrations must be reversible and safe for zero-downtime deployments
  • Choose the right ORM — Prisma for type safety, Drizzle for SQL-close, TypeORM for enterprise

Quick Start Checklist

  1. Identify entities and relationships from requirements
  2. Design normalized schema (3NF minimum)
  3. Add indexes for known query patterns
  4. Plan migration strategy (up + down)
  5. Choose ORM/query builder based on project needs
  6. Set up seed data for development

References

Reference Description
schema-patterns.md Normalization, relationships, naming conventions
index-design.md Index types, composite indexes, partial indexes
migration-strategies.md Safe migrations, zero-downtime, rollback
query-optimization.md EXPLAIN, N+1 queries, join strategies
postgresql.md PostgreSQL-specific features and patterns
prisma-patterns.md Prisma schema, relations, transactions
tdd-patterns.md Test-first patterns for migrations, constraints, factories
review-checklist.md Database design review checklist (schema, indexes, integrity)
Files

What ships with it

8 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. 3d ago First seen · 39 lines · 58 tokens per session scan A c52cb917bb29

Subscribe to this mod's changes

database-design is a skill published in the GitHub repository srstomp/pokayokay (9 stars, last pushed 2mo ago), licensed MIT. It adds 58 tokens to every session and 428 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-31.

Related

Other skills, from other repositories

data-analysis

Use this skill when the user uploads Excel (.xlsx/.xls) or CSV files and wants to perform data analysis, generate statistics, create summaries, pivot tables, SQL queries, or any form of structured data exploration. Supports multi-sheet Excel workbooks, aggregation, filtering, joins, and exporting results to…

bytedance/deer-flow · 69 tokens

cloudbase-document-database-web-sdk

Use CloudBase document database Web SDK only for confirmed NoSQL collection work. Query, create, update, and delete document data; if the task mentions PostgreSQL / CloudBase PG / app.rdb(), route to postgresql-development instead.

TencentCloudBase/CloudBase-AI-Toolkit · 55 tokens

cloudbase-document-database-in-wechat-miniprogram

Use CloudBase document database WeChat MiniProgram SDK to query, create, update, and delete data. Supports complex queries, pagination, aggregation, and geolocation queries.

TencentCloudBase/CloudBase-AI-Toolkit · 46 tokens

add-data-source

Guide the user to add a data source, connection, or API connector to a Canvas App via Power Apps Studio, then verify and continue. USE WHEN the user asks to add a data source, add a connection, add an API, add a connector, connect to SharePoint / Dataverse / SQL / Excel / OneDrive / Teams / Office 365, or any similar…

microsoft/power-platform-skills · 116 tokens

file-crdb-issue

Use when filing, creating, or reporting GitHub issues for CockroachDB. Use when asked to open a bug report, feature request, investigation issue, or performance inquiry. Also use when the user mentions wanting to track a problem, report a regression, or document unexpected behavior in CockroachDB.

cockroachdb/cockroach · 66 tokens

data-analysis

Analyze data using Python and SQL tools. Use when the user asks to process CSVs, Excel, Parquet, PDFs, Word docs, or PowerPoint files, query databases (PostgreSQL, MySQL, SQLite, SQL Server, BigQuery), create charts or visualizations, or perform any data analysis. For live dashboards or data apps, read the…

qaml-ai/camelAI · 80 tokens