.agents/skills/saas-migration-auditor/SKILL.md
Audits and verifies database migration logic for a multi-tenant SaaS. Ensures that all users (especially legacy single-tenant users) have valid tenant_id bindings, and that Super Admins safely bypass RLS without breaking UI functionality.
npx skillsauth add theeabrarrr/LPG-Connect saas-migration-auditorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides mandatory guidelines for verifying and maintaining data integrity when transitioning from a single-tenant to a multi-tenant SaaS architecture.
Always ensure that every record in the users, customers, orders, and other core tables has a valid tenant_id. Legacy users missing a tenant_id are considered corrupted and must be migrated or patched.
When auditing authentication flows, verify both the auth.users JSON payload (raw_user_meta_data) and the public.users table.
role: 'super_admin' and typically a specifically designated system tenant_id (e.g., 00000000-0000-0000-0000-000000000000 or the owner tenant ID).tenant_id mapping to an active tenant in the tenants table.Verify that Row Level Security (RLS) policies accurately grant Super Admins cross-tenant SELECT access where intended, without compromising the insert/update integrity of individual tenant data. The Super Admin UI should not break when encountering mixed tenant data.
Use the Supabase MCP to actively query live database states when performing migration audits, rather than guessing data schemas.
tools
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
testing
Enforces atomic transactions for operations spanning multiple database tables (e.g., Orders, Ledgers, Inventory) to prevent partial updates. Use this skill when implementing financial logic, order processing, or any multi-table mutations.
development
Performs a triple-point audit to synchronize codebase, database schema, and project documentation states. Use this skill to align the PRD, Gap Analysis, and Execution Plan with the actual system reality.
data-ai
Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.