business-ops
Business operations: strategy, technology, growth, competitive intelligence, support, finance, HR, legal, operations, sales, productivity, product management.
Background memory consolidation — overnight review, merge, and injection payload for memory files.
$ npx -y skills add notque/vexjoy-agent --skill auto-dream --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/auto-dreamContext preview
The summary Claude sees to decide when to auto-load this skill.
Background memory consolidation — overnight review, merge, and injection payload for memory files.
name: auto-dream
description: Background memory consolidation — overnight review, merge, and injection payload for memory files.
user-invocable: true
command: dream
context: fork
allowed-tools:
- Read
- Write
- Edit
- Glob
- Grep
- Bash
routing:
triggers:
- dream
- consolidate memories
- clean up memories
- memory maintenance
- memory consolidation
- deduplicate memories
category: meta-tooling
pairs_with: []Background memory consolidation cycle. Scans memory files, finds stale, duplicate, and conflicting entries, consolidates them, synthesizes cross-session insights, builds an injection-ready payload for the next session start, and writes a dated dream report.
| Signal | Load These Files | Why | |---|---|---| | Debugging failed cron run, silent failure, empty log, wrong exit code | `headless-cron-patterns.md` | Routes to the matching deep reference | | Setting up or modifying wrapper script (`flock`, `--permission-mode`, `envsubst`, `PIPESTATUS`) | `headless-cron-patterns.md` | Routes to the matching deep reference | | Budget cap, `--max-budget-usd`, unattended Claude invocation | `headless-cron-patterns.md` | Routes to the matching deep reference | | Writing, updating, or archiving memory files | `memory-file-operations.md` | Routes to the matching deep reference | | Updating `MEMORY.md` index, atomic write, `.tmp` rename | `memory-file-operations.md` | Routes to the matching deep reference | | Staleness detection, duplicate merging, conflict flagging | `memory-file-operations.md` | Routes to the matching deep reference | | YAML frontmatter structure, `merged_from`, memory file format | `memory-file-operations.md` | Routes to the matching deep reference | | Testing the dream cycle safely, dry-run validation, output file verification | `dream-cycle-testing.md` | Routes to the matching deep reference | | Reading and interpreting cron run logs, detecting silent failures | `logging-patterns.md` | Routes to the matching deep reference | | Log rotation, log directory structure, phase completion markers in logs | `logging-patterns.md` | Routes to the matching deep reference | | `last-dream.md` stale, missing injection payload, cron log empty | `logging-patterns.md` | Routes to the matching deep reference | | Concurrent dream runs, lockfile already held, duplicate cron invocations | `concurrency.md` | Routes to the matching deep reference | | `MEMORY.md.tmp` left behind, partial write recovery, atomic rename failure | `concurrency.md` | Routes to the matching deep reference |
When invoked interactively (not via cron), read `skills/meta/auto-dream/dream-prompt.md` and execute its phases directly. The prompt is self-contained — it describes the full seven-phase cycle including safety constraints, file paths, and output formats.
For cron invocation: the dream prompt is passed directly to `claude -p` and runs as a standalone headless session with no CLAUDE.md, no hooks, no project context. All instructions are embedded in the prompt.
1. **SCAN** — Read all memory files and the recent git log. Write the scan document to `~/.claude/state/dream-scan-{date}.md`. 2. **ANALYZE** — Identify stale, duplicate, conflicting memories and cross-session patterns. Write analysis to `~/.claude/state/dream-analysis-{date}.md`. 3. **CONSOLIDATE** — Apply consolidation actions (max 5 changes). Archive stale/merged files, update MEMORY.md atomically. 4. **SYNTHESIZE** — Create insight memories from cross-session patterns (max 2 new memories per cycle). 5. **SELECT** — Build the injection-ready payload for session start. Write to `~/.claude/state/dream-injection-{project-hash}.md`. 6. **REPORT** — Write the dream summary to `~/.claude/state/last-dream.md`.
# Dry run (read-only, no filesystem changes — dry-run is the default) ./scripts/auto-dream-cron.sh # Full run (execute consolidation) ./scripts/auto-dream-cron.sh --execute # Check output cat ~/.claude/state/last-dream.md # Verify cron registration python3 ~/.claude/scripts/crontab-manager.py list
~0.09 USD per nightly run with 50 memory files (~20-30K input tokens at Sonnet pricing). ~33 USD/year for automated overnight operation. Budget capped at 3.00 USD/run via wrapper script.
Use `crontab-manager.py` (not raw `crontab -e`) to install. The wrapper script handles PATH, lockfile, logging, budget cap, and dry-run/execute toggle.
# Preview the cron entry python3 ~/.claude/scripts/crontab-manager.py add \ --tag "auto-dream" \ --schedule "7 2 * * *" \ --command "/home/feedgen/vexjoy-agent/scripts/auto-dream-cron.sh --execute >> /home/feedgen/vexjoy-agent/cron-logs/auto-dream/cron.log 2>&1" \ --dry-run # Install (after dry-run testing passes) python3 ~/.claude/scripts/crontab-manager.py add \ --tag "auto-dream" \ --schedule "7 2 * * *" \ --command "/home/fe
Essays and writing behind this toolkit live at vexjoy.com. VexJoy Agent connects plain-English requests to specialist agents, skills, and workflows. /do selects the knowledge and tools needed for your task.
Repo: notque/vexjoy-agent
Business operations: strategy, technology, growth, competitive intelligence, support, finance, HR, legal, operations, sales, productivity, product management.
Design workflows — UX copy, design systems, design critique, accessibility review, design handoff, user research synthesis. Use when writing UI copy, reviewing…
Marketing: SEO audits, campaign planning, content strategy, email sequences, competitive analysis, brand review, performance reporting.