minirag-pgvector-mcp: Skill for Claude Code

.claude/skills/retrieve/SKILL.md

retrieve is a skill for Claude Code from mck-s/minirag-pgvector-mcp. It costs 37 tokens per session (511 once invoked), scanned A, original, MIT.

A retrieval skill that searches a vector store—a database of text represented for similarity—and returns relevant context with its source and location.

In plain words
What is it for?
It is for finding context by natural-language query, filtering by document type, inspecting search results, and supplying cited context to an LLM.
Why use it?
It avoids manually choosing folders and helps agents ground answers in the most relevant stored documents.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is mck-s/minirag-pgvector-mcp's own configuration. It tells Claude Code how to work on minirag-pgvector-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything minirag-pgvector-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to mck-s/minirag-pgvector-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/mck-s/minirag-pgvector-mcp/main/.claude/skills/retrieve/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/mck-s/minirag-pgvector-mcp

Made for: Claude Code.

Wrote 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.

agentmods badge for retrieve

README.md
[![agentmods](https://agentmods.dev/badge/skills/mck-s/minirag-pgvector-mcp/retrieve.svg)](https://agentmods.dev/skills/mck-s/minirag-pgvector-mcp/retrieve)
Your own site
<a href="https://agentmods.dev/skills/mck-s/minirag-pgvector-mcp/retrieve"><img src="https://agentmods.dev/badge/skills/mck-s/minirag-pgvector-mcp/retrieve.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 511 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.00511
Opus 5 $0.00018 $0.00255
Sonnet 5 $0.00007 $0.00102
Haiku 4.5 $0.00004 $0.00051

Measured 7d ago against content hash fad9d0fbe319, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

retrieve 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 7d 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.

.claude/skills/retrieve/SKILL.md · 44 lines

What it actually says

Retrieve and apply the right context for a task. The evolution of manual folder-based lookup: instead of picking a folder, it embeds the query and pulls the closest chunks, optionally filtered by doctype.

When to invoke

  • An LLM/agent working inside a task needs grounding context from the store.
  • You want to inspect what retrieval returns for a query (debugging relevance).

Inputs

  • query — the natural-language need.
  • doctype (optional) — narrow to one context type (e.g. only spec).
  • k (optional, default 5) — how many chunks to return.

Procedure

  1. Embed the query with the same embedder used at ingest (never mix models).
  2. ANN search: cosine distance <=>, WHERE doctype = $doctype when provided, LIMIT k.
  3. If reranking is enabled: retrieve N (~20), rerank, take top-k.
  4. Return each chunk with content, source, heading_path, score.
  5. When feeding an LLM: include heading_path + source with each chunk so the model (and you) know provenance.

Guardrails

  • Query embedder MUST equal ingest embedder. If embedder_id on chunks differs from the active embedder, stop and report — distances would be meaningless.
  • Don't over-retrieve. Large k adds noise; prefer reranking over a huge k.
  • Return provenance, always. Ungrounded context is how hallucinations sneak in.
  • Do not paraphrase retrieved chunks before handing them to the model — pass them faithfully; let the model synthesize.

Verification

For a known query you have ground truth for, confirm the expected source appears in the top-k. If it doesn't, that's an eval signal — add the case to the golden set (see the eval skill) rather than tweaking blindly.

Self-check

  • Are results relevant, or just lexically similar? If off, revisit chunking (see the ingest skill), not just k.
  • Did I filter by the right doctype? Wrong filter silently starves retrieval.
  • Am I trusting the top result without checking score/provenance? Verify before applying.
Changes

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.

  1. 7d ago First seen · 44 lines · 37 tokens per session scan A fad9d0fbe319

Subscribe to this mod's changes

retrieve is a skill published in the GitHub repository mck-s/minirag-pgvector-mcp (0 stars, last pushed 1mo ago), licensed MIT. It adds 37 tokens to every session and 511 once invoked, about $0.0002 per session on Opus 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-31.

Related

Other skills, from other repositories

agent-platform-rag-engine-management

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…

google/skills · 85 tokens

llm-app-patterns

Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.

davila7/claude-code-templates · 54 tokens

9router-embeddings

Generate vector embeddings via 9Router /v1/embeddings using OpenAI / Gemini / Mistral / Voyage / Nvidia / GitHub embedding models for RAG, semantic search, similarity. Use when the user wants embeddings, vectors, RAG, semantic search, or to embed text.

decolua/9router · 66 tokens

azure-search-documents-dotnet

Azure AI Search SDK for .NET (Azure.Search.Documents). Use for building search applications with full-text, vector, semantic, and hybrid search. Covers SearchClient (queries, document CRUD), SearchIndexClient (index management), and SearchIndexerClient (indexers, skillsets). Triggers: "Azure Search .NET"…

microsoft/skills · 102 tokens

similarity-search-patterns

Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.

foryourhealth111-pixel/Vibe-Skills · 30 tokens

embedding-strategies

Select and optimize embedding models for semantic search and RAG applications. Use when choosing embedding models, implementing chunking strategies, or optimizing embedding quality for specific domains.

foryourhealth111-pixel/Vibe-Skills · 37 tokens