Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

schema-validation

verified

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 GitHub

Marketplace

ai-dev-marketplace

vanman2024/ai-dev-marketplace

Plugin

supabase

development

Repository

vanman2024/ai-dev-marketplace
2stars

plugins/supabase/skills/schema-validation/SKILL.md

Last Verified

February 1, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/vanman2024/ai-dev-marketplace/blob/main/plugins/supabase/skills/schema-validation/SKILL.md -a claude-code --skill schema-validation

Installation paths:

Claude
.claude/skills/schema-validation/
Powered by add-skill CLI

Instructions

# 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

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3541 chars