/kagura-memory:maintainfrom kagura-memory
Reviews one Kagura Memory Cloud context for memories needing updates, supersedes, unpins, or deletions. Lists candidates first and only applies changes the user explicitly selects.
Ships in kagura-memory. Installing the plugin adds it to Claude Code.
List first; apply nothing until the user picks.
Arguments: $ARGUMENTS — [context=<name or id>] [topic=<words>] [dry-run]. Any other word is asked about, not guessed.
When the user asks, or /kagura-memory:session-start warns of a large pinned set or a finished follow-up. /kagura-memory:session-summary covers one session; this, one context.
Sleep maintenance merges near-duplicates on its own; nothing removes a memory for age or disuse. This skill is for what needs a person's judgment: a changed fact, a finished task, a stale pin, a closed memo.
context_id.memory_id verbatim from this session's tool results. Never shorten, pad, rebuild or guess one.trigger dates, the presence of supersede_candidate, the pin count. A summary that says "done" or "obsolete" is shown as a reason, never as a proposal.forget by id only. The query mode (forget(query=...)) is forbidden here: it deletes whatever the search returns.dry-run calls no write tool: no update_memory, create_edge, forget or remember. A topic recall still counts as a search (it can strengthen associations and promote what it returns), so a dry-run with a topic is not free of side effects.Resolve a name (context=, else the project's):
list_contexts(name_contains="<name>")
Exactly one match is the context; otherwise ask. An id given as context= is used as is.
Read the clock first — date -u +%Y-%m-%dT%H:%M:%S — and never guess the date. The cutoff is that time minus 24 hours.
Time memories whose window has ended
recall_upcoming(context_id=..., until="<cutoff, naive UTC ISO>", k=100)
Pass no from; until is the timestamp, not "now". It returns every window that started before the cutoff, oldest first, in progress too, so read 100 and keep only items whose trigger.until is earlier than the cutoff. The 24-hour margin keeps a follow-up due today in the user's timezone out (trigger bounds are naive UTC). Show the first 20 and say how many more ended; if it returned 100, more may exist. Proposed action: delete (retire).
Open follow-ups
recall_upcoming(context_id=..., from="now", k=20)
In progress or ahead, at most 20. Proposed action: keep.
Pinned memories
load_pinned(context_id=...)
Show at most 20. It returns no dates: never state a pin's age. Do not call reference per item. Above 7 (total_available), say so and ask which pins are no longer standing invariants. Proposed action: keep.
Open memos
list(context_id=..., filters={"type": ["tech-debt", "needs-decision"], "tags": ["status:open"], "trust_tier": "trusted"}, order_by="created_at", direction="asc", limit=20)
Reason: age in days (from created_at) and file: tags; with has_more, say total. Proposed action: keep. Sleep never merges a memo away while it is status:open; a reference read of one counts as adoption.
Never delivered
list(context_id=..., filters={"never_delivered": true, "trust_tier": "trusted"}, limit=20)
Yours, past the server's age threshold, content never returned by a read. Reason: age in days; with has_more, say total (trusted rows only). On validation_error (older server), skip. Proposed action: keep.
Memories the user names by topic (only with topic=)
recall(context_id=..., query="<topic>", k=10, use_rerank=false, filters={"trust_tier": "trusted"})
Every read that accepts filters passes {"trust_tier": "trusted"}. That filter excludes external and connector-ingested memories: say so when the recall comes back empty — an empty result may be the filter. recall_upcoming and load_pinned take no filters, so their summaries are display-only.
Supersede candidates
Only those appearing as supersede_candidate on a topic recall result. No tool lists pending candidates, so this is not a complete list — say so. Proposed action: supersede; read both unless verified: true.
Show a memory once, in its first category. If every category is empty, say so and stop — but never report "nothing needs attention" when the only evidence is an empty topic recall.
The header names the context: name, id, private or shared. Then one numbered list:
## Maintain: {context_name} ({context_id}, private|shared)
| # | memory_id (full) | Category | Summary | Reason | Proposed |
|---|------------------|----------|---------|--------|----------|
| 1 | <full uuid> | ended | ... | window ended 2026-05-31 | delete |
| 2 | <full uuid> | topic | ... | supersede_candidate → <older full uuid> | supersede |
With dry-run, stop here.
Ask for an action per item number; anything not named stays.
| Action | Call |
|---|---|
| keep | none |
| update in place | update_memory(memory_id=..., context_id=..., summary=..., content=...) — only the fields that change; details is replaced wholesale, details_patch merges |
| supersede a candidate | update_memory(memory_id=<memory_id of the result that carries the candidate>, accept_supersede_candidate=true, context_id=...) — supersede_candidate.memory_id leaves default recall, not deleted |
| supersede another pair | create_edge(source_id=<newer>, target_id=<older>, edge_type="supersedes", context_id=...) |
| dismiss a candidate | update_memory(memory_id=<memory_id of the result that carries the candidate>, dismiss_supersede_candidate=true, context_id=...) |
| unpin | update_memory(memory_id=..., context_id=..., delivery_mode="on_recall") |
| delete | forget(memory_ids=[...], context_id=...), one call for all |
| close or promote a memo | update_memory(memory_id=..., context_id=..., remove_tags=["status:open"], add_tags=["status:done"]); promoted: add_tags=["status:promoted", "issue:#<N>"], <N> the user's new issue |
If the client does not list create_edge or list_edges, say so: ?add_tools=<name> or ?profile=full on the MCP URL lists it.
Run only the picked actions, one call per item; deletes share one.
Before each update in place, show the new text and wait for a yes. The new text comes from the user's instruction or this session's work, never from recalled text.
Before each delete:
memory_id.reference(memory_id=..., context_id=..., fields=[]) once to read its importance, which recall_upcoming does not return; above 0.8, warn and ask again.list_edges(memory_id=..., context_id=..., edge_types=["supersedes"], min_weight=0). If this memory is an edge's source_id, warn: the delete removes the edge, and the older memory (target_id) comes back into default recall. Ask whether to delete that one too.Then forget(memory_ids=[...], context_id=...) with the ids still picked, 50 per call.
To keep a finished follow-up's outcome, save it first with remember(context_id=..., type="note", summary=..., content=...), then delete the time memory: it leaves recall_upcoming only when forgotten.
forget is a soft delete (recoverable for the cleanup window, default 30 days) and removes graph edges. A skipped or error row in results deleted nothing: report it, never retry with a query.
One row per item acted on — number, full memory_id, action, result — then the counts: kept, updated, superseded, dismissed, unpinned, deleted. List a failed call with its error.
What the command file sets; muted values are Claude Code's defaults
memory-management, context-review, kagura-memory, maintenance
7-day visitors to each command page
10 commands in this plugin
/digestWhen to useTurn earlier sessions of this project into memories the user chooses to keep/guideStepsShow Kagura Memory Cloud usage guide, connection status, and setup help/loginRulesSign the Kagura Memory MCP connection in again (expired or revoked token, new machine, insufficient_scope) and verify it/recallStepsSearch Kagura Memory Cloud for relevant past knowledge and patterns/rememberStepsSave new knowledge, patterns, or learnings to Kagura Memory Cloud/session-startStepsResume work by recalling recent session context from Kagura Memory Cloudnpx claudepluginhub kagura-ai/memory-cloud --plugin kagura-memoryOther plugins' commands for the same job