rominirani

database-schema-validator

62
15
# Install this skill:
npx skills add rominirani/antigravity-skills --skill "database-schema-validator"

Install specific skill from multi-skill repository

⭐ Awesome Collections

This skill is featured in:

# Description

Validates SQL schema files for compliance with internal safety and naming policies.

# SKILL.md


name: database-schema-validator
description: Validates SQL schema files for compliance with internal safety and naming policies.


Database Schema Validator Skill

This skill ensures that all SQL files provided by the user comply with our strict database standards.

Policies Enforced

  1. Safety: No DROP TABLE statements.
  2. Naming: All tables must use snake_case.
  3. Structure: Every table must have an id column as PRIMARY KEY.

Instructions

  1. Do not read the file manually to check for errors. The rules are complex and easily missed by eye.
  2. Run the Validation Script:
    Use the run_command tool to execute the python script provided in the scripts/ folder against the user's file.

bash python scripts/validate_schema.py <path_to_user_file>

  1. Interpret Output:
  2. If the script returns exit code 0: Tell the user the schema looks good.
  3. If the script returns exit code 1: Report the specific error messages printed by the script to the user and suggest fixes.

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.