grey-haven-database-conventions

Enforce Grey Haven database conventions across multi-tenant schemas.

29|4|Updated Aug 10, 2025
One-click install
npx skills add https://github.com/greyhaven-ai/claude-code-config --skill grey-haven-database-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: grey-haven-database-conventions
Source: https://github.com/greyhaven-ai/claude-code-config/tree/main/grey-haven-plugins/data-quality/skills/database-conventions
Command: npx skills add https://github.com/greyhaven-ai/claude-code-config --skill grey-haven-database-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill eliminates the complexity of database schema design by providing standardized conventions for multi-tenant applications, ensuring security, performance, and maintainability from day one.

Core Features & Use Cases

  • Multi-Tenant Security: Automatically configure Row Level Security (RLS) for tenant isolation.
  • Schema Standardization: Enforce consistent naming, indexing, and relationship patterns.
  • Use Case: When building a new SaaS application, use this Skill to generate complete database schemas with proper tenant isolation, preventing data leaks and performance issues.

Quick Start

Design a new users table for a multi-tenant application using Drizzle ORM with snake_case fields and RLS policies.

Frequently Asked Questions about grey-haven-database-conventions

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

FAQPage Schema
How do I design a multi-tenant database schema with Row Level Security?

Multi-tenant database design requires enforcing tenant isolation through RLS policies and mandatory tenant_id fields on all tables. This Skill automates RLS policy setup and schema generation for Drizzle and SQLModel, ensuring data separation and preventing cross-tenant access by default.

What database naming and structure conventions should I follow for a SaaS application?

SaaS database conventions include snake_case field names, standard timestamp columns, indexed foreign keys, and tenant_id on every table. This Skill enforces these patterns consistently across schema design, code generation, and migrations for Drizzle (TypeScript) and SQLModel (Python).

Can I use Drizzle ORM with multi-tenant schemas and migrations?

Yes. This Skill provides migration templates and schema generation specifically for Drizzle ORM, including tenant_id configuration, indexing patterns, and RLS policy setup for multi-tenant applications in TypeScript.

How do I prevent data leaks in a multi-tenant application database?

Data leaks in multi-tenant systems occur without proper tenant isolation. This Skill configures Row Level Security policies and enforces tenant_id constraints on all queries, ensuring one tenant cannot access another's data through schema design and automated RLS rules.

Does this work with SQLModel for Python database schemas?

Yes. This Skill supports SQLModel (Python) alongside Drizzle (TypeScript), providing migration templates, multi-tenant conventions, and RLS policy patterns tailored to each framework's syntax and capabilities.