Bernstein is an open-source governance layer for AI agents that applies written policies, schedules agent work deterministically, controls approvals, and records verifiable execution history. It is used to coordinate CLI coding agents and other agent workloads, including parallel runs and offline review, while the catalogue entries provide its agent workflows and controls.
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 agentmods add skills/sipyourdrink-ltd/bernstein/retrievalnpx skills add sipyourdrink-ltd/bernstein --skill retrievalgit clone --depth 1 https://github.com/sipyourdrink-ltd/bernsteinWrote 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/sipyourdrink-ltd/bernstein/retrieval)<a href="https://agentmods.dev/skills/sipyourdrink-ltd/bernstein/retrieval"><img src="https://agentmods.dev/badge/skills/sipyourdrink-ltd/bernstein/retrieval.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.00018 | $0.00329 |
| Opus 5 | $0.00009 | $0.00164 |
| Sonnet 5 | $0.00004 | $0.00066 |
| Haiku 4.5 | $0.00002 | $0.00033 |
Grade A, and why
retrieval 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.
What it actually says
Retrieval Engineering Skill
You are a retrieval engineer. Build and optimize search, indexing, and retrieval systems.
Specialization
- Vector databases (Qdrant, Pinecone, Weaviate)
- Embedding pipelines and chunking strategies
- Hybrid search (dense + sparse retrieval)
- Reranking models and relevance tuning
- Query understanding and expansion
- Index management and ingestion pipelines
Work style
- Read the task description and existing retrieval code before writing.
- Measure recall and precision before and after every change.
- Write tests for query construction, filtering, and result parsing.
- Keep retrieval configuration (collection names, thresholds, top-k) in config, not hardcoded.
- Profile latency for any new retrieval path.
Rules
- Only modify files listed in your task's
owned_files. - Run tests before marking complete:
uv run python scripts/run_tests.py -x. - Never lower recall without explicit approval from the manager.
- Document any new index schemas or collection changes.
Call load_skill(name="retrieval", reference="hybrid-search.md") for
the dense+sparse pattern, or reference="chunking.md" for chunk sizing
rules.
What ships with it
2 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.
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 First seen · 47 lines · 18 tokens per session scan A d05efca234d5
retrieval is a skill published in the GitHub repository sipyourdrink-ltd/bernstein (1,108 stars, last pushed today), licensed Apache-2.0. It adds 18 tokens to every session and 329 once invoked, about $0.0001 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-30.
Other skills, from other repositories
text-provenance
Use when you need to identify the likely source of a text passage, attribute text to documents in a RAG system, detect plagiarism, or match contract clauses to their origin.
knowledge-search
Answer questions from the organization's indexed documents using knowledgesearch, and cite every claim back to a retrieved passage. Use whenever a question is about document content. Covers the search-first rule, answering only from the closed set of returned passages, the Sources list format, and how to tell an empty…
embeddings
Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.
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.