Skip to main content

Local DB

Path: .cursor/skills/local-db/SKILL.md

Category: Database

Triggers: database, data, tables, schema, SQL, queries, records, rows

What It Does

Provides connection details and query patterns for the local PostgreSQL database running in Docker (goosehead-postgres container, fastlane schema). Used by the agent to inspect tables, run queries, and explore data without needing to memorize connection details.

Connection

docker exec goosehead-postgres psql -U goosehead -d goosehead -c "SQL_HERE"

Schema: fastlane — always prefix tables with fastlane.

Key Tables

CategoryTables
Carrierscarriers, carrier_lob_support, carrier_state_support
Formsforms, form_fields, form_overrides
CDMghcms_cdm_schemas, ghcms_cdm_fields, ghcms_cdm_carrier_overrides
Sessionsfastlane_portal_sessions, drivers, carrier_quote_sessions
Configghcms_carrier_step_config, ghcms_carrier_mappings

Common Patterns

Find tables by pattern:

SELECT table_name FROM information_schema.tables
WHERE table_schema = 'fastlane' AND table_name LIKE '%pattern%';

Inspect table structure:

SELECT column_name, data_type, is_nullable
FROM information_schema.columns
WHERE table_schema = 'fastlane' AND table_name = 'table_name'
ORDER BY ordinal_position;

Sample data with limit:

SELECT * FROM fastlane.table_name LIMIT 5;

Relationship to db-explorer Sub-Agent

This skill provides the connection details and patterns. The db-explorer sub-agent loads this skill as its first action and then uses it to execute queries autonomously.