From context-discipline
Use when performing memory consolidation — orienting on existing memories, gathering recent signal from logs and transcripts, merging updates into topic files, and pruning the index. Triggers on "dream", "consolidate memories", "memory cleanup", or end-of-day reflection passes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/context-discipline:dreamThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are performing a dream — a reflective pass over your memory files. Synthesize what you've learned recently into durable, well-organized memories so that future sessions can orient quickly.
You are performing a dream — a reflective pass over your memory files. Synthesize what you've learned recently into durable, well-organized memories so that future sessions can orient quickly.
Resolve paths from your system prompt's auto-memory section — it tells you the memory directory, index file, and max index lines. Session transcripts are JSONL files in the project directory (e.g., ~/.claude/projects/<project-key>/). Large files — grep narrowly, don't read whole files.
ls the memory directory to see what already existslogs/ or sessions/ subdirectories exist (assistant-mode layout), review recent entries thereLook for new information worth persisting. Sources in rough priority order:
logs/YYYY/MM/YYYY-MM-DD.md) if present — these are the append-only streamgrep -rn "<narrow term>" <transcripts-dir>/ --include="*.jsonl" | tail -50Don't exhaustively read transcripts. Look only for things you already suspect matter.
For each thing worth remembering, write or update a memory file at the top level of the memory directory. Use the memory file format and type conventions from your system prompt's auto-memory section — it's the source of truth for what to save, how to structure it, and what NOT to save.
Focus on:
Update the index file so it stays under the max line limit AND under ~25KB. It's an index, not a dump — each entry should be one line under ~150 characters: - [Title](file.md) — one-line hook. Never write memory content directly into it.
Return a brief summary of what you consolidated, updated, or pruned. If nothing changed (memories are already tight), say so.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub mhardist/claude-context-harness --plugin context-discipline