knowledge-search

knowledge-search is a command for Claude Code from vishnu2kmohan/mcp-server-langgraph. It costs 16 tokens per session (2,578 once invoked), scanned B, original, MIT.

A command for searching a project’s shared knowledge base across source code, tests, documentation, architecture notes, context files, and Git history.

In plain words
What is it for?
Use it to look up topics such as authentication, caching, testing approaches, deployment, or other project-specific questions.
Why use it?
It helps find existing decisions, patterns, and examples without searching each project area separately.

Command for Claude Code

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.

agentmods
npx agentmods add commands/vishnu2kmohan/mcp-server-langgraph/knowledge-search
Clone the repo
git clone --depth 1 https://github.com/vishnu2kmohan/mcp-server-langgraph

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/vishnu2kmohan/mcp-server-langgraph/knowledge-search.svg)](https://agentmods.dev/commands/vishnu2kmohan/mcp-server-langgraph/knowledge-search)
Your own site
<a href="https://agentmods.dev/commands/vishnu2kmohan/mcp-server-langgraph/knowledge-search"><img src="https://agentmods.dev/badge/commands/vishnu2kmohan/mcp-server-langgraph/knowledge-search.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,578 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
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 $0.00016 $0.02578
Opus 5 $0.00008 $0.01289
Sonnet 5 $0.00003 $0.00516
Haiku 4.5 $0.00002 $0.00258

Measured 4d ago against content hash 5e6d12be8306, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

knowledge-search scanned grade B with 1 finding 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 4d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

cat .claude/context/testing-patterns.md | grep -A 30 "Property"
.claude/commands/knowledge-search.md · 369 lines

How it starts

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

You are tasked with searching the project knowledge base for relevant information. This command provides semantic search across code, documentation, ADRs, and context files.

Knowledge Base Context

Sources:

  • Code: All Python source files
  • Documentation: ADRs, guides, API docs
  • Context: Testing patterns, code patterns, recent work
  • Git History: Commit messages and changes
  • Templates: Sprint planning, ADRs, bug investigation

Total Knowledge: ~220 Python files, 39 ADRs, 400+ tests, 100+ commits

Your Task

Step 1: Gather Search Query

Ask the user what they're looking for:

Question: What would you like to search for?

  • Header: "Search Query"
  • Provide text input
  • Examples:
    • "How do we handle authentication?"
    • "What's our caching strategy?"
    • "Examples of property-based tests"
    • "How to deploy to GKE?"

Step 2: Determine Search Scope

Based on the query, determine where to search:

Search Scopes:

  1. Code - Source files in src/
  2. Tests - Test files in tests/
  3. Documentation - ADRs, guides in docs/
  4. Context - .claude/context/ files
  5. All - Search everywhere

Query-to-Scope Mapping:

  • Authentication/Authorization → Code + ADRs
  • Testing patterns → Tests + Context
  • Deployment → Documentation + Scripts
  • Configuration → Code + ADRs
  • Error handling → Code + Context

Step 3: Execute Search

Search Strategy:

# 1. Grep for exact matches
grep -r "<query>" <scope>/ -l

# 2. Grep for case-insensitive matches
grep -ri "<query>" <scope>/ -l -n

# 3. Search related terms (synonyms)
# Example: "cache" → also search "redis", "session", "store"

# 4. Search ADRs specifically
grep -r "<query>" adr/ docs/architecture/ -l

# 5. Search code patterns
grep -r "class.*<query>" src/ -n
grep -r "def.*<query>" src/ -n

Step 4: Rank and Filter Results

Ranking Criteria:

  1. Relevance: Exact match > Partial match > Related term
  2. Recency: Recent files > Old files (check git log)
  3. Importance: ADRs > Code > Tests > Utils
  4. Usage: Frequently referenced > Rarely referenced

Read the full file on GitHub · 369 lines

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. 4d ago First seen · 369 lines · 16 tokens per session scan B 5e6d12be8306

Subscribe to this mod's changes

knowledge-search is a command published in the GitHub repository vishnu2kmohan/mcp-server-langgraph (4 stars, last pushed 11d ago), licensed MIT. It adds 16 tokens to every session and 2,578 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.