knowledge-search

A command for searching OpenArche, a store of saved engineering knowledge, with project-local knowledge checked before shared knowledge. It retrieves related entries using their meaning and links.

In plain words
What is it for?
Use it to look up reusable fixes, patterns, decisions, and known problems from the current repository or the global knowledge store.
Why use it?
It helps find earlier decisions and solutions without relying on memory or exact keyword matches.

Command

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/done-0/openarche/knowledge-search
Clone the repo
git clone --depth 1 https://github.com/Done-0/openarche
Per session 5 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 298 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00005 $0.00298
Opus 5 $0.00003 $0.00149
Sonnet 5 $0.00001 $0.00060
Haiku 4.5 $0.00001 $0.00030

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

Security

Grade A, and why

knowledge-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 2d 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.

commands/knowledge-search.md · 37 lines

What it actually says

Search OpenArche knowledge with repository-local knowledge first and global knowledge as fallback.

Required behavior:

  1. Find the relevant OpenArche knowledge stores. If the user is inside a repository, search .openarche/knowledge/ first. Then search the global store under <home>/.claude/openarche/knowledge/.
  2. Read and validate the current config.
  3. Load the relevant index.json files. If a store is missing, treat that store as empty. If a store exists but is invalid, report that the knowledge index is corrupted.
  4. Build the query embedding with the current embedding provider.
  5. Run vector recall with the configured threshold and topK across the merged search space.
  6. Expand linked neighbors from the recalled seed entries.
  7. Prefer current-project knowledge over cross-project knowledge when similarity is close, matching product behavior.

When presenting results, show each match in this form:

[type/structure] id — title
  trigger: trigger_context
  score: X.X  via: vector|link  tags: tag1, tag2

If the user asks for more detail, also show:

  • source project
  • whether the result came from the repository-local or global store
  • whether the result came from direct vector recall or link expansion

If both stores are empty, say so plainly.

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. 2d ago First seen · 37 lines · 5 tokens per session scan A 8e34b0131776

Subscribe to this mod's changes

knowledge-search is a command published in the GitHub repository Done-0/openarche (12 stars, last pushed 4mo ago), licensed MIT. It adds 5 tokens to every session and 298 once invoked, about $0.0000 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.