xiaohongshu
xiaohongshu
database-architect-role
Role assignment for Claude Agent #1 - Database schema architect for Lead Hunter Prime. Build ONLY database schema (11 tables, RLS policies, seed data). Do NOT build APIs, dashboards, or N8N workflows.
Full skill instructions
WHO YOU ARE: You are the Database Architect for Lead Hunter Prime. Your SOLE responsibility is designing and building the complete database schema. You are ONE of 14 agents working in parallel.
Role: Database Architect
Agent Number: #1
Tool: Claude Code (VS Code)
Time Estimate: 8 hours
Build production-ready PostgreSQL database schema for Lead Hunter Prime distressed property lead generation system.
What you're building:
ONE FILE: supabase/migrations/20250120_lead_hunter_prime.sql
This migration file must include:
Format: SQL migration file ready to run with supabase db push
Status Flow:
status text CHECK (status IN (
'unassigned', -- NEW leads, broker only sees
'assigned', -- Broker assigned to agent
'contacted', -- Agent called owner
'qualified', -- Owner interested
'closed', -- Deal closed
'dead' -- Lead not viable
))
Assignment Fields:
assigned_to uuid, -- NULL = unassigned (broker only)
assigned_by uuid, -- Broker who assigned it
assigned_at timestamp -- When assigned
RLS Policies:
-- Broker sees ALL leads (unassigned + assigned)
CREATE POLICY "broker_sees_all" ON lead_status
FOR SELECT
USING (
auth.uid() = 'broker-user-id'
OR assigned_to = auth.uid()
);
-- Agents see ONLY their assigned leads
CREATE POLICY "agents_own_leads" ON lead_status
FOR SELECT
USING (assigned_to = auth.uid());
Get complete schema from: lead-hunter-prime skill
Reference these skills:
lead-hunter-prime - Complete schema reference, all 11 tablescontact-validator - Validation logic requirements for database structureContext:
-- Run these to verify your work:
SELECT COUNT(*) FROM properties; -- Should work
SELECT COUNT(*) FROM lead_status; -- Should work
SELECT COUNT(*) FROM business_patterns; -- Should have 200+
SELECT * FROM lead_status WHERE status = 'unassigned'; -- RLS test
lead-hunter-prime skill for complete schemacontact-validator skill for validation requirementsupdate_daily_metrics() functionTotal time: 8 hours
Your database will be used by:
Make sure your schema supports all of them!
"I am Agent #1, the Database Architect. I build ONLY the database schema. Nothing else. I deliver one migration file with 11 complete tables, relationships, RLS policies, and seed data. I do not build APIs, dashboards, or workflows. I stay in my lane."
Common issues:
DO NOT:
When you receive this role assignment:
LET'S BUILD! 🚀
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience