/recall:recall-maintainfrom recall
Maintains Claude Code's memory system by demoting, archiving, or pinning entries when working memory exceeds budget. Includes stale entry verification and contradiction checks.
Ships in recall. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Run maintenance on the memory system. Primary function: pressure-based demotion when working memory exceeds the word budget. Secondary: stale entry verification, contradiction checks, open loop review.
Check for IDs first. Scan all managed files (CLAUDE.local.md, memory/registers/.md, memory/archive/**/.md) for single-line list item entries (lines starting with - , not inside code blocks, not placeholders).
If ANY managed entry lacks an ID (no ^tr[0-9a-f]{10} at end of line): refuse to run.
Cannot run maintain: [N] entries are missing IDs.
Run /recall-init-ids first to tag all entries.
If ANY duplicate IDs are found across entries: refuse to run.
Cannot run maintain: duplicate ID found.
ID: ^tr8f2a1c3d7e
1. CLAUDE.local.md line 15
2. registers/preferences.md line 8
Resolve manually before running maintain.
If preconditions pass, proceed.
Parse entries from all managed files. For each entry, extract:
- and ^tr...)^tr[0-9a-f]{10} token)CLAUDE.local.md -> workingmemory/registers/* -> registermemory/archive/* -> archiveLoad metadata from memory/.recall/metadata.json:
{}created_at=now, last_reviewed_at=now, pinned=false, snoozed_until=null, status=active, tier from filetier from file location (file location is authoritative - overwrite metadata tier if it differs)Count words in working memory entries only (tier=working):
- and trailing ^tr... from word countworking_wordsReport:
Working memory: [working_words] words (target: 1500)
From working entries, exclude:
pinned: true in metadatasnoozed_until in the futureScore remaining working entries:
score = 1.0 * word_count(entry) + 0.1 * days_since(last_reviewed_at)
(If last_reviewed_at is missing, treat as 365 days.)
Sort by score descending. Take the top candidates until the sum of their word counts >= (working_words - 1500). This is the minimum set needed to bring working memory under budget.
Find any entry across all tiers where metadata has status: "superseded" and tier is NOT archive. These should be archived.
If no candidates (under budget and no superseded entries):
recall-maintain — all clear
━━━━━━━━━━━━━━━━━━━━━━━━━━
Working memory: [N] words (target: 1500) - under budget
No superseded entries pending cleanup.
No action needed.
Otherwise, present each candidate with its reason:
recall-maintain — [N] candidates
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Working memory: [working_words] words (target: 1500, over by [N])
Pressure candidates (need to free [N] words):
1. [CLAUDE.local.md] 23 words, last reviewed 45 days ago
"Dave prefers concise error messages and no unnecessary logging"
→ [k]eep / [p]in / [s]nooze / [d]emote / [a]rchive / [m]ark superseded
2. [CLAUDE.local.md] 18 words, last reviewed 30 days ago
"Current deployment target is AWS us-east-1 with fallback to us-west-2"
→ [k]eep / [p]in / [s]nooze / [d]emote / [a]rchive / [m]ark superseded
Superseded cleanup:
3. [registers/tech-stack.md] status: superseded
"Using Node 16 in production"
→ [a]rchive (recommended) / [k]eep
Apply all / decide individually?
For each candidate, apply the chosen action:
keep: Update last_reviewed_at to now in metadata. No file changes.
pin: Set pinned: true and update last_reviewed_at in metadata. No file changes. Entry will be excluded from future pressure candidates.
snooze: Set snoozed_until to now + 30 days (or user-specified duration) and update last_reviewed_at in metadata. No file changes. Entry will be excluded from pressure candidates until the snooze expires.
demote (working -> register):
memory/registers/_inbox.md
_inbox.md with header if it doesn't exist:
# Inbox
> Entries demoted from working memory. Review and file into appropriate registers.
register and last_reviewed_at to nowarchive (working or register -> archive):
memory/archive/ARCHIVE.md
# Archive
> Archived memory entries. Searchable but never auto-loaded.
status: "archived", tier: "archive", last_reviewed_at to nowmark_superseded: Set status: "superseded" and last_reviewed_at to now in metadata. No file changes. Entry will appear in superseded cleanup on next maintain run.
When moving entries between files:
- prefix and ^tr... suffix)After all actions are applied, write memory/.recall/metadata.json:
After the pressure-based flow, run these additional checks (same as before):
Stale entries: Search registers for entries where metadata last_reviewed_at is older than 30 days. Present them:
Stale entries (not reviewed in 30+ days):
1. [registers/tech-stack.md] Last reviewed: 2025-12-01
"Using Postgres 15 in production" ^tra1b2c3d4e5
→ [v]erify (update last_reviewed_at) / [u]pdate / [a]rchive
Contradictions: Scan across tiers for conflicting claims on the same topic. Flag any found.
Open loop review: Check memory/registers/open-loops.md for items that are past due or resolved.
Daily log archival: If daily logs older than 30 days exist, suggest archiving to memory/archive/daily/.
recall-maintain — complete
━━━━━━━━━━━━━━━━━━━━━━━━━━
Working memory: [before] -> [after] words (target: 1500)
Actions taken:
Kept (reviewed): [N]
Pinned: [N]
Snoozed: [N] (until [date])
Demoted to _inbox.md: [N]
Archived: [N]
Marked superseded: [N]
Secondary checks:
Stale entries verified: [N]
Contradictions found: [N]
Open loops reviewed: [N]
Daily logs to archive: [N]
Metadata: [N] entries in memory/.recall/metadata.json
What SKILL.md sets; muted values are Claude Code's defaults
10 skills in this plugin
Generated from the plugin's indexed repository (davegoldblatt/total-recall) — no native marketplace selected
npx claudepluginhub p/davegoldblatt-recallOther plugins' skills for the same job