sysid/bkmr/bkmr-memory
Claude Code and agent skill by sysid/bkmr
- community
Checking that the SKILL.md file is still in the repository.
Primary memory system — supersedes built-in file-based memory (MEMORY.md / memory/ directory). All memory reads and writes go through bkmr, not the filesystem. Invoke for ANY of: (1) User asks about memories, past sessions, what you remember — "what do you know about X". (2) User asks to remember or save something for future sessions. (3) Starting a new task — check for relevant context, gotchas, or preferences. (4) Encountered a bug or surprise — check if seen before. (5) Making an architectur…
Install
npx vskill@latest install sysid/bkmr/bkmr-memorySKILL.md
bkmr-memory — Persistent Agent Memory
bkmr is a CLI bookmark manager with SQLite FTS5 and local semantic search (fastembed/ONNX). Bookmarks tagged with the _mem_ system tag serve as persistent agent memory that survives across sessions. This skill defines how to read and write that memory effectively.
Mandatory Tag Rules
Every interaction with bkmr memory requires specific tags. These are non-negotiable — without them, memories are unfindable or uncategorized noise.
READING — every query must include `-t _mem_`:
The -t _mem_ flag scopes results to agent memories only. Without it, you search the entire bookmark database (personal bookmarks, snippets, shells, etc.) — guaranteed noise.
Always use hsearch as your search command. It combines FTS and semantic ranking via Reciprocal Rank Fusion, so it handles both keyword and conceptual queries well. Only fall back to search (FTS-only) when you specifically need exact phrase matching ('"JWT expiry"'), boolean logic ('auth NOT oauth'), or tag-only browsing with no query text (-t _mem_ -n gotcha).
WRITING — every memory must use `-t mem` AND exactly one classification tag:
The five classification tags:
| Tag | Use for | Example | |
|---|---|---|---|
fact | Infrastructure truths, config, architecture | "Prod DB is PostgreSQL 15 on port 5433" | |
procedure | How-to steps, deployment, workarounds | "Deploy: make deploy-staging, then verify health" | |
preference | User conventions, tool choices, style | "User prefers pytest, uses fixtures not setUp" | |
episode | Debugging narratives, surprising discoveries | "2026-04-04: JWT expiry was 5s not 5m" | |
gotcha | Non-obvious pitfalls, things that broke | "CI silently succeeds when registry is down" |
A memory without a classification tag cannot be filtered by category — it becomes a second-class citizen in search results and breaks the taxonomy that makes memory useful.
Optional Tag Rules
- You may use topic tags for additional classification (e.g.,
database,postgres,deployment,auth). - To limit scope to a project, you may use a project tag. MANDATORY STRUCTURE for project tag:
project:foo. - No redundant tags. If you use a project tag
project:foo, do NOT also add a barefootag —
project:foo already carries the project identity. Same rule for any topic expressed as both a namespaced and bare tag (e.g., don't pair lang:python with python). Pick the more specific form and drop the other. Redundant tags dilute embedding signal and waste the 2–4 topic-tag budget. Topic tags should name the subject matter (e.g., fzf, skim, bash), not repeat the project.
How It Works
A memory bookmark has three meaningful fields:
| Field | Purpose | Limit | |
|---|---|---|---|
url | The memory content (what you're storing) | max. 500 tokens | |
title | A concise, searchable title | Short phrase | |
tags | Classification + topic tags | Comma-separated |
The `url` field IS the memory. This is the first positional argument to bkmr add. Do NOT put memory content in the -d (description) field — that field is not used for embeddings or the memory display action. If you put content in description instead of url, the memory becomes unsearchable and displays as empty. Keep memories concise.
Embeddings for semantic search are computed from content (url) + title + visible tags (system tags like _mem_ are excluded from embeddings). This means your title and tags directly affect how well the memory is found — make them descriptive.
1. Querying Memories (READ)
When to Query
- At every task start — before doing any work, check for relevant memories
- Before architectural decisions — check for gotchas, preferences, procedures
- When something feels familiar — "didn't we solve this before?"
- When encountering a bug or surprise — check for past episodes or gotchas
How to Query
Use one hsearch call per lookup. Do not run both hsearch and search for the same query — the results overlap heavily and waste context.
hsearch matches every term literally — c++, node.js, foo-bar need no quoting. FTS5 syntax (phrases, AND/OR/NOT, prefix*) only works in search.
FTS-only fallback — use search instead of hsearch only for these three cases:
Reading the Results
hsearch --json returns:
The url field contains the actual memory content. The rrf_score indicates relevance — higher is better. Use id to reference a specific memory for updates.
To view a single memory in detail: bkmr show 42 --json
Note: search --json returns a slightly different shape (tags as array, includes access_count/created_at/updated_at instead of rrf_score), but the key fields (id, url, title, tags) are the same.
Query Patterns by Situation
| Situation | Query | |
|---|---|---|
| Starting work on a project | bkmr hsearch "project-name overview" -t _mem_ --json --np -l 5 | |
| Before changing architecture | bkmr hsearch "architecture decisions" -t _mem_ -n gotcha --json --np | |
| Checking user preferences | bkmr hsearch "conventions style" -t _mem_ -n preference --json --np | |
| Recalling a past debugging session | bkmr hsearch "debugged auth issue" -t _mem_ -n episode --json --np | |
| Looking up a deployment procedure | bkmr hsearch "deploy staging" -t _mem_ -n procedure --json --np | |
| Browse all gotchas (no query) | bkmr search -t _mem_ -n gotcha --json --np |
2. Storing Memories (WRITE)
When to Store
Before completing any task, ask yourself:
Did I learn anything non-trivial about this project, codebase, user preferences, or environmentthat would be valuable in a future session?
Store it if the insight is:
- Not derivable from reading source code or git history
- Not already in documentation (README, CLAUDE.md, comments)
- Likely to save time or prevent mistakes in a future session
- A user preference, convention, or decision rationale
Do NOT store:
- Code snippets (reference the file path instead)
- Anything already in CLAUDE.md or project docs
- Git history facts (
git logis authoritative) - Obvious things ("this project uses Rust" — the Cargo.toml says that)
- Temporary state or in-progress work details
- Full file contents or large artifacts
- What you changed — file lists, renames, refactoring summaries, documentation updates.
All of this is recoverable from git log, git diff, and reading the code. A memory that says "Updated files X, Y, Z" or "Renamed A to B" is pure noise.
- Anything derivable by reading the codebase — project structure, which classes exist,
what frameworks are used, how modules are wired together. The code is the source of truth; re-reading it is cheap. Only store interpretations that aren't obvious from the code (e.g., "X looks wrong but is intentional because of Y constraint").
Memory Taxonomy
Every memory gets exactly one classification tag:
| Tag | Use for | Content style | |
|---|---|---|---|
fact | Truths about infrastructure, config, architecture | Short declarative statement | |
procedure | How-to sequences, deployment steps, workarounds | Numbered steps or command sequence | |
preference | User conventions, tool choices, style decisions | "User prefers X over Y because Z" | |
episode | Debugging narratives, surprising discoveries, non-obvious decisions | "On DATE, X failed because Y (non-obvious). Fix was Z." | |
gotcha | Non-obvious pitfalls, footguns, things that broke before | "X looks like it should work but fails because Y" |
How to Store
Concrete examples:
Content Guidelines
Since embeddings are built from content + title + tags, write memories that are search-friendly:
- Title: A specific, descriptive phrase — not "note" or "thing I learned"
- Content: Lead with the key fact. Add context after. Use concrete names, not pronouns.
- Tags: Include topic keywords beyond the classification (e.g.,
fact,database,postgres,production) - References over copies: Instead of pasting code, write
"The retry logic in src/http/client.rs:45-60 uses exponential backoff with jitter. Max 3 retries, base delay 100ms."
Deduplication (Critical)
Before storing any memory, check if a similar one already exists:
Decision logic:
- No match → create new memory
- Outdated match → update content with
bkmr update --url "..." <id> - Same content exists → skip, don't duplicate
- Related but adds info → update to merge both facts
Update Examples
Scenario 1: Outdated fact — port changed from 5432 to 5433
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskill/bkmr-memory/SKILL.md
Popularity
- Repository stars
- 255
- Repository forks
- 10
- 7-day trend score
- 28
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sysid/bkmr/bkmr-memory)