db-smoke-test

Runs post-migration SQL smoke tests against a Supabase database to validate schema, RLS policies, and data integrity.

3|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/gabrielnsmnto/kord-aios --skill db-smoke-test-gabrielnsmnto
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: db-smoke-test
Source: https://github.com/gabrielnsmnto/kord-aios/tree/main/src/features/builtin-skills/kord-aios/database/db-smoke-test
Command: npx skills add https://github.com/gabrielnsmnto/kord-aios --skill db-smoke-test-gabrielnsmnto

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? After running a database migration, teams need a fast, deterministic way to confirm that tables, views, functions, triggers, and RLS policies were actually created correctly before moving on. This Skill automates that validation by locating and executing a smoke test SQL file against the database. ## Core Features & Use Cases - Automatic Smoke Test Discovery: Searches for smoke test files in priority order: supabase/tests/smoke/v_current.sql, supabase/tests/smoke_test.sql, then a tmpl-smoke-test.sql template. - Fail-Fast Execution: Runs the test via psql with ON_ERROR_STOP=1 so any failure halts immediately and reports clearly. - Structured Validation Coverage: Checks schema objects (tables, views, functions, triggers), RLS coverage and policies, and data integrity (foreign keys, constraints, sample queries). - Use Case: After applying a Supabase migration, run the smoke test to confirm all 15 expected tables exist, RLS is enabled on every public table, and critical functions are present before proceeding to an RLS audit or rollback decision. ## Quick Start Ask the agent to run the database smoke test to validate the most recent migration against the Supabase database.

Frequently Asked Questions about db-smoke-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate a database migration after running it?▼

Run a smoke test SQL file against the database using psql with ON_ERROR_STOP enabled. The test checks that expected tables, views, functions, and triggers exist, RLS is enabled on sensitive tables, and sample queries return expected results.

How do I test Supabase RLS policies after a migration?▼

Query pg_tables to confirm rowsecurity is enabled on all public tables, then run a sanity query with a simulated JWT claim using SET LOCAL request.jwt.claims to verify RLS-protected queries execute without errors.

What should a database smoke test check?▼

A smoke test should verify schema objects (tables, views, functions, triggers), RLS coverage and policy existence, and data integrity such as foreign keys, check constraints, and sample query results. Tests should be read-only, run in under 5 seconds, and document expected results.

Why does my smoke test fail with a connection error?▼

Connection failures usually stem from an incorrect SUPABASE_DB_URL connection string, invalid credentials, or network issues. Verify the connection string and retry with exponential backoff, up to three attempts.

What should I do when a post-migration smoke test fails?▼

Review the reported errors, check migration completeness, verify RLS policies were installed, and confirm functions were created. If issues are critical, consider rolling back to a snapshot, fixing the migration, and retrying.