Db naming

From Hainrixz/claude-db · View interactive version

Db naming is an AI agent skill from the GitHub repository Hainrixz/claude-db. Audit naming conventions — inconsistent table/column casing and pluralization, ambiguous or reserved-word identifiers, untyped/opaque columns, inconsistent FK and boolean naming, and identifiers that fight the engine's case-folding rules. Module M7. Feeds the Design & Integrity score (Naming categor

How to use this skill

Skill file

<!-- Copyright (c) 2026 Enrique Rocha (@soyenriquerocha) · tododeia.com · id er-f37b7121 -->

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

Axis & severity

Tier-0 static check

Parse DDL/snapshot via scripts/parse-schema.mjs: tally identifier casing styles and table pluralization; match identifiers against a reserved-word list per engine; check FK columns against the <table>_id pattern; flag boolean columns without is_/has_/can_ and opaque names. This is fully static and directional.

Tier-1 verification query

Confirm live identifier inventory and quoting:

-- $DATABASE_URL, read-only
SELECT table_name, column_name FROM information_schema.columns
WHERE table_schema NOT IN ('pg_catalog','information_schema')
ORDER BY table_name;   -- inspect casing/plurality/reserved words across the real catalog

Findings

Emit per schema/finding.schema.json. Examples:

Each finding: evidence.observed quotes the identifier(s) verbatim; verification.reproduce is the runnable query above (method: ddl_parse / schema_introspect); expected_impact is banded (typically low) + confidence directional with rationale.

Honesty

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.