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.
curl -O https://raw.githubusercontent.com/mck-s/minirag-pgvector-mcp/main/.claude/skills/retrieve/SKILL.mdgit clone --depth 1 https://github.com/mck-s/minirag-pgvector-mcpWrote 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/mck-s/minirag-pgvector-mcp/retrieve)<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>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.00037 | $0.00511 |
| Opus 5 | $0.00018 | $0.00255 |
| Sonnet 5 | $0.00007 | $0.00102 |
| Haiku 4.5 | $0.00004 | $0.00051 |
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.
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. onlyspec).k(optional, default 5) — how many chunks to return.
Procedure
- Embed the query with the same embedder used at ingest (never mix models).
- ANN search: cosine distance
<=>,WHERE doctype = $doctypewhen provided,LIMIT k. - If reranking is enabled: retrieve N (~20), rerank, take top-k.
- Return each chunk with
content,source,heading_path,score. - When feeding an LLM: include
heading_path+sourcewith each chunk so the model (and you) know provenance.
Guardrails
- Query embedder MUST equal ingest embedder. If
embedder_idon chunks differs from the active embedder, stop and report — distances would be meaningless. - Don't over-retrieve. Large
kadds noise; prefer reranking over a hugek. - 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.
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.
- 7d ago First seen · 44 lines · 37 tokens per session scan A fad9d0fbe319
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.
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…
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.
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.
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"…
similarity-search-patterns
Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.
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.