openclaw-auto-dream
```markdown
What this skill does
```markdown
---
name: openclaw-auto-dream
description: Automatic cognitive memory consolidation for OpenClaw/MyClaw agents — sleep cycles, importance scoring, forgetting curves, knowledge graphs, and health dashboards.
triggers:
- set up auto-dream memory for my openclaw agent
- configure memory consolidation for myclaw
- how do I install openclaw auto-dream
- my ai agent keeps forgetting things between sessions
- set up dream cycles for memory management
- how does auto-dream importance scoring work
- export or import memory bundle between myclaw instances
- show me the memory health dashboard
---
# OpenClaw Auto-Dream
> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
OpenClaw Auto-Dream is a cognitive memory architecture for [OpenClaw](https://github.com/openclaw/openclaw) agents (as used on [MyClaw.ai](https://myclaw.ai)). It gives your AI agent the ability to periodically "sleep and dream" — scanning raw daily logs, extracting structured knowledge, scoring importance, applying forgetting curves, building a knowledge graph, and surfacing non-obvious insights. The result is an agent that genuinely learns and connects the dots over time rather than accumulating stale, disconnected files.
---
## How It Works
Auto-Dream runs a **three-phase dream cycle** (default: 4 AM daily via cron):
1. **Collect** — Scans unconsolidated daily logs (last 7 days), detects priority markers, extracts decisions/people/facts/projects/lessons/procedures/open threads.
2. **Consolidate** — Routes each insight to one of five memory layers, deduplicates semantically, assigns unique IDs (`mem_NNN`), creates relation links.
3. **Evaluate** — Scores importance, applies forgetting curves, calculates a 5-metric health score, generates insights, writes dream report, sends notification.
### Five Memory Layers
| Layer | Storage | Purpose |
|-------|---------|---------|
| Working | LCM plugin (auto-detected) | Real-time context compression & semantic recall |
| Episodic | `memory/episodes/*.md` | Project narratives, event timelines |
| Long-term | `MEMORY.md` | Facts, decisions, people, milestones, strategy |
| Procedural | `memory/procedures.md` | Workflows, preferences, tool patterns |
| Index | `memory/index.json` | Metadata, scores, relations, health stats |
---
## Installation
### Via ClawHub (Recommended)
Tell your MyClaw agent:
```
Install the openclaw-auto-dream skill from ClawHub
```
Or manually inside your OpenClaw agent environment:
```bash
claw skill install openclaw-auto-dream
```
### Manual Installation
Clone into your OpenClaw skills directory:
```bash
git clone https://github.com/LeoYeAI/openclaw-auto-dream.git \
~/.openclaw/skills/openclaw-auto-dream
```
Then register the skill with your agent:
```bash
claw skill register ~/.openclaw/skills/openclaw-auto-dream
```
### First-Time Setup
After installation, tell your agent:
```
Set up auto-dream
```
The setup wizard will:
- Detect whether the optional LCM plugin is available (for the Working memory layer)
- Create the `memory/` directory structure
- Initialize `memory/index.json` with default health metrics
- Ask for your preferred notification level (`silent` / `summary` / `full`)
- Schedule the dream cron job (default: `0 4 * * *`)
---
## Configuration
Auto-Dream is configured via `memory/config.json` in your agent's workspace:
```json
{
"dream_schedule": "0 4 * * *",
"notification_level": "summary",
"scan_window_days": 7,
"forgetting": {
"min_age_days": 90,
"importance_threshold": 0.3
},
"scoring": {
"recency_half_life_days": 180,
"permanent_marker": "⚠️ PERMANENT",
"high_marker": "🔥 HIGH",
"pin_marker": "📌 PIN"
},
"layers": {
"working_lcm": true,
"episodic": true,
"long_term": true,
"procedural": true
},
"export": {
"compress": true,
"include_archive": false
}
}
```
### Environment Variables
If you need to override config values via the environment (e.g. in CI or multi-instance deployments):
```bash
AUTODREAM_SCHEDULE="0 2 * * *" # Override cron schedule
AUTODREAM_NOTIFY_LEVEL="full" # silent | summary | full
AUTODREAM_SCAN_DAYS=14 # Days of logs to scan per cycle
AUTODREAM_FORGET_THRESHOLD=0.25 # Importance below which entries are archived
```
---
## Key Commands (Agent Natural Language)
These phrases trigger built-in Auto-Dream intents inside your OpenClaw agent:
| Phrase | Action |
|--------|--------|
| `"Dream now"` | Trigger an immediate full dream cycle |
| `"Show memory dashboard"` | Generate and open the interactive HTML dashboard |
| `"What do you remember about [topic]?"` | Semantic search across all memory layers |
| `"Memory health"` | Print current 5-metric health score |
| `"Export memory bundle"` | Export all layers to `memory/export-YYYY-MM-DD.json` |
| `"Import memory bundle"` | Merge an exported bundle into current memory |
| `"Export only procedures"` | Selective single-layer export |
| `"Forget [topic]"` | Immediately archive entries matching topic |
| `"Pin this"` | Mark current context with `📌 PIN` (immune to forgetting) |
| `"What did you learn last week?"` | Show insights from the last 7 dream logs |
---
## Priority Markers in Daily Logs
Auto-Dream scans your agent's daily log files for special markers during the Collect phase. Use these in any log entry or conversation note:
```markdown
<!-- important -->
Decided to use Postgres over SQLite for the user DB — scalability concern.
⚠️ PERMANENT
Client prefers all reports in US Letter format, not A4.
🔥 HIGH
The deploy pipeline breaks when NODE_ENV is not explicitly set.
📌 PIN
Weekly sync with Alex every Tuesday at 10 AM.
```
| Marker | Effect |
|--------|--------|
| `<!-- important -->` | Extracted and routed to appropriate memory layer |
| `⚠️ PERMANENT` | Always scores `1.0` importance; never archived |
| `🔥 HIGH` | Base weight doubled during importance scoring |
| `📌 PIN` | Immune to forgetting curve; always retained |
---
## Importance Scoring
Every memory entry is scored on each dream cycle:
```
importance = (base_weight × recency_factor × reference_boost) / 8.0
```
Where:
- `recency_factor = max(0.1, 1.0 - days_since_created / 180)`
- `reference_boost = log₂(reference_count + 1)`
- `base_weight` doubles for `🔥 HIGH` entries; `⚠️ PERMANENT` always returns `1.0`
### Example (Python-style pseudocode)
```python
import math
def score_entry(entry: dict, today_date) -> float:
if "⚠️ PERMANENT" in entry.get("markers", []):
return 1.0
days_old = (today_date - entry["created_at"]).days
recency = max(0.1, 1.0 - days_old / 180)
refs = entry.get("reference_count", 0)
ref_boost = math.log2(refs + 1) if refs > 0 else 1.0
base = entry.get("base_weight", 1.0)
if "🔥 HIGH" in entry.get("markers", []):
base *= 2.0
return min(1.0, (base * recency * ref_boost) / 8.0)
```
---
## Forgetting Curve & Archival
Entries are **never deleted** — only gracefully archived:
```python
def should_archive(entry: dict, today_date) -> bool:
# Immune markers
immune = {"⚠️ PERMANENT", "📌 PIN"}
if immune & set(entry.get("markers", [])):
return False
days_unreferenced = (today_date - entry["last_referenced"]).days
importance = entry["importance_score"]
return days_unreferenced > 90 and importance < 0.3
def archive_entry(entry: dict):
summary = f"[{entry['id']}] {entry['title']} — {entry['one_line_summary']}"
append_to_file("memory/archive.md", summary)
entry["status"] = "archived"
# Original ID preserved for relation tracking
```
---
## Health Score
```
health = (
freshness × 0.25 +
coverage × 0.25 +
coherence × 0.20 +
efficiency × 0.15 +
reachability× 0.15
) × 100
```
| Metric | Definition |
|--------|-----------|
| **Freshness** | % of entries referenced in the last 30 days |
| **Coverage** | % of knowledge categories updated in the lRelated in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.