一键导入
memory-maintenance
End of day memory maintenance. Runs distillation, updates state files, prunes stale info. Runs in background with no user interaction.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
End of day memory maintenance. Runs distillation, updates state files, prunes stale info. Runs in background with no user interaction.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Guide new users through macrodata setup. Creates identity, human profile, and workspace files. Use when get_context returns isFirstRun true, or user asks to set up their profile.
Guide new users through macrodata setup. Creates identity, human profile, and workspace files. Use when get_context returns isFirstRun true, or user asks to set up their profile.
Deep nightly reflection. Self-improvement, research, pattern recognition. Runs in background with no user interaction.
Extract distilled actions and facts from today's conversations. Spawns sub-agents per conversation to avoid context blowup.
End of day memory maintenance. Runs distillation, updates state files, prunes stale info. Runs in background with no user interaction.
Deep nightly reflection. Self-improvement, research, pattern recognition. Runs in background with no user interaction.
| name | memory-maintenance |
| description | End of day memory maintenance. Runs distillation, updates state files, prunes stale info. Runs in background with no user interaction. |
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.
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:
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.
Read the distilled entries from today's journal:
grep '"topic":"distilled"' ~/.config/macrodata/journal/$(date +%Y-%m-%d).jsonl 2>/dev/null | jq -r '.content'
Use these to inform state file updates.
State files are a bounded working set, not a log. Each has a budget (a screenful); content over budget is truncated at injection, so a bloated file helps no one. The detail belongs in the journal and entity files — state holds only what's live and load-bearing now, each item a one-line status with a pointer to where the detail lives. Updating state means as much cutting as adding.
today.md
workspace.md
entities/projects/x.md or "search: ")human.md
Review state/flags.md — the channel that carries items to the user across sessions.
Review entities/people/ and entities/projects/:
State files must stay within budget. Check them:
wc -c ~/.config/macrodata/state/*.md
Rough targets: today ≲ 3 KB, workspace ≲ 3 KB, human ≲ 3.5 KB, flags ≲ 3 KB, identity ≲ 3 KB. (Hard cap is 4 KB each — content over that is truncated at injection.)
For any file over budget, compact it — this is expected maintenance, not optional:
log_journal) or the relevant entity file first, so nothing is lostA file that only ever grows is the bug this step exists to catch. After compacting, re-run wc -c to confirm you're under budget.
Check if indexes need rebuilding:
manage_index(target="memory", action="stats")
manage_index(target="conversations", action="stats")
If counts seem low or stale, trigger rebuild:
manage_index(target="memory", action="rebuild")
manage_index(target="conversations", action="update")
Write a brief maintenance journal entry:
log_journal(topic="maintenance", content="[what was updated, what was pruned, any observations]")
Note anything uncertain that should be confirmed with the user next session.