What problem does it solve?
This skill addresses the complexity of designing multi-tenant database schemas by ensuring robust tenant isolation, audit-ready usage tracking, and safe relational patterns, preventing common security and data integrity issues.
Core Features & Use Cases
- Tenant Scoping Audit: Validates that all entities are correctly scoped to a tenant root (e.g., company_id) to prevent cross-tenant data leakage.
- Schema Convention Enforcement: Standardizes the use of UUIDs, indexed foreign keys, and explicit status constraints to ensure long-term maintainability.
- Usage Tracking Design: Implements structured logging for billing reconciliation, monitoring, and debugging.
- Use Case: Use this when architecting a new SaaS platform or performing a security review on an existing database schema to ensure that tenant boundaries are strictly enforced at the database level.
Quick Start
Use the design-tenant-schema skill to review the current database schema for potential tenant isolation risks and compliance with standard conventions.