iconsa-supabase-migration

Generates Supabase migrations following ICONSA conventions for RLS, comments, and naming.

Updated May 7, 2026
One-click install
npx skills add https://github.com/jecg2804/HumanOS --skill iconsa-supabase-migration-jecg2804
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: iconsa-supabase-migration
Source: https://github.com/jecg2804/HumanOS/tree/main/.claude/skills/iconsa-supabase-migration
Command: npx skills add https://github.com/jecg2804/HumanOS --skill iconsa-supabase-migration-jecg2804

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing Supabase migrations by hand often leads to missing Row Level Security policies, undocumented tables, inconsistent naming, and schema drift that breaks shared databases. This Skill enforces the ICONSA team's migration conventions so every DDL change is safe, documented, and reviewable. ## Core Features & Use Cases - Convention-enforced DDL: Generates CREATE TABLE, ALTER TABLE, CREATE POLICY, CREATE TRIGGER, and seed INSERT statements with mandatory RLS, COMMENT ON TABLE, updated_at triggers, and timestamptz columns. - Pre-flight safety checks: Verifies backlog blockers in docs/STATUS.md, confirms schema design approval, and prevents dangerous operations like DROP SCHEMA on the shared project without explicit confirmation. - Helper reuse and review workflow: Reuses existing hr.* helper functions instead of redefining them, runs Supabase advisors and reviewer subagents, and requires a CHANGELOG entry before completion. - Use Case: When asked to add a new table for HR ticket attachments, the Skill produces a numbered migration with RLS policies using hr.is_hr_admin(), comments, and a matching CHANGELOG entry. ## Quick Start Ask the agent to create a Supabase migration for a new table or schema change, for example: create a migration adding an attachments table with RLS policies.

Frequently Asked Questions about iconsa-supabase-migration

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

FAQPage Schema
How do I create a Supabase migration with RLS policies?▼

Define the table with CREATE TABLE, then run ALTER TABLE ... ENABLE ROW LEVEL SECURITY and add at least one CREATE POLICY statement, typically a SELECT policy using ownership checks or an admin helper like hr.is_hr_admin(). This Skill generates all of these elements automatically following the ICONSA checklist.

What naming convention should Supabase migrations follow?▼

Use the NNN_action_target pattern in snake_case, such as 027_create_workflows_steps or 028_alter_hr_people_add_column_phone_secondary. Check existing migrations with list_migrations first to determine the next sequential number.

Can I use DROP SCHEMA on a shared Supabase project?▼

DROP SCHEMA on a shared project is blocked by default because PostgREST introspects the Exposed schemas list, which is not readable via SQL. You must confirm the schema is not exposed, remove it from Exposed schemas in the Dashboard first, then drop it, or you risk 503 errors across all REST endpoints.

Why should every table have COMMENT ON statements in Supabase?▼

COMMENT ON TABLE and COMMENT ON COLUMN populate the Supabase Dashboard with documentation, making the schema understandable for non-developers who browse it. Skipping comments leaves the dashboard unusable for teammates who rely on it to understand table purposes.

What are common mistakes when writing Supabase DDL migrations?▼

Common mistakes include creating tables without enabling RLS, using timestamp instead of timestamptz, omitting ON DELETE clauses on foreign keys, redefining existing helper functions, and calling auth.uid() directly instead of through SECURITY DEFINER helpers. Each of these creates security or maintenance risks.