What problem does it solve?
Poor schema design leads to expensive refactors, slow queries, and untraceable AI behavior; this Skill guides engineers to design schemas that match query patterns, scale reliably, and support AI-specific storage needs like embeddings and conversation history.
Core Features & Use Cases
- Query-first modeling: Walks you through identifying core entities, common read/write patterns, and designing tables or collections that make those queries fast and simple.
- AI-specific patterns: Provides canonical tables and decisions for conversation storage, LLM run auditing, embedding storage with pgvector, and append-only agent state with versioning.
- Operational guidance: Covers indexing strategies, naming conventions, token and cost tracking, JSONB usage, and schema review checklists to avoid common pitfalls.
- Use Case: Design a PostgreSQL schema with pgvector to store chat sessions, messages, embeddings, llm run logs, and immutable agent state for production monitoring and retrievability.
Quick Start
Use the database-design skill to draft a PostgreSQL schema that stores sessions, messages, llm_runs, embeddings (with pgvector), and append-only agent_state snapshots for a conversational agent.