kb-memory

kb-memory is a skill for Claude Code, Codex from fish827-08/rag-kb. It costs 112 tokens per session (3,458 once invoked), scanned A, original, Apache-2.0.

A local-first memory and knowledge service that an AI client can access through MCP or HTTP. It stores long-term facts and preferences, indexes documents and web pages, and supports retrieval while offline.

In plain words
What is it for?
It is for saving and searching memories, importing documents or web content, and asking questions over the stored knowledge.
Why use it?
It keeps useful project knowledge available across sessions without depending on a cloud service for storage or retrieval.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit It is for saving and searching memories, importing documents or web content, and asking questions over the stored knowledge.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fish827-08/rag-kb/kb-memory
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 fish827-08/rag-kb --skill kb-memory
Clone the repo
git clone --depth 1 https://github.com/fish827-08/rag-kb

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-memory

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/fish827-08/rag-kb/kb-memory"><img src="https://agentmods.dev/badge/skills/fish827-08/rag-kb/kb-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,458 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00112 $0.03458
Opus 5.5 $0.00045 $0.01383
Sonnet 5.5 $0.00022 $0.00692
Haiku 4.5 $0.00011 $0.00346

Measured yesterday against content hash 78b0b4fb423e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

kb-memory scanned grade A 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 yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (bootstrap.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

`curl` is an alias for `Invoke-WebRequest` and does **not** accept `-X/-H/-d`.
skills/kb-memory/SKILL.md · 264 lines

How it starts

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

kb-memory — local agent memory & knowledge service

kb is a small single-process service that runs on the user's machine. It gives any agent (Claude Code, Cursor, TraeWork, custom agents) persistent memory and document RAG through MCP (http://127.0.0.1:8000/mcp/ by default) or plain HTTP.

  • Data stays local (~/.kb/data for a skill install, ./kb_data for a source checkout).
  • Memory write / search / document ingest work without any LLM.
  • Only /ask (RAG answering) needs an LLM; when unconfigured it returns 503 LLM_DISABLED with a configuration hint.
  • Default embedding model is lightweight (BAAI/bge-small-zh-v1.5, ~92 MB, 512-dim); the model loads on first use and is unloaded after 10 idle minutes.
  • Default device is CPU; no GPU is required.

1. Installation (always ask the user first)

Never install or start software without explicit user approval. First check whether kb is already reachable (bootstrap.py --status or GET /api/v1/healthz). If it is not, show the install plan below and wait for confirmation before running any install command.

Prerequisite: Python 3.10+. Git is not required — kb is installed from PyPI.

A. Skill bootstrap (recommended)

The skill package includes bootstrap.py (standard library only). It installs into an isolated venv, so it never touches the user's global Python:

python bootstrap.py --status   # where is kb? interpreter, version, data dir, running?
python bootstrap.py            # print the install plan only; changes NOTHING
python bootstrap.py --yes      # only after the user confirms: install + start

Options: --extras ingest|llm|full|none (default ingest), --autostart (enable login start), --no-start (install only), --start-only (start an existing install), --dir / --data-dir / --host / --port.

What --yes does: creates ~/.kb/venv → installs kb-memory[ingest] from PyPI → on Linux installs the CPU torch wheel first (avoids a multi-GB CUDA download) → writes ~/.kb/install.json → starts the service detached with KB_DATA_DIR.

Read the full file on GitHub · 264 lines

Files

What ships with it

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

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. yesterday Changed · +19 lines 78b0b4fb423e
  2. 3d ago Changed · +64 lines · +20 tokens per session 73a805db98c5
  3. 4d ago Changed · +113 lines · +92 tokens per session 29e40b942719
  4. 1mo ago Changed · -30 lines · -98 tokens per session 3e8586c42632
  5. 1mo ago First seen · 98 lines · 98 tokens per session scan A 295ecb77bd66

Subscribe to this mod's changes

kb-memory is a skill published in the GitHub repository fish827-08/rag-kb (5 stars, last pushed yesterday), licensed Apache-2.0. It adds 112 tokens to every session and 3,458 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.