db-normalization

db-normalization is a skill for Claude Code, Codex from Hainrixz/claude-db. It costs 64 tokens per session (1,075 once invoked), scanned A, original, MIT.

A database design checker for relational databases, which store data in tables linked by relationships. It looks for normalization problems from first to third normal form, such as lists in one cell or duplicated facts.

In plain words
What is it for?
Use it to review table definitions, find repeating groups and hidden dependencies, and assess whether denormalization—a deliberate duplication for faster reading—is documented and justified.
Why use it?
It helps prevent inconsistent data and the insert, update, and delete problems caused by storing the same fact in multiple places.

Skill for Claude CodeCodex

Part of the claude-db plugin — 36 skills, 6 agents, 1 hook 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/hainrixz/claude-db/db-normalization
Any agent
npx skills add Hainrixz/claude-db --skill db-normalization
Clone the repo
git clone --depth 1 https://github.com/Hainrixz/claude-db

Made for: Claude Code, Codex.

Or install claude-db, the plugin that ships this one along with the rest of its 36 skills, 6 agents, 1 hook.

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 db-normalization

README.md
[![agentmods](https://agentmods.dev/badge/skills/hainrixz/claude-db/db-normalization.svg)](https://agentmods.dev/skills/hainrixz/claude-db/db-normalization)
Your own site
<a href="https://agentmods.dev/skills/hainrixz/claude-db/db-normalization"><img src="https://agentmods.dev/badge/skills/hainrixz/claude-db/db-normalization.svg" alt="Measured on agentmods" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,075 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.00064 $0.01075
Opus 5 $0.00032 $0.00537
Sonnet 5 $0.00013 $0.00215
Haiku 4.5 $0.00006 $0.00108

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

Security

Grade A, and why

db-normalization 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 4d 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.

skills/db-normalization/SKILL.md · 53 lines

How it starts

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

db-normalization (M1)

Normalization is the spine of relational design: it removes update/insert/delete anomalies by giving every fact one home. This module audits 1NF→3NF and the deliberate, documented exceptions (denormalization for read paths). It is design-axis only. For document/KV paradigms this module is replaced by Access-pattern&embedding in the profile — do not penalise a Mongo collection for "lacking 3NF".

What it checks

  • 1NF — atomicity: columns holding lists (tags VARCHAR with comma-separated values, phone_numbers TEXT), repeating-group columns (addr1, addr2, addr3, item_1, item_2), or arrays used as a join-table substitute. Static signal: column name patterns + a text/varchar type carrying delimited data in sample DDL/comments.
  • 2NF — partial dependency: on a composite PK, a non-key column that depends on only part of the key (e.g. order_items(order_id, product_id, product_name) where product_name depends on product_id alone).
  • 3NF — transitive dependency: a non-key column functionally determined by another non-key (e.g. employees(id, dept_id, dept_name)dept_name belongs in departments).
  • Denormalization discipline: duplicated/derived columns (total, full_name, cached counts) with no generated-column definition, no trigger, and no documented refresh path — these drift silently. Cross-check with db-defaults-generated (M6).

Axis & severity

  • Axis: design. Magnitude banded high|medium|low, never a fabricated anomaly rate.
  • Repeating groups / CSV-in-a-column on a high-write table: severity 3–4, warn/fail, confidence directional (static).
  • Transitive dependency causing redundant updatable data: severity 3, warn.
  • Undocumented denormalized duplicate that can drift: severity 3, warn, fixable: proposed.
  • M1 never holds a severity-5 cap; it shapes the Modelado category value.

Tier-0 static check

Parse DDL via scripts/parse-schema.mjs and inspect column inventories: flag delimited-list column names, repeating numbered columns, and non-key columns whose name matches another table's entity (*_name, *_label alongside a *_id). Program-source parses stay directional and never cap.

Read the full file on GitHub · 53 lines

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. 4d ago First seen · 53 lines · 64 tokens per session scan A 54f0736e7a85

Subscribe to this mod's changes

db-normalization is a skill published in the GitHub repository Hainrixz/claude-db (19 stars, last pushed 2mo ago), licensed MIT. It adds 64 tokens to every session and 1,075 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.

Related

Other skills, from other repositories

malloy-lookml-review

Analyze LookML files as prior art for Malloy modeling. Used during Step 1 (DISCOVER) when .lkml files are present. Coordinates reference files that extract business logic, relationships, and curation decisions. Works with or without a database connection.

malloydata/publisher · 58 tokens

supabase-selfhost-ops

The protocol rests on ten invariants. Every agent (CI or local harness) and every human interacting with boucle MUST honor them. The LESSONS.yml lessons are incident catalogs that instantiate these invariants; the normative statement lives here.

ankaboot-source/supabase-selfhost-ops · 0 tokens

convex-migrations

Schema migration strategies for evolving applications including adding new fields, backfilling data, removing deprecated fields, index migrations, and zero-downtime migration patterns.

waynesutton/convexskills · 35 tokens

terrabase-db-changes

Use when making Postgres schema or migration changes (CREATE/ALTER/DROP TABLE, indexes, columns, constraints, backfills) IN A PROJECT THAT DECLARES A TERRABASE TARGET (a TERRABASEDATABASEURL in its .env). Routes the change through terrabase's MCP tools for a deterministic safety analysis plus a local-Qwen plan, and…

Terrabase-in/terrabase · 98 tokens

erd-studio

Schema rules for ERD Studio data model files — the .erd-studio/ directory uses a two-file system (YAML model definitions + JSON domain diagrams) with strict format rules you must read before editing. Use this skill whenever the task touches files in .erd-studio/ (domain JSON, logical-models YAML, or .sync-plan.json)…

liam-machine/erd-studio · 162 tokens

database-sql

Design database schemas, write efficient SQL queries, create migrations, and optimize database performance. Use when working with databases, writing queries, or designing data models.

asgarovf/locusai · 35 tokens