db-naming
Installation
SKILL.md
db-naming (M7)
Naming is the schema's documentation: consistent, predictable identifiers make joins obvious and reduce the quoting/casing bugs that creep in across ORMs and engines. It is low-weight (Naming category, design axis) — real but never the headline. This module is design-axis and never caps.
What it checks
- Casing / pluralization consistency: a mix of
snake_caseandcamelCase, or singular and plural table names (user,orders,OrderItem) in one schema — pick one and hold it. - Reserved words & case-folding traps: identifiers that are SQL reserved words (
user,order,group,select) or that rely on case ("User"quoted) — Postgres folds unquoted to lowercase, MySQL is filesystem/case-config dependent; mixed quoting causes "relation does not exist" bugs. - FK naming: FK columns not following a predictable
<referenced>_idpattern, so joins aren't self-evident. - Boolean naming: booleans not prefixed
is_/has_/can_, or negative names (not_active) that invert logic. - Opaque / ambiguous names:
data,info,value,flag,temp,col1, abbreviations without a glossary, or timestamps not suffixed_at.
Axis & severity
- Axis: design; magnitude almost always low, banded honestly.
- Reserved-word unquoted identifier that breaks across engines: severity 2–3,
warn. - Schema-wide casing/pluralization inconsistency: severity 2,
warn,fixable: proposed(rename is high-blast-radius — neverauto). - Opaque column name / missing
_atsuffix: severity 1,warn. - M7 never caps any score; it is the smallest-weight design category.