kb-search

kb-search is a skill for Claude Code, Codex from mathiasbourgoin/roster. It costs 26 tokens per session (822 once invoked), scanned A, original, MIT.

A search tool for a project's knowledge base, using both meaning-based and exact-word matching to rank relevant passages. A knowledge base is a searchable collection of project documents.

In plain words
What is it for?
Use it to look up project concepts, terms, or constraints and retrieve the most relevant current sections.
Why use it?
It finds specific guidance without requiring the agent to load every knowledge-base file, while filtering out outdated material by default.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to look up project concepts, terms, or constraints and retrieve the most relevant current sections.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mathiasbourgoin/roster/kb-search
Install

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.

Any agent
npx skills add mathiasbourgoin/roster --skill kb-search
Clone the repo
git clone --depth 1 https://github.com/mathiasbourgoin/roster

Made for: Claude Code, Codex.

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 kb-search

README.md
[![agentmods](https://agentmods.dev/badge/skills/mathiasbourgoin/roster/kb-search/github.svg)](https://agentmods.dev/skills/mathiasbourgoin/roster/kb-search)
Your own site
<a href="https://agentmods.dev/skills/mathiasbourgoin/roster/kb-search"><img src="https://agentmods.dev/badge/skills/mathiasbourgoin/roster/kb-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.

agentmods 80×15 button for kb-search

Your own site · 80×15
<a href="https://agentmods.dev/skills/mathiasbourgoin/roster/kb-search"><img src="https://agentmods.dev/badge/skills/mathiasbourgoin/roster/kb-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 822 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.00026 $0.00822
Opus 5 $0.00013 $0.00411
Sonnet 5 $0.00005 $0.00164
Haiku 4.5 $0.00003 $0.00082

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

Security

Grade A, and why

kb-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 9d 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.

.agents/skills/kb-search/SKILL.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You perform hybrid semantic and keyword search over the project KB's LanceDB index. Use this skill instead of loading all KB files when searching for a specific concept, term, or constraint.

Prerequisite: kb/.index/ must exist. Run /kb-reindex first if not.

Steps

Step 1 — Pre-condition check

[ -d kb/.index ] && echo "index: present" || echo "index: absent"

If absent:

⛔ No KB index found at kb/.index/. Run /kb-reindex to build the index first.


Step 2 — Execute hybrid search

Accept:

  • query (string): the search query
  • top_k (int, default: 5): number of results to return
  • include_all_statuses (bool, default: false): if false, filter out historical and superseded chunks

Hybrid search algorithm:

  1. Vector search: embed query with the same model used for indexing. Compute cosine similarity against all chunks in kb_chunks. Retrieve top top_k * 3 candidates.

  2. Keyword search: tokenize query. Score each candidate with BM25 against its content field.

  3. Score fusion: combine vector score (weight 0.7) and BM25 score (weight 0.3). Re-rank by fused score.

  4. Status filter: if include_all_statuses = false, remove chunks where status is historical or superseded. Apply this as a pre-filter on the vector query (not post-fusion) so that top_k * 3 candidates are drawn only from live-doctrine and derived chunks, ensuring top_k results are always available when they exist.

  5. Return top top_k results.


Step 3 — Format results

Return a ranked list:

KB Search Results for: "<query>"
Showing top N results (historical/superseded filtered)

1. [score: 0.92] kb/properties.md § "Invariants"
   > "All database writes must be wrapped in explicit transactions..."
   Status: live-doctrine

2. [score: 0.87] kb/spec.md § "API Contract"
   > "The API must return errors in the format {error: string, code: int}..."
   Status: live-doctrine

3. [score: 0.61] kb/architecture.md § "Storage Layer"
   > "PostgreSQL is the primary storage backend..."
   Status: live-doctrine

Read the full file on GitHub · 84 lines

Files

What ships with it

1 file 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.

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. 9d ago First seen · 84 lines · 26 tokens per session scan A 0e199b9595b1

Subscribe to this mod's changes

kb-search is a skill published in the GitHub repository mathiasbourgoin/roster (2 stars, last pushed 3d ago), licensed MIT. It adds 26 tokens to every session and 822 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-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

browserwing-admin

Manage and operate BrowserWing — an intelligent browser automation platform. Install dependencies, configure LLM, create/manage/execute automation scripts, use AI-driven exploration to generate scripts, browse the script marketplace, and troubleshoot issues.

MemTensor/MemOS · 47 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