update

update is a command for coding agents from sdsrss/claude-mem-lite. It costs 21 tokens per session (410 once invoked), scanned A, original, MIT.

A maintenance command for a memory database and a registry of tool resources. It scans for duplicates, stale or broken items, and items that may need cleanup, compression, or a boost.

In plain words
What is it for?
Use it for periodic memory cleanup, duplicate merging, decay and boosting, compression of old observations, and registry maintenance.
Why use it?
It helps keep stored agent memory and tool records organized after imports or when search results become noisy. Purging old data requires explicit confirmation.

Command

Part of the claude-mem-lite plugin — 8 commands, 7 hooks, 1 MCP server shipped together

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/sdsrss/claude-mem-lite/update
Clone the repo
git clone --depth 1 https://github.com/sdsrss/claude-mem-lite

Or install claude-mem-lite, the plugin that ships this one along with the rest of its 8 commands, 7 hooks, 1 MCP server.

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 update

README.md
[![agentmods](https://agentmods.dev/badge/commands/sdsrss/claude-mem-lite/update.svg)](https://agentmods.dev/commands/sdsrss/claude-mem-lite/update)
Your own site
<a href="https://agentmods.dev/commands/sdsrss/claude-mem-lite/update"><img src="https://agentmods.dev/badge/commands/sdsrss/claude-mem-lite/update.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 410 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.00021 $0.00410
Opus 5 $0.00010 $0.00205
Sonnet 5 $0.00004 $0.00082
Haiku 4.5 $0.00002 $0.00041

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

Security

Grade A, and why

update 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 4d 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/update.md · 39 lines

What it actually says

Memory & Registry Maintenance

Run intelligent maintenance on both the memory database and tool resource registry.

Usage

  • /mem:update — Run full maintenance cycle

Instructions

When the user invokes /mem:update, perform the following maintenance cycle:

Phase 1: Memory Maintenance

  1. Call mem_maintain(action="scan") to analyze maintenance candidates
  2. Report scan results to the user (duplicates, stale items, broken items, boostable items, pending purge items)
  3. Call mem_maintain(action="execute", operations=["cleanup","decay","boost"]) to apply safe automatic changes
  4. If duplicates were found in scan, review them and call mem_maintain(action="execute", operations=["dedup"], merge_ids=[[keepId, removeId1, ...], ...]) — keep the more important/recent observation in each pair
  5. Run mem_compress(preview=false) for old low-value observations
  6. If pending purge items > 0: Report the count to the user and ask for confirmation. If confirmed, call mem_maintain(action="execute", operations=["purge_stale"]). User may optionally specify retain_days (default 30) to control how many days of data to keep. Do NOT purge without explicit user confirmation.

Phase 2: Registry Maintenance

  1. Call mem_registry(action="stats") to get registry overview
  2. Call mem_registry(action="reindex") to rebuild FTS5 search index
  3. Report updated stats

Phase 3: Summary

Summarize all maintenance actions taken in zh-CN:

  • Memory: observations cleaned, decayed, boosted, deduplicated, compressed
  • Registry: total resources, adoption rates, reindex status
  • Overall health assessment
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. 4d ago First seen · 39 lines · 21 tokens per session scan A 874080844553

Subscribe to this mod's changes

update is a command published in the GitHub repository sdsrss/claude-mem-lite (56 stars, last pushed today), licensed MIT. It adds 21 tokens to every session and 410 once invoked, about $0.0001 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.