Agent skill

Relational Data Modeling

by pproenca in pproenca/dot-skills

Corrects the wrong defaults a model has when designing a relational schema — the DDL decisions an experienced engineer makes differently.

MITAuto-check passedDatabases

Install Relational Data Modeling

skills CLI
$ npx skills add pproenca/dot-skills --skill relational-data-modeling -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pproenca/dot-skills relational-data-modeling --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pproenca/dot-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.experimental/relational-data-modeling .claude/skills/relational-data-modeling && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
relational-data-modeling
GitHub stars
214
Token cost
~2.4k tokens
SKILL.md length
972 words
Files
34 (incl. references, assets)
Skills in repo
182
Repo updated
First seen
Licence
MIT

At a glance

Corrects the wrong defaults a model has when designing a relational schema — the DDL decisions an experienced engineer makes differently.

  • Works in 6 steps: Identity and Keys → Relationships and Cardinality → Constraints as the Model → …
  • Reviewing tables
  • SKILL.md covers When to Apply, Rule Categories, Quick Reference and How to Use, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Relational Data Modeling is an agent skill from pproenca/dot-skills. Corrects the wrong defaults a model has when designing a relational schema — the DDL decisions an experienced engineer makes differently. Use when creating or reviewing tables, migrations, ER models, or ORM schema definitions. Covers identity and keys (surrogate vs natural, identity vs serial, uuidv7, composite keys that make cross-tenant references impossible), relationships (polymorphic foreign keys the database cannot enforce, referential actions, unindexed FK columns, disjoint subtypes), invariants the engine…

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 36 other files, including reference files and assets (for example `AGENTS.md`, `assets/templates/_template.md` and `metadata.json`).

It sits in Databases, covering ORMs and data access, Database schema design and Database administration. The repository describes itself as: A collection of AI agent skills following the Agent Skills open format. The licence is MIT.

When your agent uses it

  • Reviewing tables
  • ORM schema definitions

Example prompts

  • “Use the relational-data-modeling skill to correct the wrong defaults a model has when designing a relational schema — the DDL decisions an…”
  • “/relational-data-modeling”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Identity and Keys
  2. Relationships and Cardinality
  3. Constraints as the Model
  4. Types and Domains
  5. Derived and Encoded Data
  6. Time, History and Lifecycle

What it can do on your machine

Read from SKILL.md and the folder at commit cf93c57. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Relational Data Modeling loads about 2.4k tokens when it runs, and up to ~24k if it reads all its reference files. Until then it costs about 246 tokens; SKILL.md has 972 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~246
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~24k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from pproenca/dot-skills at commit cf93c57, republished under its MIT licence (© pproenca). 972 words, ~2,426 tokens.

