Back to Skills

memory-maintenance

verified

End of day memory maintenance. Runs distillation, updates state files, prunes stale info. Runs in background with no user interaction.

View on GitHub

Marketplace

macrodata

ascorbic/macrodata

Plugin

macrodata

Repository

ascorbic/macrodata
25stars

plugins/macrodata/skills/memory-maintenance/SKILL.md

Last Verified

February 4, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/ascorbic/macrodata/blob/main/plugins/macrodata/skills/memory-maintenance/SKILL.md -a claude-code --skill memory-maintenance

Installation paths:

Claude
.claude/skills/memory-maintenance/
Powered by add-skill CLI

Instructions

# Memory Maintenance

Scheduled maintenance to keep memory current and useful. Runs automatically at end of day.

**Important:** This runs in the background with no user interaction. Do not ask questions - make decisions and note uncertainties in the journal.

## Process

### 1. Run Distillation

First, run the `/distill` skill to extract facts from today's conversations.

This processes all conversation files, spawns sub-agents for extraction, and writes distilled actions to the journal.

**Check if distill already ran today:**
```bash
grep "distill-summary" ~/.config/macrodata/journal/$(date +%Y-%m-%d).jsonl 2>/dev/null
```

If not found, invoke `/distill`. If already ran, skip to step 2.

### 2. Review Distilled Content

Read the distilled entries from today's journal:
```bash
grep '"topic":"distilled"' ~/.config/macrodata/journal/$(date +%Y-%m-%d).jsonl 2>/dev/null | jq -r '.content'
```

Use these to inform state file updates.

### 3. State File Updates

Review each state file and update if needed:

**today.md**
- Clear completed items
- Note anything that carried over
- Leave empty or minimal for morning prep to fill

**workspace.md**
- Update active projects list based on distilled actions
- Add/remove open threads
- Note any blocked items or waiting-on dependencies

**human.md**
- Any new preferences or patterns from distilled facts?
- Communication style insights?
- Only update if genuinely new information

### 4. Entity Updates

Review `entities/people/` and `entities/projects/`:
- Integrate any facts extracted by distillation
- Project status changes?
- New projects to create files for?

### 5. Prune Stale Info

Look for outdated information:
- Completed todos still listed as active
- Old context that's no longer relevant
- Temporary notes that should be removed
- Duplicated information across files

Remove or archive as appropriate.

### 6. Index Maintenance

Check if indexes need rebuilding:
```
manage_index(target="memory", action="stats")
manage_index

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
2424 chars