sales-neon
БесплатноБез исполняемых скриптовНе проверенNeon PostgreSQL vault/archive configuration, schema, and operational patterns for the Sales Navigator hub (HUB-SALES-NAV-20260130). Use this skill whenever…
от FDU-INS★ 84 звезды на GitHubОб этом скилле
Sales Navigator -- Neon + CF D1 Skill
Architecture (BAR-100 Shift)
The data layer follows a two-tier model:
| Tier | Technology | Role |
|---|---|---|
| Working | CF D1 / CF KV | Active queries, runtime state, application traffic |
| Vault | Neon Serverless PostgreSQL | Archival storage, migrations, canonical schema authority |
CF Workers serve as the compute layer. The Figma UI design layer connects to CF Workers, which read/write CF D1 for working data and sync to Neon vault for long-term persistence.
What This Repo Uses
| Component | Value |
|---|---|
| Hub ID | HUB-SALES-NAV-20260130 |
| Hub Name | sales-navigator |
| Working Database | CF D1 (Cloudflare Workers runtime) |
| Vault Database | Neon Serverless PostgreSQL |
| Working KV | CF KV (session state, caches) |
| Schema | sales (canonical), sn_* prefix (deprecated) |
| Compute Layer | CF Workers |
| Design Layer | Figma UI |
| Secrets Provider | Doppler (doppler run -- npm run dev) |
| Column Registry | column_registry.yml (canonical schema spine) |
| Canonical Migration | sales/migrations/001_sales_schema.sql (targets Neon vault, per ADR-005) |
| Deprecated Migration | src/data/migrations/001_create_sales_navigator_schema.sql (sn_* prefix, DO NOT execute) |
Connection Configuration
All secrets are injected via Doppler. No .env files with real values are permitted.
| Variable | Purpose | Injected By |
|---|---|---|
NEON_DATABASE_URL |
Neon vault connection string (migrations, archive sync) | Doppler |
CF_D1_DATABASE_ID |
CF D1 working database identifier | Doppler |
CF_ACCOUNT_ID |
Cloudflare account identifier | Doppler |
CF_API_TOKEN |
Cloudflare API token for Workers/D1/KV | Doppler |
COMPOSIO_API_KEY |
External API calls via Composio MCP | Doppler |
Neon vault connection pattern (migrations and archive only):
# Pooled (archive reads, sync operations)
postgresql://user:[email protected]/dbname?sslmode=require
# Direct (migrations, admin, pg_dump)
postgresql://user:[email protected]/dbname?sslmode=require
Critical: Neon is vault/archive ONLY. All application-level queries go through CF D1.
Use the Neon pooled endpoint for archive sync operations. Use the direct endpoint only for
migrations and pg_dump. See master skill IMO-Creator/skills/neon/SKILL.md for full
connection pooling rules and PgBouncer transaction-mode constraints.
Schema / Data Model
The canonical schema is defined in column_registry.yml. All generated TypeScript types and
Zod schemas are projections of this file and must never be hand-edited.
Spine Table
| Table | Purpose |
|---|---|
sales.sales_state |
Phase router -- authoritative identity, gates sub-hub access |
Columns: sales_id (UUID PK, universal join key), legal_name (TEXT), domicile_state (TEXT), current_phase (TEXT: factfinder/insurance/systems/quotes), status (TEXT), source (TEXT), version (INT), created_at, updated_at
Sub-Hub Tables (4 meetings)
| Sub-Hub | Canonical Table | Error Table | Key Columns |
|---|---|---|---|
| Meeting 1: FactFinder | sales.sales_factfinder |
sales.sales_factfinder_errors |
employer_name, employee_count, renewal_month, prior_broker |
| Meeting 2: Insurance | sales.sales_insurance |
sales.sales_insurance_errors |
funding_model, strategy_selected |
| Meeting 3: Systems | sales.sales_systems |
sales.sales_systems_errors |
payroll_system, admin_model, compliance_owner |
| Meeting 4: Quotes | sales.sales_quotes |
sales.sales_quotes_errors |
quote_version, total_cost (USD_CENTS), approved_flag |
All sub-hub tables join to spine via sales_id (TEXT). Each sub-hub has exactly 1 CANONICAL
and 1 ERROR table per OWN-10a/OWN-10b.
For the full column-level schema reference, see references/schema.md.
Operational Patterns
Phase Progression
The sales.sales_state.current_phase column gates which sub-hub is active:
factfinder -> insurance -> systems -> quotes -> [PROMOTE_TO_CLIENT]
Query Pattern (Working Layer)
Application queries go through CF Workers reading/writing CF D1. For vault operations (reporting, archival queries), CF Workers connect to Neon via the pooled endpoint.
Schema Changes
- Update
column_registry.yml - Run
./scripts/codegen-generate.sh - Generated output lands in
src/data/hub/generated/andsrc/data/spokes/generated/ - Pre-commit hook enforces sync between registry and generated output
- Apply migration to Neon vault, then sync D1 schema
Error Tables
All error tables are append-only. Columns: id (BIGSERIAL in Neon vault; INTEGER AUTOINCREMENT in D1),
sales_id (nullable FK), error_code, payload (JSONB in Neon; TEXT/JSON in D1), process_id, created_at.
Known Issues
- Deprecated sn_ prefix*: The original migration (`001_create_sales_navigator_schema.
Установить sales-neon в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл sales-neon?
Neon PostgreSQL vault/archive configuration, schema, and operational patterns for the Sales Navigator hub (HUB-SALES-NAV-20260130). Use this skill whenever querying, migrating, debugging, or making data-layer decisions in the sales-navigator repo. Trigger on: Neon, PostgreSQL, Postgres, database, schema, sales_state, sales_factfinder, sales_insurance, sales_systems, sales_quotes, column_registry, migration, connection pooling, NEON_DATABASE_URL, pipeline tracking, prospect data, meeting data, CF D1, CF KV, Cloudflare Workers, or any reference to the sales data layer. Also trigger when discussing CRM intake, 4-meeting process state, quote approval, or PROMOTE_TO_CLIENT events. If the question touches relational data in this repo, this skill applies even if the user does not mention Neon by name.
Как установить скилл sales-neon?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sales-neon запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic