원클릭으로
db-check
Query actual database schema before writing any query, migration, or API endpoint. Prevents wrong column names — the
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Query actual database schema before writing any query, migration, or API endpoint. Prevents wrong column names — the
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | db-check |
| description | Query actual database schema before writing any query, migration, or API endpoint. Prevents wrong column names — the |
Run this BEFORE writing any query, migration, or API endpoint.
List every table your implementation will touch (read or write).
For EACH table, run via Supabase MCP:
SELECT column_name, data_type, is_nullable, column_default
FROM information_schema.columns
WHERE table_name = '<TABLE>'
ORDER BY ordinal_position;
For tables you'll be upserting into:
SELECT
tc.constraint_name,
tc.constraint_type,
kcu.column_name
FROM information_schema.table_constraints tc
JOIN information_schema.key_column_usage kcu
ON tc.constraint_name = kcu.constraint_name
WHERE tc.table_name = '<TABLE>'
ORDER BY tc.constraint_type, kcu.column_name;
SELECT table_name FROM information_schema.views
WHERE table_schema = 'public'
AND table_name LIKE 'v_%<keyword>%';
If a view already does what you need, use it instead of writing a complex join.
Before writing any implementation code, print:
Schema for <table>:
- column_name (data_type, nullable/required, default)
- ...
Primary key: <column>
Unique constraints: <columns>
Existing views: <any matching views>
xero_invoices / xero_transactions / bank_statement_lines)Before any query that emits a dollar figure:
xero_invoices.type (NOT invoice_type); PK is xero_id; xero_transactions has no reference. BAS-excluded items live in line_items[]->>tax_type='BASEXCLUDED'.xero_transactions voids are status='DELETED'; xero_invoices carry BOTH 'DELETED' and 'VOIDED' (FY26: 96 VOIDED vs 23 DELETED). Filter them NULL-safely (status IS DISTINCT FROM 'DELETED' AND status IS DISTINCT FROM 'VOIDED' for invoices; DELETED-only for transactions) from every money read — or use an allow-list (status IN ('AUTHORISED','PAID')). Voided rows once inflated the R&D claim ~$32K..select() at 1000 rows. Aggregate in SQL (execute_sql / psql) — SQL SUM() is not capped.NM Personal / NJ Marchesi T/as ACT Maximiser).project_monthly_financials.→ Full money guards: .claude/skills/tag-transactions/SKILL.md + memory command-center-finance-truth.md.
Read ACT's energy-orbit relational CRM — where a person sits (supporter ring vs community constellation), their evidence or owes, flags (violation/dupe/ghost/uncaptured), and the gated next move. Read-only by default; never auto-writes. Use when user says "orbit", "/orbit", "where does <person> sit", "show me the orbit", "is <person> on the wrong lane / a community-line violation", "who's uncaptured", or wants to read or act on the relationship system before any GHL write.
BAS quarter preparation, receipt acquittal, and learning loop for ACT. Use for BAS prep, missing receipt hunts, vendor reconciliation, and quarterly retrospectives. Accumulates patterns and learnings across quarters so each BAS cycle gets cleaner.
Drives the NAB Visa
Verify Supabase connection, TypeScript health, and schema before any database or implementation work. Use when starting a session, before migrations, or when something feels off.
Review and tag untagged Xero transactions / bank lines / invoices with project codes — the cross-project spend & income alignment workflow. Use when user says "tag transactions", "fix transaction tagging", "improve transaction coverage", or "align spend/income across projects".
OCAP consent gate. Run BEFORE publishing, syndicating, or externally sharing ANY storyteller content — a story, quote, name, photo, or video — to wiki story pages, newsletters, Empathy Ledger syndication, social, funder decks, or the website. Grills the consent provenance, verifies names and place names, and BLOCKS publish if the audit trail is incomplete or anything is unverified. Use whenever you are about to make community or storyteller content visible outside ACT.