Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

supabase-db

verified

PostgreSQL conventions overview for Supabase projects. Use when: (1) Need overview of database design principles, (2) Understanding tight-fit design philosophy, (3) Quick reference for standard table structure

View on GitHub

Marketplace

armed-claude

ninyawee/armed-claude

Plugin

project-bootstrap

Repository

ninyawee/armed-claude

skills/supabase-db/SKILL.md

Last Verified

February 1, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/ninyawee/armed-claude/blob/main/skills/supabase-db/SKILL.md -a claude-code --skill supabase-db

Installation paths:

Claude
.claude/skills/supabase-db/
Powered by add-skill CLI

Instructions

# PostgreSQL Conventions for Supabase

Overview of database design principles for Supabase projects.

**Environment:** PostgreSQL 17 on Supabase.

## Key Principles

1. **Consistency** - All objects follow predictable naming patterns
2. **Self-documenting** - Names indicate purpose and type
3. **Type safety** - Suffixes indicate data types
4. **Tight-fit design** - Only add confirmed requirements

## Tight-Fit Design

MUST NOT add speculative columns:

| Don't Add Speculatively | Add When |
|-------------------------|----------|
| `deleted_at` | Soft delete confirmed |
| `created_by`, `updated_by` | Audit trail required |
| `metadata jsonb` | Flexible data needed |
| Indexes | Query patterns known |

## Standard Table Structure

```sql
CREATE TABLE tb_examples (
    id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
    created_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP
);
```

## Related Skills

| Skill | Use For |
|-------|---------|
| **supabase-migration** | Creating migrations, naming conventions, security patterns |
| **supabase-seeding** | Populating test data, bulk loading |
| **supabase-bootstrap** | Setting up new projects, tooling config |

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
1211 chars