Skip to content

fix: add scaffolding triggers and reference loading guide to supabase-postgres-best-practices#99

Open
JesseVent wants to merge 1 commit into
supabase:mainfrom
JesseVent:fix/postgres-best-practices-scaffolding-triggers
Open

fix: add scaffolding triggers and reference loading guide to supabase-postgres-best-practices#99
JesseVent wants to merge 1 commit into
supabase:mainfrom
JesseVent:fix/postgres-best-practices-scaffolding-triggers

Conversation

@JesseVent

@JesseVent JesseVent commented Jun 5, 2026

Copy link
Copy Markdown

Problem

supabase-postgres-best-practices references never load when an agent is given a greenfield scaffolding task. Prompts like create a supabase backend, use supabase as the database, or I'm building a new app with Supabase previously returned zero references from this skill — the agent proceeded using stale training data to make schema decisions.

Tested against claude-haiku-4.5 without the skill, the model produced @supabase/auth-helpers-nextjs (deprecated), NEXT_PUBLIC_SUPABASE_ANON_KEY (old key name), and createClient as a singleton (wrong pattern for App Router).

Root Cause

Two compounding issues:

1. Description only triggers on optimization vocabulary

An agent scaffolding a new project isn't "optimizing" — it's building from scratch. The trigger never fires.

2. Skill body had no conditional loading guidance

The model was left guessing which references to load from file titles alone. For vague prompts, titles like query-missing-indexes.md don't match.

Changes

  • Description — added scaffolding/setup trigger phrases
  • Reference Loading Guide — new table mapping scenarios to the references that should load first, modelled on the conditional loading pattern in the base supabase skill

Eval Results

Tested with claude-haiku-4.5, 97 prompts.

Prompt Before After
create a supabase backend 0 references schema-primary-keys, schema-data-types, security-rls-basics + more
use supabase as the database 0 references schema-primary-keys, schema-data-types, security-rls-basics
I'm building a new app with Supabase 0 references schema-primary-keys, schema-data-types, security-rls-basics
I'm new to Supabase, where do I start 0 references schema-primary-keys, schema-data-types, security-rls-basics

Total reference loads across all 97 prompts: 227 → 245 (+18). No regressions on existing prompts. All 63 tests pass.

Closes #100

…-postgres-best-practices

Greenfield prompts like 'create a supabase backend' previously loaded zero
references from this skill because the description only triggered on
optimization/performance vocabulary.

Two changes:
- Extend description to include scaffolding/setup language
- Add Reference Loading Guide table so the model knows which references
  to load for each scenario rather than guessing from file titles alone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

user-feedback: supabase-postgres-best-practices references never load for greenfield scaffolding prompts

1 participant