wode-db-schema-pattern

Enforce strict PostgreSQL schema patterns for Wode tables with tenant-scoped composite keys.

7|2|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/wenerme/ai --skill wode-db-schema-pattern
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wode-db-schema-pattern
Source: https://github.com/wenerme/ai/tree/main/skills/wode-db-schema-pattern
Command: npx skills add https://github.com/wenerme/ai --skill wode-db-schema-pattern

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents inconsistent PostgreSQL schema designs by enforcing a strict, repeatable pattern for Wode table structure, naming, identifiers, and multi-tenant isolation.

Core Features & Use Cases

  • Schema design guardrails: Enforces required naming rules, allowed data types, and consistent field suffix conventions.
  • ID and tenancy standards: Requires composite primary keys (tid, id), K-sortable random IDs (ULID/UUIDv7), and tenant-scoped uniqueness.
  • Flexible data modeling: Standardizes how to separate attributes, properties, extensions, and metadata for client vs server usage.
  • Polymorphic association consistency: Requires _id/_type suffixes and discriminator enum conventions.

Quick Start

Ask for a new PostgreSQL table schema for a Wode resource and specify that it must follow the wode-db-schema-pattern rules for identifiers, tenancy, and field templates.

Frequently Asked Questions about wode-db-schema-pattern

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

FAQPage Schema
How do I design a multi-tenant PostgreSQL schema with composite primary keys?

To design multi-tenant PostgreSQL schemas, use tenant-scoped composite primary keys (tid, id) alongside K-sortable random IDs like ULID or UUIDv7 to enforce strict tenant isolation and consistent table structures.

What are the allowed data types and naming conventions for PostgreSQL table design?

Allowed PostgreSQL data types include text, bigint, jsonb, bool, timestamptz, and text[], while naming conventions require standardized timestamp and foreign-key suffixes to maintain consistent table structures across domains.

How do I model polymorphic associations and flexible jsonb data in PostgreSQL?

Model polymorphic associations in PostgreSQL using _id and _type suffixes with discriminator enums, and separate flexible jsonb data into attributes, properties, extensions, and metadata to distinguish client versus server usage.

Does this PostgreSQL schema design approach support schema separation for multi-tenant isolation?

Yes, this PostgreSQL schema design pattern requires schema separation to enforce multi-tenant isolation, applying strict guardrails for table structure, identifiers, and naming conventions across different domains.

Why use ULID or UUIDv7 instead of standard UUID for PostgreSQL primary keys?

Use ULID or UUIDv7 for PostgreSQL primary keys instead of standard UUIDs to achieve K-sortable random IDs, which improves indexing performance while maintaining strict tenant-scoped uniqueness across multi-tenant tables.