lorekeeper-search

lorekeeper-search is a skill for Claude Code, Codex from Jessinra/Lorekeeper. It costs 61 tokens per session (1,835 once invoked), scanned A, original, Apache-2.0.

A search tool for a persistent knowledge base, with feedback about how useful and reliable each result was.

In plain words
What is it for?
Use it to recall prior decisions, look up facts, and search memory. For recent topics, it also guides searches toward dated primary sources.
Why use it?
It helps an agent find stored domain facts and improve the knowledge base instead of repeatedly guessing or saving poor information.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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 skills/jessinra/lorekeeper/lorekeeper-search
Any agent
npx skills add Jessinra/Lorekeeper --skill lorekeeper-search
Clone the repo
git clone --depth 1 https://github.com/Jessinra/Lorekeeper

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/jessinra/lorekeeper/lorekeeper-search.svg)](https://agentmods.dev/skills/jessinra/lorekeeper/lorekeeper-search)
Your own site
<a href="https://agentmods.dev/skills/jessinra/lorekeeper/lorekeeper-search"><img src="https://agentmods.dev/badge/skills/jessinra/lorekeeper/lorekeeper-search.svg" alt="Measured on agentmods" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,835 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.1 $0.00061 $0.01835
Opus 5 $0.00030 $0.00918
Sonnet 5 $0.00012 $0.00367
Haiku 4.5 $0.00006 $0.00184

Measured 6d ago against content hash 7a59815ccb98, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

lorekeeper-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 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.

src/lorekeeper/assets/skills/lorekeeper-search/SKILL.md · 142 lines

How it starts

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

Lorekeeper Search with Feedback

Lorekeeper is a persistent memory store exposed via MCP tools (lore_search, lore_update, lore_insert). It uses hybrid semantic + keyword search to surface relevant knowledge.

Critical rule: Every lore_search MUST be followed by a lore_update feedback call once the task is complete. This feedback loop — including confidence ratings — keeps the knowledge base accurate and self-correcting.

Workflow

Fresh-news / time-sensitive searches

When the task is about news, releases, or anything that must be recent:

  • Search with explicit date anchors and primary-source domains.
  • Verify the publish date on every candidate before using it.
  • Skip anything older than the requested cutoff or whose date cannot be confirmed.
  • Treat aggregators as discovery only; prefer official blogs, docs, GitHub releases, arXiv, and government pages.
  • If nothing meets the cutoff, returning nothing is correct.

See references/news-freshness.md for a compact checklist.

Step 1: Search

Call lore_search with a specific natural language query.

lore_search({ query: "voucher stacking rules in checkout", limit: 10, min_score: 0.1 })
  • Use natural language questions, not single keywords
  • Raise min_score (e.g. 0.3) if results are noisy; lower limit if you need fewer results
  • Soft-deleted memories (flagged as unreliable) are excluded by default.
  • Filter by recency: created_after / updated_after accept ISO 8601 UTC strings (naive = UTC; non-UTC offsets raise an error). Use to scope searches to a time window, e.g. created_after: "2026-06-01T00:00:00".
  • Change sort order: sort_by accepts "relevance" (default, by hybrid score), "recent" (by updated_at DESC), or "frequent" (by usage_count DESC). Composes with timestamp filters and limit.

Step 2: Use the results and verify

Each result contains memory.id, memory.title, memory.content, relevance.combined_score, and links. Each link has its own id, relation_type, reason, source_memory_id, and target_memory_id.

Read the full file on GitHub · 142 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. 6d ago First seen · 142 lines · 61 tokens per session scan A 7a59815ccb98

Subscribe to this mod's changes

lorekeeper-search is a skill published in the GitHub repository Jessinra/Lorekeeper (4 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 61 tokens to every session and 1,835 once invoked, about $0.0003 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.