Download SKILL.mdSave it as .claude/skills/relational-data-modeling/SKILL.md (or your agent's skills folder). This skill also uses 33 other files; get the full folder from GitHub.
name
relational-data-modeling
description
Corrects the wrong defaults a model has when designing a relational schema — the DDL decisions an experienced engineer makes differently. Use when creating or reviewing tables, migrations, ER models, or ORM schema definitions. Covers identity and keys (surrogate vs natural, identity vs serial, uuidv7, composite keys that make cross-tenant references impossible), relationships (polymorphic foreign keys the database cannot enforce, referential actions, unindexed FK columns, disjoint subtypes), invariants the engine can prove instead of application code (EXCLUDE, partial unique indexes, CHECK limits, deferrable cycles, NOT VALID), types (timestamptz, exact money, range types, enum vs lookup table), derived and encoded data (generated columns, JSONB as an escape hatch), and time (events vs in-place updates, soft-delete flags that silently disable constraints, temporal keys). NOT for query tuning, index selection for read paths, or connection pooling.

Relational Data Modeling

The decisions a relational schema forces, and how to settle them so the database enforces what it can and the application is left with only what it must. Every rule names the wrong default it corrects; there is no rule for what a capable model already gets right.

Examples are PostgreSQL 18, and every DDL statement in this skill was executed against 18.4 — including the failure cases, to confirm the constraints reject what they claim to reject. Roughly a third of the rules depend on mechanisms MySQL and SQLite do not have (EXCLUDE, partial unique indexes, range types, WITHOUT OVERLAPS, deferrable constraints, NOT VALID); those rules say so. The judgment rules transfer to any relational engine.

When to Apply

Use this skill when:

  • Writing or reviewing CREATE TABLE / ALTER TABLE, a migration, or an ORM schema definition (Prisma, Drizzle, Django models, ActiveRecord, Ecto, SQLAlchemy)
  • Designing an entity-relationship model, or naming what a row is — the point where key choices become expensive to reverse
  • The user says "should this be one table or two", "how do I model many-to-many", "the schema allows bad data", "we need history", "we're adding multi-tenancy", or "can the database enforce this"
  • A bug turns out to be a schema that permitted the bad state — duplicates that a unique constraint should have caught, orphans a foreign key should have blocked, overlapping bookings, two rows flagged as default
  • Adding constraints to a table that already has rows and traffic
  • Reviewing a schema generated by an ORM or a scaffolding tool, which is where polymorphic associations, reflexive surrogate keys, and blanket soft-delete flags arrive from

This skill is NOT for:

  • Query tuning, execution plans, or choosing indexes for a read path — this covers only the indexes that constraints and foreign keys require
  • Connection pooling, replication, or operational tuning
  • Non-relational stores, where the trade-offs it argues from do not hold

Rule Categories

#CategoryPrefixCovers
1Identity and Keyskey-What a row is; the choice every foreign key depends on
2Relationships and Cardinalityrel-Keeping references declarable to the database, not just intended
3Constraints as the Modelcons-Which mechanism can actually hold which invariant
4Types and Domainstype-The cheapest constraint available, chosen for meaning not habit
5Derived and Encoded Datanorm-What every deliberate copy costs, and what the database can't see inside
6Time, History and Lifecycletime-What happens to a row when the world changes

Quick Reference

1. Identity and Keys
2. Relationships and Cardinality
Show full SKILL.md (394 more words)Show less
3. Constraints as the Model
4. Types and Domains
5. Derived and Encoded Data
6. Time, History and Lifecycle

How to Use

Read a reference file when its decision comes up — the quick reference above is enough to route. Each rule states the wrong default it corrects and why, then gives a canonical example.

Two rules of thumb tie the categories together and are worth applying even outside a specific rule:

  1. Before adding a column, name what makes two rows the same row. That sentence is a constraint you owe the table.
  2. Before writing a validation in application code, ask which constraint could hold it instead. If the answer is "none", that is worth knowing explicitly — see cons-check-is-single-row for the map of invariant shapes to mechanisms.

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and source references

© pproenca, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 33 other files (references, assets) in skills/.experimental/relational-data-modeling of pproenca/dot-skills.

  • SKILL.md
  • AGENTS.md
  • assets/templates/_template.md
  • metadata.json
  • references/_sections.md
  • references/cons-check-is-single-row.md
  • references/cons-deferrable-for-cycles.md
  • references/cons-exclude-for-non-overlap.md
  • references/cons-not-null-by-default.md
  • references/cons-not-valid-then-validate.md
  • references/cons-partial-unique-index.md
  • references/key-identity-not-serial.md
  • references/key-partition-axis-binds-the-key.md
  • references/key-primary-key-is-real-identity.md
  • references/key-propagate-scoping-key.md
  • references/key-uuidv7-for-client-generated.md
  • references/norm-derived-needs-a-mechanism.md
  • references/norm-encoded-composite-values.md
  • … and 16 more

Open the folder on GitHubat commit cf93c57

Compare with similar skills

Relational Data Modeling next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Relational Data Modeling compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Relational Data Modeling this skillpproenca/dot-skills214—~2.4kAutomated safety check: PassMIT
Prisma Expertdavila7/claude-code-templates32k6 repos~2.6kAutomated safety check: PassMIT
DB SculptorEliasOulkadi/shokunin114—~3.1kAutomated safety check: NotesMIT
Discover Databaserand/cc-polymath181—~2kAutomated safety check: PassMIT
Jpa Patternsaffaan-m/ECC274k5 repos~1.2kAutomated safety check: PassMIT
Jpa Hibernate OptimizationHack23/cia239—~531Automated safety check: PassApache-2.0

Similar skills

  • Prisma Expert

    davila7/claude-code-templates

    Prisma ORM expert for schema design, migrations, query optimization, relations modeling, and database operations.

    32k GitHub starsUsed in 6 repos~2.6k tokens
    DatabasesAuto-check passed
  • DB Sculptor

    EliasOulkadi/shokunin

    Design database schemas with Prisma/Drizzle, PostgreSQL index strategy (B-tree, GIN, GiST, BRIN, Hash), query optimization (EXPLAIN ANALYZE), migration safety (expand/contract, zero-downtime), and…

    114 GitHub stars~3.1k tokensUpdated 2 days ago
    DatabasesAuto-check: notes
  • Discover Database

    rand/cc-polymath

    Automatically discover database skills when working with SQL, PostgreSQL, MongoDB, Redis, database schema design, query optimization, migrations, connection pooling, ORMs, or database selection.

    181 GitHub stars~2k tokensUpdated 7 mo ago
    DatabasesAuto-check passed
  • Jpa Patterns

    affaan-m/ECC

    JPA/Hibernate patterns for entity design, relationships, query optimization, transactions, auditing, indexing, pagination, and pooling in Spring Boot.

    274k GitHub starsUsed in 5 repos~1.2k tokens
    DatabasesAuto-check passed
  • Optimize JPA/Hibernate: entity design, query performance, N+1 prevention, caching strategies

    239 GitHub stars~531 tokensUpdated today
    DatabasesAuto-check passed
  • Database Architect

    FerroxLabs/wayland

    Database schema design expertise covering normalization, denormalization strategies, indexing, query optimization, partitioning, connection pooling, migration management, multi-tenancy patterns, and…

    608 GitHub stars~4k tokensUpdated yesterday
    DatabasesAuto-check passed

More from pproenca/dot-skills

All 182 skills in this repo
  • Audio Voice Recovery

    pproenca/dot-skills

    Audio forensics and voice recovery guidelines for CSI-level audio analysis.

    214 GitHub stars~3.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Codemod React Pipeline

    pproenca/dot-skills

    Guided, scripted pipeline for running JSX/TSX/React codemods safely across large legacy codebases.

    214 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Dev Rfc

    pproenca/dot-skills

    Create well-structured RFCs and technical proposals for software projects.

    214 GitHub stars~3.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Dx Harness

    pproenca/dot-skills

    Developer-experience friction auditing and fixing — slow onboarding, repeated manual setup steps, missing bootstrap/reset/seed scripts, undiscoverable conventions.

    214 GitHub stars~1.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Language Spec Author

    pproenca/dot-skills

    Turn a rough idea for a language into a complete, implementable specification — a DSL, query, config/data, template, or protocol language — by interviewing the author dimension by dimension until…

    214 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Python Pep Author

    pproenca/dot-skills

    Drafting Python Enhancement Proposals (PEPs) — proposing a Python language feature, a standard library change, an interoperability standard, or an informational/process document for the Python…

    214 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Relational Data Modeling

What does Relational Data Modeling do?

Corrects the wrong defaults a model has when designing a relational schema — the DDL decisions an experienced engineer makes differently. Relational Data Modeling is an agent skill from pproenca/dot-skills. Corrects the wrong defaults a model has when designing a relational schema — the DDL decisions an experienced engineer makes differently.

When should I use Relational Data Modeling?

Relational Data Modeling fits situations like: reviewing tables; ORM schema definitions.

How do I install Relational Data Modeling in Claude Code?

Run `npx skills add pproenca/dot-skills --skill relational-data-modeling -a claude-code`. Or copy the skill folder (skills/.experimental/relational-data-modeling in pproenca/dot-skills) into .claude/skills/relational-data-modeling in your project. Claude Code loads it when a task matches its description.

How do I install Relational Data Modeling in Codex?

Run `npx skills add pproenca/dot-skills --skill relational-data-modeling -a codex`. Or copy the skill folder (skills/.experimental/relational-data-modeling in pproenca/dot-skills) into .agents/skills/relational-data-modeling in your project. Codex loads it when a task matches its description.

Can I use Relational Data Modeling in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pproenca/dot-skills --skill relational-data-modeling -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/relational-data-modeling, .gemini/skills/relational-data-modeling, .github/skills/relational-data-modeling and .opencode/skills/relational-data-modeling in your project.

What does Relational Data Modeling need to run?

SKILL.md names no scripts, command-line tools or credentials: Relational Data Modeling is instructions for the agent only.

Does Relational Data Modeling access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Relational Data Modeling safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Relational Data Modeling use?

Relational Data Modeling is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Relational Data Modeling use?

About 2.4k tokens (SKILL.md is roughly 9.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 21k tokens, read only when the agent opens those files.

What are the alternatives to Relational Data Modeling?

Skills that share tags, products or a category with Relational Data Modeling: Prisma Expert (davila7/claude-code-templates, 32k stars), DB Sculptor (EliasOulkadi/shokunin, 114 stars), Discover Database (rand/cc-polymath, 181 stars) and Jpa Patterns (affaan-m/ECC, 274k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Relational Data Modeling?

pproenca (a GitHub user) maintains it in pproenca/dot-skills, which has 214 GitHub stars. The repository holds 182 skills in this directory. The repository was last updated on August 15, 2026.

Source: pproenca/dot-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.