Postgres Vectors
Use when working with embeddings, semantic similarity, vector search, or the <-> <#> <=> operators. Load for pgvector queries, HNSW index creation, embedding storage, or similarity calculations. Covers distance operators, index strategies, and common pitfalls with 384-dimensional vectors.
Install
/plugin marketplace add Freddy-CHEN-ux/00_claude_skillsThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add Freddy-CHEN-ux/00_claude_skills --skill postgres-vectorsgit clone --depth 1 https://github.com/Freddy-CHEN-ux/00_claude_skills.git /tmp/00_claude_skills
mkdir -p ~/.claude/skills
cp -r /tmp/00_claude_skills/skills/postgres-vectors ~/.claude/skills/postgres-vectorsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Postgres Vectors (pgvector) Vector similarity search patterns for semantic matching. > **Announce:** "I'm using postgres-vectors to implement vector similarity correctly." ## Vector Storage Embeddings are stored in the `embeddings` table: ```sql CREATE TABLE embeddings ( id uuid PRIMARY KEY DEFAULT gen_random_uuid(), source_text text NOT NULL, embedding extensions.vector(384) NOT NULL, -- 384 dimensions from gte-small created_at timestamptz DEFAULT now() ); -- Unique constraint prevents duplicate embeddings CREATE UNIQUE INDEX idx_embeddings_source_text ON embeddings (source_text); ``` **Key points:** - Use `extensions.vector(384)` - pgvector is in extensions schema - 384 dimensions matches gte-small model output - Deduplicate by source_text ## Distance Operators | Operator | Distance Type | Use Case | |----------|---------------|----------| | `<->` | L2 (Euclidean) | General purpose | | `<#>` | Inner product (negative) | Normalized vectors (fastest) | | `<=>` | Cosine distance | When normalization varies | **For this project:** Use `<=>` (cosine) since we want similarity regardless of vector magnitude. ```sql -- Cosine similarity = 1 - cosine_distance SELECT id, 1 - (embedding <=> query_embedding) AS similarity FROM embeddings WHERE 1 - (embedding <=> query_embedding) > 0.5 -- 0.5 threshold ORDER BY embedding <=> query_embedding -- ASC for distance LIMIT 10; ``` ## Index Strategy ### When to Use HNSW
Details
- Skill name
postgres-vectors- Repository
- Freddy-CHEN-ux/00_claude_skills
- Path
skills/postgres-vectors/SKILL.md- Repo updated
- 10 January 2026
FAQ
What does the Postgres Vectors skill do?
Use when working with embeddings, semantic similarity, vector search, or the <-> <#> <=> operators. Load for pgvector queries, HNSW index creation, embedding storage, or similarity calculations. Covers distance operators, index strategies, and common pitfalls with 384-dimensional vectors.
How do I install the Postgres Vectors skill?
Claude Code plugin: /plugin marketplace add Freddy-CHEN-ux/00_claude_skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Postgres Vectors popular?
It lives in Freddy-CHEN-ux/00_claude_skills, which has 8 GitHub stars and 3 forks.
Related skills
Add Integration
8Freddy-CHEN-ux/00_claude_skills
Build a new API integration for Nexus. Load when user mentions "add integration", "new integration", "integrate with", "connect to [service]", or "build [service] integration". Interactive workflow that discovers API endpoints, plans the integration, and creates a project for implementation.
AI Agents
8Freddy-CHEN-ux/00_claude_skills
Production-grade AI agent patterns with MCP integration, agentic RAG, handoff orchestration, multi-layer guardrails, and observability (modern best practices)
AI LLM
8Freddy-CHEN-ux/00_claude_skills
Production LLM engineering skill. Covers strategy selection (prompting vs RAG vs fine-tuning), dataset design, PEFT/LoRA, evaluation workflows, deployment handoff to inference serving, and lifecycle operations with cost/safety controls.
Search Skill Database
8Freddy-CHEN-ux/00_claude_skills
Query ALL available Skills database in Notion with filters. Load when user mentions "search skill database", "query notion", "search skills database", "find skills in notion", or "browse notion skills".
Gameplay SQL
8Freddy-CHEN-ux/00_claude_skills
Test game mechanics via SQL. Use game_* tools for gameplay flow.
Share Skill
8Freddy-CHEN-ux/00_claude_skills
Push a local skill to the Notion skills database. Load when user mentions "share skill", "export skill", "push to notion", "add skill to database", or after creating a new skill with create-skill.
Browse the most popular Claude skills, all databases skills, or write your own with the skills generator.