database-architect-role

Design PostgreSQL schemas with RLS policies, seed data, and indexes.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/AIBPM42/hodgesfooshee-site-spark --skill database-architect-role
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-architect-role
Source: https://github.com/AIBPM42/hodgesfooshee-site-spark/tree/main/.claude/skills/database-architect-role
Command: npx skills add https://github.com/AIBPM42/hodgesfooshee-site-spark --skill database-architect-role

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Building complex, production-ready database schemas for AI systems requires meticulous design, including table relationships, security policies, and performance optimization. This skill provides precise instructions for this critical task.

Core Features & Use Cases

  • Comprehensive Schema Design: Guides the creation of 11 PostgreSQL tables for lead storage, validation, and self-improvement, ensuring a robust data foundation.
  • Row Level Security (RLS) Implementation: Defines RLS policies for granular access control, allowing brokers to see all leads and agents only their assigned ones.
  • Performance & Seed Data: Includes instructions for adding indexes on frequently queried fields and generating seed data for business patterns, ensuring optimal performance and testability.
  • Use Case: You need to set up the core database for a new 'Lead Hunter Prime' system. Use this skill to get precise instructions for building the PostgreSQL schema, including all tables, RLS policies, and seed data, ready for deployment.

Quick Start

Use the database-architect-role skill to build the PostgreSQL schema for the Lead Hunter Prime system.

Frequently Asked Questions about database-architect-role

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

FAQPage Schema
How do I design a PostgreSQL schema for a multi-user lead generation system?

Design a PostgreSQL schema by structuring 11 interconnected tables (properties, owners, contacts, lead_status, validation_history, business_patterns, feedback_log, pattern_performance, spawned_skills, ab_tests, daily_metrics) with foreign keys, constraints, and indexes on frequently queried fields to support lead storage, validation, and role-based access.

How do I implement Row Level Security in PostgreSQL to control what brokers and agents see?

Implement RLS policies in PostgreSQL to grant brokers visibility of all leads and restrict agents to only their assigned leads, using policy rules that enforce data access based on user role and ownership.

Can I use Supabase to deploy a PostgreSQL schema with RLS and seed data?

Yes, Supabase supports PostgreSQL schemas with RLS policies and migration files; you can deploy a production-ready database schema with seed data, indexes, and helper functions through Supabase migrations compatible with your lead generation system.

What tables do I need for tracking lead validation and performance in an AI-driven system?

Create validation_history, business_patterns, feedback_log, pattern_performance, and daily_metrics tables to track lead validation states, AI patterns, performance metrics across 200+ business rules, and enable self-improvement loops in your lead generation workflow.

How do I set up database indexes and helper functions for lead assignment performance?

Add indexes on frequently queried fields like broker and agent role assignments, and create helper functions such as update_daily_metrics to automate metric calculations and optimize query performance across lead assignment workflows.

What seed data should I include when setting up a lead generation database schema?

Populate seed data with 200+ business patterns relevant to lead generation, test datasets for brokers and agents, and initial performance benchmarks to enable immediate testing and validation of your schema's role-based access and assignment logic.