Database schema validation tools - SQL syntax checking, constraint validation, naming convention enforcement, and schema integrity verification. Use when validating database schemas, checking migrations, enforcing naming conventions, verifying constraints, or when user mentions schema validation, migration checks, database best practices, or PostgreSQL validation.
View on GitHubFebruary 1, 2026
Select agents to install to:
npx add-skill https://github.com/vanman2024/ai-dev-marketplace/blob/main/plugins/supabase/skills/schema-validation/SKILL.md -a claude-code --skill schema-validationInstallation paths:
.claude/skills/schema-validation/# Schema Validation
Comprehensive database schema validation for Supabase/PostgreSQL projects. Validates SQL syntax, naming conventions, constraints, indexes, and RLS policies before deployment.
## Instructions
### 1. Run Full Validation
```bash
cd /path/to/project
bash /home/vanman2025/Projects/ai-dev-marketplace/plugins/supabase/skills/schema-validation/scripts/full-validation.sh <schema-file-or-directory>
```
### 2. Run Individual Validations
**SQL Syntax Validation:**
```bash
bash scripts/validate-sql-syntax.sh <sql-file>
```
**Naming Convention Validation:**
```bash
bash scripts/validate-naming.sh <sql-file>
```
**Constraint Validation:**
```bash
bash scripts/validate-constraints.sh <sql-file>
```
**Index Validation:**
```bash
bash scripts/validate-indexes.sh <sql-file>
```
**RLS Policy Validation:**
```bash
bash scripts/validate-rls.sh <sql-file>
```
### 3. Generate Validation Report
The full validation script generates a detailed markdown report showing:
- Validation results for each check
- Issues found with severity levels (ERROR, WARNING, INFO)
- Recommendations for fixes
- Summary statistics
### 4. Configure Validation Rules
Customize validation rules by editing:
```bash
templates/validation-rules.json
templates/naming-conventions.json
```
## Examples
### Example 1: Validate Migration Before Deployment
```bash
# Validate a new migration file
bash scripts/full-validation.sh supabase/migrations/20250126_add_users_table.sql
# Review the generated report
cat validation-report.md
```
### Example 2: Validate Entire Schema Directory
```bash
# Validate all migration files
bash scripts/full-validation.sh supabase/migrations/
# Check for common issues
grep "ERROR" validation-report.md
```
### Example 3: CI/CD Integration
```bash
# Add to .github/workflows/validate-schema.yml
- name: Validate Database Schema
run: |
bash plugins/supabase/skills/schema-validation/scripts/full-validation.sh supabase/migrations/
if grep -q "ERROR" validation-r