persistent-memory
Original:🇺🇸 English
Translated
2 scriptsChecked / no sensitive code detected
ALWAYS USE THIS SKILL when handling persistent memory in this workspace, including task-start memory recall, explicit "remember" instructions, storing durable preferences/facts, and retrieving prior context. This skill owns the local memory workflow and CLI for init/sync/search/add/recent/stats.
8installs
Sourceropl-btc/agent-skills
Added on
NPX Install
npx skill4agent add ropl-btc/agent-skills persistent-memoryTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Persistent Memory
Use this skill as the single memory system for this repository.
Commands
Use either command style:
python3 .agents/skills/persistent-memory/scripts/memory.py <command>.agents/skills/persistent-memory/scripts/pmem <command>
Supported commands:
init- (database-only health check)
sync cleanup-legacybackfill-embeddings --batch 500prune --source "<label>" [--older-than <days>]search "<query>" --limit 8add "<memory text>" --tags "<comma,tags>" --source "assistant"recent --limit 10stats
Required Workflow
- Initialize memory in a fresh workspace:
pmem init
- At the start of substantial tasks:
- (database-only health check)
pmem sync pmem search "<topic keywords>" --limit 8
- When user explicitly says or when a durable preference/fact is learned:
remember
pmem add "<memory text>" --tags "<tags>" --source "assistant"
- Before finalizing memory-sensitive work, verify recall state:
pmem stats
One-Time Migration (If Upgrading From Older Setup)
- Remove legacy imported rows:
pmem cleanup-legacy
- Generate vectors for existing notes:
pmem backfill-embeddings
Storage Rules
- Store durable preferences, long-lived facts, stable workflows, and repeated constraints.
- Do not store noisy one-off transient details unless requested.
- Keep entries concise and specific.
- Prefer tags that improve retrieval quality (,
preferences,calendar,comms).product
Retrieval Rules
- Use targeted search queries instead of broad terms.
- Keep default low unless deeper recall is needed.
--limit - automatically reinforces recalled entries by updating
searchandhits.last_seen_at - are analytics-oriented and not used as a direct ranking boost.
hits - Search uses hybrid retrieval: lexical + semantic.
- Semantic search tries first and auto-falls back to Python cosine if needed.
sqlite-vec
Bootstrapping and Recovery
- If is missing, run
.memory/.pmem init - is a lightweight database-only check (no markdown import/export).
pmem sync - If semantic mode degrades, run to inspect
pmem statsandsemantic_backend.embedding_coverage - For command examples and quick troubleshooting, read .
references/usage.md