rominirani/antigravity-skills
Overview
This skill validates SQL schema files for compliance with internal safety, naming, and structural policies. It automates checks so schema changes are reviewed consistently and reliably before deployment. The skill reports clear error messages and suggests fixes when violations are found.
How this skill works
The skill runs a Python validator located at scripts/validate_schema.py against the provided SQL file and interprets the script's exit code and output. Exit code 0 indicates the schema passed all checks. Exit code 1 returns specific error messages printed by the validator, which the skill reports back with suggested remediation steps.
When to use it
- Before committing or merging SQL schema changes into version control.
- As part of CI pipelines to gate database migrations and DDL changes.
- When onboarding new database schemas to ensure consistency with team standards.
- Prior to running migrations in staging or production environments.
Best practices
- Do not rely on manual review; always run the validator to catch subtle policy violations.
- Keep SQL files small and focused so validator output maps easily to specific tables or statements.
- Address each reported error by following the suggested fix, then re-run the validator until it exits cleanly.
- Integrate the validator into pre-commit hooks or CI jobs to enforce policies automatically.
Example use cases
- Validate a new CREATE TABLE script to ensure table names use snake_case and include an id primary key.
- Scan migration files to detect and block unapproved DROP TABLE statements.
- Run automatic checks in a CI pipeline before merging database-related pull requests.
- Review third-party or legacy schema files for compliance before importing into a managed environment.
FAQ
It enforces three policies: no DROP TABLE statements, table names must be snake_case, and every table must have an id column declared as the PRIMARY KEY.
How do I run the check locally?
Execute the validator script against your SQL file: python scripts/validate_schema.py <path_to_sql_file>. The skill will interpret the script's exit code and output.
3 skills
This skill validates SQL schemas against internal safety and naming policies, ensuring snake_case tables and mandatory id primary keys.
This skill formats git commit messages according to Conventional Commits, ensuring consistent type, scope, and description across projects.
This skill converts JSON data into strongly-typed Python Pydantic models with automatic type inference and nested class generation.