Skip to content

Comments

feature: vectors agent references#41

Open
Rodriguespn wants to merge 63 commits intofeature/supabase-skillfrom
feature/vectors-agent-references
Open

feature: vectors agent references#41
Rodriguespn wants to merge 63 commits intofeature/supabase-skillfrom
feature/vectors-agent-references

Conversation

@Rodriguespn
Copy link
Collaborator

Summary

Adds 8 vector/AI reference files for pgvector-based search and RAG:

  • Setup (vectors-setup-pgvector): Extension installation, column types, and dimension choices
  • Indexing (vectors-index-*): HNSW (recommended default) and IVFFlat with parameter tuning
  • Search (vectors-search-*): Semantic search with cosine similarity and hybrid search using RRF (Reciprocal Rank Fusion)
  • Embeddings (vectors-embed-generation): Built-in gte-small (384 dims) and OpenAI (1536 dims) patterns
  • RAG (vectors-rag-patterns): Retrieval-augmented generation with RLS-aware security invoker functions
  • Performance (vectors-perf-tuning): Compute sizing per tier, index parameter tuning, and probes/ef_search optimization

All search functions use security invoker to respect RLS. Includes compute sizing guidance (Free: 20K vectors, Small: 50K, Medium: 100K for 1536-dim). Updates SKILL.md, AGENTS.md, and _sections.md.

Rodriguespn and others added 30 commits January 28, 2026 15:53
The CLAUDE.md symlink causes installation errors when using
`npx skills add` as it tries to copy AGENTS.md to itself.

- Remove createClaudeSymlink function from build.ts
- Remove claudeSymlink from SkillPaths interface
- Remove CLAUDE.md references from AGENTS.md structure documentation
- Delete existing CLAUDE.md symlink from skills directory

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a sanity test that verifies the skills CLI installation works:
- Runs `npx skills add . -a claude-code -y` using current directory
- Checks command doesn't fail (exit code 0)
- Verifies .claude/skills directory is created
- Dynamically discovers skills in the repo and verifies they're installed
- Checks SKILL.md exists in each installed skill

The test runs on every push to main and pull requests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: supabase db references

* refactor: move database references to db subdirectory

Move all database reference files to references/db/ to organize
by product area and take advantage of the new subdirectory support
in the build system.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
The build system now correctly preserves subdirectory paths when
generating the Available References section. For example, files in
references/db/ are now listed as references/db/file.md instead of
just references/file.md.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Filipe Cabaço <filipecabaco@gmail.com>
Co-authored-by: Filipe Cabaço <filipecabaco@gmail.com>
Co-authored-by: Filipe Cabaço <filipecabaco@gmail.com>
Co-authored-by: Filipe Cabaço <filipecabaco@gmail.com>
Co-authored-by: Filipe Cabaço <filipecabaco@gmail.com>
The CLAUDE.md symlink causes installation errors when using
`npx skills add` as it tries to copy AGENTS.md to itself.

- Remove createClaudeSymlink function from build.ts
- Remove claudeSymlink from SkillPaths interface
- Remove CLAUDE.md references from AGENTS.md structure documentation
- Delete existing CLAUDE.md symlink from skills directory

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a sanity test that verifies the skills CLI installation works:
- Runs `npx skills add . -a claude-code -y` using current directory
- Checks command doesn't fail (exit code 0)
- Verifies .claude/skills directory is created
- Dynamically discovers skills in the repo and verifies they're installed
- Checks SKILL.md exists in each installed skill

The test runs on every push to main and pull requests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Rodriguespn and others added 20 commits January 30, 2026 13:40
- Add references/getting-started-locally.md for local development
- Update SKILL.md with Local Development reference
- Add CLI usage note recommending npx for version consistency

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove .claude from git tracking and add to .gitignore.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…itignore

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Merge feature/supabase-skill
- Move realtime/* files to realtime-* prefix in references/
- Remove .claude from git tracking
- Update SKILL.md with flat paths
- Rebuild AGENTS.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move all database reference files to references/db/ to organize
by product area and take advantage of the new subdirectory support
in the build system.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- pg_cron requires pg_catalog schema, not extensions (critical fix)
- Add publishable/secret key types to Identifying Keys section
- Fix Dashboard path to Settings > API Keys
- Fix migration up comment: applies all pending, not single

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace bullet list with proper table showing publishable/secret keys
alongside legacy anon/service_role keys, matching current Supabase docs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add root _sections.md with db and realtime sections. All reference
files use flat structure in references/ directory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use <#> (inner product) operator instead of <=> (cosine distance)
- Use extensions.vector(512) instead of vector(1536)
- Remove `stable` and `security invoker` qualifiers
- Add full_text_weight, semantic_weight, rrf_k parameters
- Use least(match_count, 30) cap for over-fetching
- Remove default value from match_count (required param)
- Use parameterized rrf_k and weights in RRF scoring formula

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- hybrid search: improve examples with proper table schema, HNSW index,
  parameter docs, and operator guidance
- perf tuning: fix compute sizing (Nano 0.5GB, add Micro tier, correct
  Large to ~225K)
- rag patterns: add missing match_document_chunks SQL function definition

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Rodriguespn Rodriguespn requested a review from gregnr February 9, 2026 20:37
@Rodriguespn Rodriguespn self-assigned this Feb 9, 2026
@Rodriguespn Rodriguespn added the new-rule Adding a new rule(s) to a skill label Feb 9, 2026
@Rodriguespn
Copy link
Collaborator Author

@gregnr commented on closed PR

As I'm reviewing this I'm coming up with more questions than answers - not specifically because anything is incorrect in these skills, but moreso because our vector docs themselves need some rework. Can we park these rules for the first iteration of the Supabase skill and iterate on them after initial release?

@Rodriguespn
Copy link
Collaborator Author

@Rodriguespn commented on closed PR

As I'm reviewing this I'm coming up with more questions than answers - not specifically because anything is incorrect in these skills, but moreso because our vector docs themselves need some rework. Can we park these rules for the first iteration of the Supabase skill and iterate on them after initial release?

Vectors are a main feature of AI apps for searching and embedding storing, so I would like to have vectors as part of the initial release of Supabase skills. If you think that these skills will mislead agents and do more harm than good happy to keep this PR out of skills initial release @gregnr

@Rodriguespn
Copy link
Collaborator Author

@gregnr commented on closed PR

Vectors are a main feature of AI apps for searching and embedding storing

Agreed, but is this our target use case for launch? To me we want a holistic Supabase skill, particularly on high-usage APIs / features. People do use vectors, but not as frequently as other core products. Feel free to push back if you still think we should include these.

@Rodriguespn
Copy link
Collaborator Author

@Rodriguespn commented on closed PR

People do use vectors, but not as frequently as other core products.

I agree with you that this feature might not be as popular as our core features so I'm comfortable to ship this first version without the vector references.

not specifically because anything is incorrect in these skills, but moreso because our vector docs themselves need some rework

Could you please give me more context about this and the next steps to take to have these skills? What rework do you think our vector docs need?

@Rodriguespn Rodriguespn force-pushed the feature/supabase-skill branch 3 times, most recently from 92fcd19 to 6bb9a7c Compare February 16, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-rule Adding a new rule(s) to a skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants