Database Schema Validator skill for Claude and Codex
Lints a database schema against naming, key, index, and type rules and returns a machine-readable verdict: a pass flag, errors that must be fixed, and…
Install it once and Claude or Codex runs it for you. When your request matches, your AI loads the skill, asks for anything it is missing, and works through the template itself. Prefer to fill it in by hand? See the full prompt template.
Download the skill (.zip) · View SKILL.md
When it is used
Use when a schema's DDL should be checked for missing keys, mismatched foreign key types, naming inconsistencies, risky column types, and index gaps, with the result as JSON. Do not use for designing or documenting a schema, planning a refactor, or validating the data inside the tables. Related topics: coding, database.
What it will ask you for
- Database type (choose one: MySQL, PostgreSQL, SQLite, SQL Server, Oracle)
- Schema DDL (longer free text)
- Target database version (free text, e.g. "8.0 or 16")
- Check indexes (choose one: Yes, No)
- Critical tables (longer free text)
- Minimum severity to report (choose one: Info, Warning, Error)
How it works
- Scan every table for error-level rules (missing primary key, foreign key type mismatch, unsafe NOT NULL, reserved words, unsupported types) and record each with table and column.
- Scan for warning-level rules on naming, text lengths, money and timestamp types, updated_at, and, when enabled, index coverage and redundancy.
- Promote findings on critical tables to errors and drop findings below the minimum severity.
- Set valid to true only when the errors array is empty and write a one-sentence summary with the counts.
- Return the JSON object alone and confirm it parses.
What you get
A single JSON object with keys valid (boolean), errors (array of table.column: finding strings), warnings (same form), and summary (one sentence). No prose outside the JSON.
What it watches out for
- Reporting a style preference as an error, which trains the team to ignore the valid flag.
- Flagging a missing index on a column that is already the leading column of a composite index.
- Checking types against the latest database version rather than the target version the user named.
How to install
Claude.ai and the Claude desktop app
- Download the skill .zip.
- Open Settings, then Capabilities, and find Skills.
- Choose Upload skill and select the .zip.
- Ask Claude for help with the task. It loads the skill when your request matches.
Claude Code
- Download the skill .zip.
- Unzip it into ~/.claude/skills/ (or .claude/skills/ inside a project).
- Start a new session. Claude Code loads the skill when your request matches.
Codex
- Download the skill .zip.
- Unzip it into ~/.agents/skills/ (or .agents/skills/ inside a project).
- Codex picks it up on its own. Type $ and the skill name to use it, or just ask for the task.
Cursor
- Download the Cursor rule (.mdc).
- Save it in .cursor/rules/ inside your project.
- Cursor's agent applies the rule when your request matches its description.
AGENTS.md (Codex, Cursor, and other coding agents)
- Copy the AGENTS.md section.
- Paste it into AGENTS.md at the root of your repository, creating the file if needed.
- Coding agents that read AGENTS.md follow it when your request fits.