sql-schema-designer

sql-schema-designer is a skill for Claude Code, Codex from JayRHa/AgentSkills. It costs 102 tokens per session (2,032 once invoked), scanned A, original, MIT.

A design method for relational SQL databases: it turns requirements into tables, relationships, keys, rules, indexes, and runnable database definitions.

In plain words
What is it for?
Use it to model entities, normalise tables, create PostgreSQL or other SQL schemas, and decide where indexes or deliberate denormalisation are needed.
Why use it?
It helps prevent duplicated or inconsistent data and makes relationships between stored records explicit.

Skill for Claude CodeCodex

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/jayrha/agentskills/sql-schema-designer
Any agent
npx skills add JayRHa/AgentSkills --skill sql-schema-designer
Clone the repo
git clone --depth 1 https://github.com/JayRHa/AgentSkills

Made for: Claude Code, 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 sql-schema-designer

README.md
[![agentmods](https://agentmods.dev/badge/skills/jayrha/agentskills/sql-schema-designer.svg)](https://agentmods.dev/skills/jayrha/agentskills/sql-schema-designer)
Your own site
<a href="https://agentmods.dev/skills/jayrha/agentskills/sql-schema-designer"><img src="https://agentmods.dev/badge/skills/jayrha/agentskills/sql-schema-designer.svg" alt="Measured on agentmods" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,032 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.00102 $0.02032
Opus 5 $0.00051 $0.01016
Sonnet 5 $0.00020 $0.00406
Haiku 4.5 $0.00010 $0.00203

Measured yesterday against content hash 38370a6e86e6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sql-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 yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/validate_schema.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

sql-schema-designer/SKILL.md · 145 lines

How it starts

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

SQL Schema Designer

Overview

Turn fuzzy requirements into a clean, normalized relational schema with correct keys, constraints, indexes, and justified denormalization. Output is runnable DDL plus a documented data model.

Keywords: database schema design, normalization, 1NF 2NF 3NF BCNF, primary key, foreign key, referential integrity, ON DELETE CASCADE, CHECK constraint, unique constraint, surrogate vs natural key, composite key, index, composite index, covering index, denormalization, ER diagram, entity relationship, data modeling, DDL, CREATE TABLE, PostgreSQL, MySQL, SQLite, SQL Server, junction table, many-to-many.

Workflow

  1. Clarify scope and engine. Identify the target database engine (PostgreSQL, MySQL, SQLite, SQL Server) because types and identity syntax differ — see references/data-types-and-constraints.md. Ask about expected scale, read/write ratio, and whether reporting queries matter.

  2. Extract entities and attributes. From the domain, list nouns that have independent existence (customer, product, order). Each becomes a table. List the attributes (facts) each must store. Mark attributes that are required vs optional.

  3. Define relationships and cardinality. For every pair of related entities decide one-to-one, one-to-many, or many-to-many.

    • One-to-many: foreign key on the "many" side.
    • Many-to-many: create a junction table with both FKs (its PK is usually the composite of both, or a surrogate plus a UNIQUE on the pair).
    • One-to-one: FK + UNIQUE on the dependent side, or share a PK.
  4. Choose keys. Pick a primary key per table.

    • Prefer a surrogate key (auto-increment / identity / UUID) for stability when natural keys are large, mutable, or composite.
    • Always also declare a UNIQUE constraint on the real natural key (email, SKU, ISBN) to preserve business integrity.
    • Use composite natural PKs for pure junction tables when no surrogate is needed.
  5. Normalize to 3NF. Apply 1NF -> 2NF -> 3NF, removing partial and transitive dependencies. Escalate to BCNF only when a concrete anomaly remains. Use the decomposition checklist in references/normalization.md.

Read the full file on GitHub · 145 lines

Files

What ships with it

5 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. yesterday First seen · 145 lines · 102 tokens per session scan A 38370a6e86e6

Subscribe to this mod's changes

sql-schema-designer is a skill published in the GitHub repository JayRHa/AgentSkills (4 stars, last pushed 1mo ago), licensed MIT. It adds 102 tokens to every session and 2,032 once invoked, about $0.0005 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-09-03.