Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add laguagu/claude-code-nextjs-skills --skill postgres-semantic-searchgit clone --depth 1 https://github.com/laguagu/claude-code-nextjs-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/laguagu/claude-code-nextjs-skills/postgres-semantic-search)<a href="https://agentmods.dev/skills/laguagu/claude-code-nextjs-skills/postgres-semantic-search"><img src="https://agentmods.dev/badge/skills/laguagu/claude-code-nextjs-skills/postgres-semantic-search/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/laguagu/claude-code-nextjs-skills/postgres-semantic-search"><img src="https://agentmods.dev/badge/skills/laguagu/claude-code-nextjs-skills/postgres-semantic-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 3 findings, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium MCP Rug Pull · line 58 Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.Fix: Pin the image: image:tag or image@sha256:abc123
- medium MCP Rug Pull · line 64 Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.Fix: Pin the image: image:tag or image@sha256:abc123
- medium MCP Rug Pull · line 70 Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.Fix: Pin the image: image:tag or image@sha256:abc123
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00080 | $0.02965 |
| Opus 5.5 | $0.00032 | $0.01186 |
| Sonnet 5.5 | $0.00016 | $0.00593 |
| Haiku 4.5 | $0.00008 | $0.00297 |
Grade A, and why
postgres-semantic-search scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 216 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PostgreSQL Semantic Search
Decisions, measured findings and silent failure modes for search built on Postgres, plus tested SQL building blocks in scripts/. Syntax the official docs cover well is left to them; what is here goes wrong without an error.
Build order
- Look at what users actually type: identifiers and codes, one-to-three-word terms, full questions, which languages. That decides which arms you need.
- Start with the simplest retrieval suited to those queries: exact/keyword lookup or vector search. For approximate vector search, keep exact vector search as the recall baseline.
- Build two eval sets, long questions and short terms, before tuning (evaluation.md).
- Add another arm and fuse with RRF only where it improves the baseline on the queries that need it (hybrid-search.md).
- Add a reranker last, over the head of a good shortlist (reranking.md).
Change one thing at a time. Predefine the acceptance rule; by default require a gain beyond measured run-to-run spread on the affected query population, without a material loss on the other eval set. Inspect per-query wins/losses and require the agreed latency and cost budget to hold. The numerical findings below are corpus-specific observations, not universal performance guarantees.
Choosing
- Column type by dimensions, not provider:
vector(N)indexes up to 2,000; up to 4,000 index ahalfveccast (or use ahalfveccolumn); above that, binary quantization or Matryoshka truncation. - HNSW by default, IVFFlat when memory or build time rules HNSW out. No row count decides it: measure recall and latency against exact search.
- Models change every few months. Pick embedding and reranker models from the provider's current docs, prefer multilingual models for non-English text, and evaluate on the target language before committing.
- Hybrid when users type both questions and terms. On a Finnish transcript corpus keyword alone was weak on long questions (24 % right first), vector alone on short terms (53 %); hybrid tied vector on long questions and led on short terms (53 % and 93 %; hybrid-search.md).
- BM25 is not available everywhere: managed hosts differ (Neon removed
pg_search). Plain FTS with the fixes below is often enough.
What ships with it
12 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/evaluation.md 4.9 KB
- references/hybrid-search.md 7.7 KB
- references/keyword-search.md 11 KB
- references/pgvector.md 6.1 KB
- references/reranking.md 7.3 KB
- scripts/fuzzy_search.sql 4.5 KB
- scripts/hybrid_search_bm25.sql 6.0 KB
- scripts/hybrid_search_fts.sql 4.3 KB
- scripts/indexes.sql 2.3 KB
- scripts/prefix_tsquery.sql 5.2 KB
- scripts/semantic_search.sql 4.7 KB
- scripts/setup.sql 1.5 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago Changed · -3 lines 185e7b2f6591
- 13d ago Changed · -1 lines f69b9f35f20f
- 24d ago Changed · +31 lines · -99 tokens per session 9cac3a3e5814
- 27d ago Changed · -187 lines · -49 tokens per session d75e8404a2ca
- 28d ago Changed · -1 lines · -31 tokens per session f1efcd825fd9
- 1mo ago Changed · +2 lines · +31 tokens per session d5bc607ff762
- 1mo ago Changed · -34 lines 82f6fc33ed58
- 1mo ago Changed · -14 lines e7b630edc821
- 1mo ago First seen · 423 lines · 228 tokens per session scan A 8c74cf080aa1
postgres-semantic-search is a skill published in the GitHub repository laguagu/claude-code-nextjs-skills (70 stars, last pushed 6d ago), licensed MIT. It adds 80 tokens to every session and 2,965 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
pgvector-semantic-search
Use this skill for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search. Trigger when user asks to: Store or search vector embeddings in PostgreSQL Set up semantic search, similarity search, or nearest neighbor search Create HNSW or IVFFlat indexes for vectors…
postgres-hybrid-text-search
Use this skill to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF). Trigger when user asks to: Combine keyword and semantic search Implement hybrid search or multi-modal retrieval Use BM25/pgtextsearch with pgvector together Implement RRF (Reciprocal…
vector-db-rag-expert
Expert guide for high-performance Vector Databases, Deep RAG architectures, pgvector 0.8+ HNSW, Reciprocal Rank Fusion (RRF), Cross-Encoder Re-ranking, and Late Chunking / Panduan ahli Vector DB, arsitektur Deep RAG, pgvector HNSW, RRF, dan Re-ranking.
ai-vector-brain
Creates reusable vector-brain implementations: repo, docs, compliance. Use when building pgvector SQL, manifests, ingest scripts. Not for context design (dev-context-engineering).
pgvector
PostgreSQL extension for storing vectors and running exact/approximate nearest-neighbor search in SQL.
laravel-vector-search
Use when implementing semantic/vector search in Laravel 13 with PostgreSQL + pgvector.