[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77WWYYG301BVPTBMT4QFH33":3,"skill-same:01M77WWYYG301BVPTBMT4QFH33":61},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":42,"repositoryHtmlUrl":43,"repositoryHomepageUrl":44,"ownerHtmlUrl":45,"ownerBlogUrl":6,"ownerDescription":46,"updatedAt":47,"install":48,"resources":60},"01M77WWYYG301BVPTBMT4QFH33","total-recall",null,"The only memory skill that watches on its own. No database. No vectors. No manual saves. Just an LLM observer that compresses your conversations into prioritised notes, consolidates when they grow, and recovers anything missed. Five layers of redundancy, zero maintenance. ~$0.10\u002Fmonth. While other memory skills ask you to remember to remember, this one just pays attention.","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Ft\u002Ftotal-recall\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: total-recall\ndescription: \"The only memory skill that watches on its own. No database. No vectors. No manual saves. Just an LLM observer that compresses your conversations into prioritised notes, consolidates when they grow, and recovers anything missed. Five layers of redundancy, zero maintenance. ~$0.10\u002Fmonth. While other memory skills ask you to remember to remember, this one just pays attention.\"\nmetadata:\n  openclaw:\n    emoji: \"🧠\"\n    requires:\n      bins: [\"jq\", \"curl\"]\n    env:\n      - key: OPENROUTER_API_KEY\n        label: \"OpenRouter API key (for LLM calls)\"\n        required: true\n    config:\n      memorySearch:\n        description: \"Enable memory search on observations.md for cross-session recall\"\n---\n\n# Total Recall — Autonomous Agent Memory\n\n**The only memory skill that watches on its own.**\n\nNo database. No vectors. No manual saves. Just an LLM observer that compresses your conversations into prioritised notes, consolidates when they grow, and recovers anything missed. Five layers of redundancy, zero maintenance. ~$0.10\u002Fmonth.\n\nWhile other memory skills ask you to remember to remember, this one just pays attention.\n\n## Architecture\n\n```\nLayer 1: Observer (cron, every 15-30 min)\n    ↓ compresses recent messages → observations.md\nLayer 2: Reflector (auto-triggered when observations > 8000 words)\n    ↓ consolidates, removes superseded info → 40-60% reduction\nLayer 3: Session Recovery (runs on every \u002Fnew or \u002Freset)\n    ↓ catches any session the Observer missed\nLayer 4: Reactive Watcher (inotify daemon, Linux only)\n    ↓ triggers Observer after 40+ new JSONL writes, 5-min cooldown\nLayer 5: Pre-compaction hook (memoryFlush)\n    ↓ emergency capture before OpenClaw compacts context\n```\n\n## What It Does\n\n- **Observer** reads recent session transcripts (JSONL), sends them to an LLM, and appends compressed observations to `observations.md` with priority levels (high, medium, low)\n- **Reflector** kicks in when observations grow too large, consolidating related items and dropping stale low-priority entries\n- **Session Recovery** runs at session start, checks if the previous session was captured, and does an emergency observation if not\n- **Reactive Watcher** watches the session directory with inotify so high-activity periods get captured faster than the cron interval\n- **Pre-compaction hook** fires when OpenClaw is about to compact context, ensuring nothing is lost\n\n## Quick Start\n\n### 1. Install the skill\n```bash\nclawdhub install total-recall\n```\n\n### 2. Set your API key\nAdd to your `.env` or OpenClaw config:\n```bash\nOPENROUTER_API_KEY=sk-or-v1-xxxxx\n```\n\n### 3. Run the setup script\n```bash\nbash skills\u002Ftotal-recall\u002Fscripts\u002Fsetup.sh\n```\n\nThis will:\n- Create the memory directory structure (`memory\u002F`, `logs\u002F`, backups)\n- On Linux with inotify + systemd: install the reactive watcher service\n- Print cron job and agent configuration instructions for you to add manually\n\n### 4. Configure your agent to load observations\n\nAdd to your agent's workspace context (e.g., `MEMORY.md` or system prompt):\n```\nAt session startup, read `memory\u002Fobservations.md` for cross-session context.\n```\n\nOr use OpenClaw's `memoryFlush.systemPrompt` to inject a startup instruction.\n\n## Platform Support\n\n| Platform | Observer + Reflector + Recovery | Reactive Watcher |\n|----------|-------------------------------|-----------------|\n| Linux (Debian\u002FUbuntu\u002Fetc.) | Full support | With inotify-tools |\n| macOS | Full support | Not available (cron-only) |\n\nAll core scripts use portable bash. `stat`, `date`, and `md5` commands are handled cross-platform via `_compat.sh`.\n\n## Configuration\n\nAll scripts read from environment variables with sensible defaults:\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `OPENROUTER_API_KEY` | (required) | OpenRouter API key for LLM calls |\n| `MEMORY_DIR` | `$OPENCLAW_WORKSPACE\u002Fmemory` | Where observations.md lives |\n| `SESSIONS_DIR` | `~\u002F.openclaw\u002Fagents\u002Fmain\u002Fsessions` | OpenClaw session transcripts |\n| `OBSERVER_MODEL` | `deepseek\u002Fdeepseek-v3.2` | Primary model for compression |\n| `OBSERVER_FALLBACK_MODEL` | `google\u002Fgemini-2.5-flash` | Fallback if primary fails |\n| `OBSERVER_LOOKBACK_MIN` | `15` | Minutes to look back (daytime) |\n| `OBSERVER_MORNING_LOOKBACK_MIN` | `480` | Minutes to look back (before 8am) |\n| `OBSERVER_LINE_THRESHOLD` | `40` | Lines before reactive trigger (Linux) |\n| `OBSERVER_COOLDOWN_SECS` | `300` | Cooldown between reactive triggers (Linux) |\n| `REFLECTOR_WORD_THRESHOLD` | `8000` | Words before reflector runs |\n| `OPENCLAW_WORKSPACE` | `~\u002Fyour-workspace` | Workspace root |\n\n## LLM Provider Configuration\n\nTotal Recall uses any OpenAI-compatible chat completion API. Switch providers by setting environment variables:\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `LLM_BASE_URL` | `https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1` | API endpoint |\n| `LLM_API_KEY` | falls back to `OPENROUTER_API_KEY` | API key |\n| `LLM_MODEL` | `deepseek\u002Fdeepseek-v3.2` | Model to use |\n\n### Provider examples\n\n```bash\n# OpenRouter (default)\nexport OPENROUTER_API_KEY=\"your-key\"\n\n# Ollama (local)\nexport LLM_BASE_URL=\"http:\u002F\u002Flocalhost:11434\u002Fv1\"\nexport LLM_API_KEY=\"ollama\"\nexport LLM_MODEL=\"llama3.1:8b\"\n\n# Groq\nexport LLM_BASE_URL=\"https:\u002F\u002Fapi.groq.com\u002Fopenai\u002Fv1\"\nexport LLM_API_KEY=\"your-groq-key\"\nexport LLM_MODEL=\"llama-3.3-70b-versatile\"\n```\n\n## Files Created\n\n```\nmemory\u002F\n  observations.md          # The main observation log (loaded at startup)\n  observation-backups\u002F     # Reflector backups (last 10 kept)\n  .observer-last-run       # Timestamp of last observer run\n  .observer-last-hash      # Dedup hash of last processed messages\nlogs\u002F\n  observer.log\n  reflector.log\n  session-recovery.log\n  observer-watcher.log\n```\n\n## Cron Jobs\n\nThe setup script creates these OpenClaw cron jobs:\n\n| Job | Schedule | Description |\n|-----|----------|-------------|\n| `memory-observer` | Every 15 min | Compress recent conversation |\n| `memory-reflector` | Hourly | Consolidate if observations are large |\n\n## Reactive Watcher (Linux only)\n\nThe reactive watcher uses `inotifywait` to detect session activity and trigger the observer faster than cron alone. Requires Linux with `inotify-tools` installed.\n\n```bash\n# Install inotify-tools (Debian\u002FUbuntu)\nsudo apt install inotify-tools\n\n# Check watcher status\nsystemctl --user status total-recall-watcher\n\n# View logs\njournalctl --user -u total-recall-watcher -f\n```\n\n## Cost\n\nUsing DeepSeek v3.2 via OpenRouter:\n- ~$0.03-0.10\u002Fmonth for typical usage (observer + reflector)\n- ~15-30 cron runs\u002Fday, each processing a few hundred tokens\n\n## How It Works (Technical)\n\n### Observer\n1. Finds recently modified session JSONL files\n2. Filters out subagent\u002Fcron sessions\n3. Extracts user + assistant messages from the lookback window\n4. Deduplicates using MD5 hash comparison\n5. Sends to LLM with the observer prompt (priority-based compression)\n6. Appends result to `observations.md`\n7. If observations exceed the word threshold, triggers reflector\n\n### Reflector\n1. Backs up current observations\n2. Sends entire log to LLM with consolidation instructions\n3. Validates output is shorter than input (sanity check)\n4. Replaces observations with consolidated version\n5. Cleans old backups (keeps last 10)\n\n### Session Recovery\n1. Runs at every `\u002Fnew` or `\u002Freset`\n2. Hashes recent lines of the last session file\n3. Compares against stored hash from last observer run\n4. If mismatch: runs observer in recovery mode (4-hour lookback)\n5. Fallback: raw message extraction if observer fails\n\n### Reactive Watcher\n1. Uses `inotifywait` to monitor session directory\n2. Counts JSONL writes to main session files only\n3. After 40+ lines: triggers observer (with 5-min cooldown)\n4. Resets counter when cron\u002Fexternal observer runs are detected\n\n## Customizing the Prompts\n\nThe observer and reflector system prompts are in `prompts\u002F`:\n- `prompts\u002Fobserver-system.txt` — controls how conversations are compressed\n- `prompts\u002Freflector-system.txt` — controls how observations are consolidated\n\nEdit these to match your agent's personality and priorities.\n\n---\n\n## Dream Cycle\n\nThe Dream Cycle is an optional nightly agent that runs after hours to consolidate `observations.md`. It archives stale items and adds semantic hooks so nothing useful is actually lost. Context stays lean; everything remains findable.\n\n### What It Does\n\n- Classifies every observation by impact (critical \u002F high \u002F medium \u002F low \u002F minimal) and age\n- Archives items that have passed their relevance threshold\n- Adds a semantic hook for each archived item (specific keywords + archive reference)\n- Validates the result and rolls back automatically if something goes wrong\n\n### Features\n\n**Multi-Hook Retrieval** — 4-5 alternative search phrasings per archived item. Searches using different words than the original still find the memory.\n\n**Confidence Scoring** — every observation gets a confidence score (0.0-1.0) and source type (`explicit`, `implicit`, `inference`, `weak`, `uncertain`). High-confidence items are preserved longer; low-confidence items are archived sooner.\n\n**Memory Type System** — 7 types with per-type TTLs: `event` (14d), `fact` (90d), `preference` (180d), `goal` (365d), `habit` (365d), `rule` (never), `context` (30d). Embedded as invisible HTML metadata comments in `observations.md`.\n\n**Observation Chunking** — clusters of 3+ related observations are compressed into single summary entries. Source observations are archived; a chunk hook replaces them. Achieves up to 75% token reduction.\n\n**Importance Decay** — per-type daily decay applied to importance scores before each archival decision. Items that decay below the archive threshold are queued for removal. Rates: `event` (-0.5\u002Fday), `fact` (-0.1\u002Fday), `preference` (-0.02\u002Fday), `rule`\u002F`habit`\u002F`goal` (no decay).\n\n**Pattern Promotion** — scans recent dream logs for recurring themes (3+ occurrences across 3+ separate days). Writes promotion proposals to `memory\u002Fdream-staging\u002F` for human review. Use `staging-review.sh` to list, show, approve, or reject proposals. The `context` type is never promoted automatically.\n\n### Setup\n\n1. Run `bash skills\u002Ftotal-recall\u002Fscripts\u002Fsetup.sh` — creates Dream Cycle directories automatically.\n\n2. Add the nightly cron job:\n   ```\n   # Dream Cycle — nightly at 3am\n   0 3 * * * OPENCLAW_WORKSPACE=~\u002Fyour-workspace bash ~\u002Fyour-workspace\u002Fskills\u002Ftotal-recall\u002Fscripts\u002Fdream-cycle.sh preflight\n   ```\n\n3. Configure your cron agent using `prompts\u002Fdream-cycle-prompt.md` as the system prompt. Recommended models: Claude Sonnet for the Dreamer (analysis + decisions), DeepSeek v3.2 for the Observer (cheap, fast).\n\n4. Start with `READ_ONLY_MODE=true` for the first few nights. Check `memory\u002Fdream-logs\u002F` after each run to verify what it would have archived.\n\n5. Switch to `READ_ONLY_MODE=false` once satisfied.\n\n### Configuration\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `DREAM_TOKEN_TARGET` | `8000` | Token target for observations.md after consolidation |\n| `READ_ONLY_MODE` | `false` | Set `true` for dry-run analysis without writes |\n\n### Files\n\n| File | Description |\n|------|-------------|\n| `scripts\u002Fdream-cycle.sh` | Shell helper: preflight, archive, update-observations, write-log, write-metrics, validate, rollback |\n| `prompts\u002Fdream-cycle-prompt.md` | Agent prompt for the nightly Dream Cycle run |\n| `dream-cycle\u002FREADME.md` | Dream Cycle quick reference |\n| `schemas\u002Fobservation-format.md` | Extended observation metadata format |\n\n### Directories Created\n\n```\nmemory\u002F\n  archive\u002F\n    observations\u002F        # Archived items (one .md file per night)\n    chunks\u002F              # Chunked observation groups\n  dream-logs\u002F            # Nightly run reports\n  dream-staging\u002F         # Pattern promotion proposals awaiting human review\n  .dream-backups\u002F        # Pre-run safety backups\nresearch\u002F\n  dream-cycle-metrics\u002F\n    daily\u002F               # JSON metrics per night\n```\n\n---\n\n## Troubleshooting\n\n**Observer not running?**\n- Check `logs\u002Fobserver.log` for errors\n- Verify `OPENROUTER_API_KEY` is set and valid\n- Confirm cron is active: `crontab -l`\n\n**Observations not being loaded at session start?**\n- Ensure your agent's startup instructions include reading `memory\u002Fobservations.md`\n- Check `MEMORY_DIR` points to the right location\n\n**Reactive watcher not triggering (Linux)?**\n- Run `systemctl --user status total-recall-watcher`\n- Check `inotify-tools` is installed: `which inotifywait`\n- View watcher logs: `journalctl --user -u total-recall-watcher -f`\n\n**Dream Cycle archiving too aggressively?**\n- Enable `READ_ONLY_MODE=true` and review dream logs before going live\n- Adjust `DREAM_TOKEN_TARGET` upward to archive less per run\n\n**Dream Cycle not archiving enough?**\n- Lower `DREAM_TOKEN_TARGET` to trigger more aggressive consolidation\n\n---\n\n## Inspired By\n\nThis system is inspired by how human memory works during sleep — the hippocampus (observer) captures experiences, and during sleep consolidation (reflector), important memories are strengthened while noise is discarded.\n\nRead more: [Your AI Has an Attention Problem](https:\u002F\u002Fgavlahh.substack.com\u002Fp\u002Fyour-ai-has-an-attention-problem)\n\n*\"Get your ass to Mars.\" — Well, get your agent's memory to work.*\n","# Total Recall — Autonomous Agent Memory\n\n**The only memory skill that watches on its own.**\n\nNo database. No vectors. No manual saves. Just an LLM observer that compresses your conversations into prioritised notes, consolidates when they grow, and recovers anything missed. Five layers of redundancy, zero maintenance. ~$0.10\u002Fmonth.\n\nWhile other memory skills ask you to remember to remember, this one just pays attention.\n\n## Architecture\n\n```\nLayer 1: Observer (cron, every 15-30 min)\n    ↓ compresses recent messages → observations.md\nLayer 2: Reflector (auto-triggered when observations > 8000 words)\n    ↓ consolidates, removes superseded info → 40-60% reduction\nLayer 3: Session Recovery (runs on every \u002Fnew or \u002Freset)\n    ↓ catches any session the Observer missed\nLayer 4: Reactive Watcher (inotify daemon, Linux only)\n    ↓ triggers Observer after 40+ new JSONL writes, 5-min cooldown\nLayer 5: Pre-compaction hook (memoryFlush)\n    ↓ emergency capture before OpenClaw compacts context\n```\n\n## What It Does\n\n- **Observer** reads recent session transcripts (JSONL), sends them to an LLM, and appends compressed observations to `observations.md` with priority levels (high, medium, low)\n- **Reflector** kicks in when observations grow too large, consolidating related items and dropping stale low-priority entries\n- **Session Recovery** runs at session start, checks if the previous session was captured, and does an emergency observation if not\n- **Reactive Watcher** watches the session directory with inotify so high-activity periods get captured faster than the cron interval\n- **Pre-compaction hook** fires when OpenClaw is about to compact context, ensuring nothing is lost\n\n## Quick Start\n\n### 1. Install the skill\n```bash\nclawdhub install total-recall\n```\n\n### 2. Set your API key\nAdd to your `.env` or OpenClaw config:\n```bash\nOPENROUTER_API_KEY=sk-or-v1-xxxxx\n```\n\n### 3. Run the setup script\n```bash\nbash skills\u002Ftotal-recall\u002Fscripts\u002Fsetup.sh\n```\n\nThis will:\n- Create the memory directory structure (`memory\u002F`, `logs\u002F`, backups)\n- On Linux with inotify + systemd: install the reactive watcher service\n- Print cron job and agent configuration instructions for you to add manually\n\n### 4. Configure your agent to load observations\n\nAdd to your agent's workspace context (e.g., `MEMORY.md` or system prompt):\n```\nAt session startup, read `memory\u002Fobservations.md` for cross-session context.\n```\n\nOr use OpenClaw's `memoryFlush.systemPrompt` to inject a startup instruction.\n\n## Platform Support\n\n| Platform | Observer + Reflector + Recovery | Reactive Watcher |\n|----------|-------------------------------|-----------------|\n| Linux (Debian\u002FUbuntu\u002Fetc.) | Full support | With inotify-tools |\n| macOS | Full support | Not available (cron-only) |\n\nAll core scripts use portable bash. `stat`, `date`, and `md5` commands are handled cross-platform via `_compat.sh`.\n\n## Configuration\n\nAll scripts read from environment variables with sensible defaults:\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `OPENROUTER_API_KEY` | (required) | OpenRouter API key for LLM calls |\n| `MEMORY_DIR` | `$OPENCLAW_WORKSPACE\u002Fmemory` | Where observations.md lives |\n| `SESSIONS_DIR` | `~\u002F.openclaw\u002Fagents\u002Fmain\u002Fsessions` | OpenClaw session transcripts |\n| `OBSERVER_MODEL` | `deepseek\u002Fdeepseek-v3.2` | Primary model for compression |\n| `OBSERVER_FALLBACK_MODEL` | `google\u002Fgemini-2.5-flash` | Fallback if primary fails |\n| `OBSERVER_LOOKBACK_MIN` | `15` | Minutes to look back (daytime) |\n| `OBSERVER_MORNING_LOOKBACK_MIN` | `480` | Minutes to look back (before 8am) |\n| `OBSERVER_LINE_THRESHOLD` | `40` | Lines before reactive trigger (Linux) |\n| `OBSERVER_COOLDOWN_SECS` | `300` | Cooldown between reactive triggers (Linux) |\n| `REFLECTOR_WORD_THRESHOLD` | `8000` | Words before reflector runs |\n| `OPENCLAW_WORKSPACE` | `~\u002Fyour-workspace` | Workspace root |\n\n## LLM Provider Configuration\n\nTotal Recall uses any OpenAI-compatible chat completion API. Switch providers by setting environment variables:\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `LLM_BASE_URL` | `https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1` | API endpoint |\n| `LLM_API_KEY` | falls back to `OPENROUTER_API_KEY` | API key |\n| `LLM_MODEL` | `deepseek\u002Fdeepseek-v3.2` | Model to use |\n\n### Provider examples\n\n```bash\n# OpenRouter (default)\nexport OPENROUTER_API_KEY=\"your-key\"\n\n# Ollama (local)\nexport LLM_BASE_URL=\"http:\u002F\u002Flocalhost:11434\u002Fv1\"\nexport LLM_API_KEY=\"ollama\"\nexport LLM_MODEL=\"llama3.1:8b\"\n\n# Groq\nexport LLM_BASE_URL=\"https:\u002F\u002Fapi.groq.com\u002Fopenai\u002Fv1\"\nexport LLM_API_KEY=\"your-groq-key\"\nexport LLM_MODEL=\"llama-3.3-70b-versatile\"\n```\n\n## Files Created\n\n```\nmemory\u002F\n  observations.md          # The main observation log (loaded at startup)\n  observation-backups\u002F     # Reflector backups (last 10 kept)\n  .observer-last-run       # Timestamp of last observer run\n  .observer-last-hash      # Dedup hash of last processed messages\nlogs\u002F\n  observer.log\n  reflector.log\n  session-recovery.log\n  observer-watcher.log\n```\n\n## Cron Jobs\n\nThe setup script creates these OpenClaw cron jobs:\n\n| Job | Schedule | Description |\n|-----|----------|-------------|\n| `memory-observer` | Every 15 min | Compress recent conversation |\n| `memory-reflector` | Hourly | Consolidate if observations are large |\n\n## Reactive Watcher (Linux only)\n\nThe reactive watcher uses `inotifywait` to detect session activity and trigger the observer faster than cron alone. Requires Linux with `inotify-tools` installed.\n\n```bash\n# Install inotify-tools (Debian\u002FUbuntu)\nsudo apt install inotify-tools\n\n# Check watcher status\nsystemctl --user status total-recall-watcher\n\n# View logs\njournalctl --user -u total-recall-watcher -f\n```\n\n## Cost\n\nUsing DeepSeek v3.2 via OpenRouter:\n- ~$0.03-0.10\u002Fmonth for typical usage (observer + reflector)\n- ~15-30 cron runs\u002Fday, each processing a few hundred tokens\n\n## How It Works (Technical)\n\n### Observer\n1. Finds recently modified session JSONL files\n2. Filters out subagent\u002Fcron sessions\n3. Extracts user + assistant messages from the lookback window\n4. Deduplicates using MD5 hash comparison\n5. Sends to LLM with the observer prompt (priority-based compression)\n6. Appends result to `observations.md`\n7. If observations exceed the word threshold, triggers reflector\n\n### Reflector\n1. Backs up current observations\n2. Sends entire log to LLM with consolidation instructions\n3. Validates output is shorter than input (sanity check)\n4. Replaces observations with consolidated version\n5. Cleans old backups (keeps last 10)\n\n### Session Recovery\n1. Runs at every `\u002Fnew` or `\u002Freset`\n2. Hashes recent lines of the last session file\n3. Compares against stored hash from last observer run\n4. If mismatch: runs observer in recovery mode (4-hour lookback)\n5. Fallback: raw message extraction if observer fails\n\n### Reactive Watcher\n1. Uses `inotifywait` to monitor session directory\n2. Counts JSONL writes to main session files only\n3. After 40+ lines: triggers observer (with 5-min cooldown)\n4. Resets counter when cron\u002Fexternal observer runs are detected\n\n## Customizing the Prompts\n\nThe observer and reflector system prompts are in `prompts\u002F`:\n- `prompts\u002Fobserver-system.txt` — controls how conversations are compressed\n- `prompts\u002Freflector-system.txt` — controls how observations are consolidated\n\nEdit these to match your agent's personality and priorities.\n\n---\n\n## Dream Cycle\n\nThe Dream Cycle is an optional nightly agent that runs after hours to consolidate `observations.md`. It archives stale items and adds semantic hooks so nothing useful is actually lost. Context stays lean; everything remains findable.\n\n### What It Does\n\n- Classifies every observation by impact (critical \u002F high \u002F medium \u002F low \u002F minimal) and age\n- Archives items that have passed their relevance threshold\n- Adds a semantic hook for each archived item (specific keywords + archive reference)\n- Validates the result and rolls back automatically if something goes wrong\n\n### Features\n\n**Multi-Hook Retrieval** — 4-5 alternative search phrasings per archived item. Searches using different words than the original still find the memory.\n\n**Confidence Scoring** — every observation gets a confidence score (0.0-1.0) and source type (`explicit`, `implicit`, `inference`, `weak`, `uncertain`). High-confidence items are preserved longer; low-confidence items are archived sooner.\n\n**Memory Type System** — 7 types with per-type TTLs: `event` (14d), `fact` (90d), `preference` (180d), `goal` (365d), `habit` (365d), `rule` (never), `context` (30d). Embedded as invisible HTML metadata comments in `observations.md`.\n\n**Observation Chunking** — clusters of 3+ related observations are compressed into single summary entries. Source observations are archived; a chunk hook replaces them. Achieves up to 75% token reduction.\n\n**Importance Decay** — per-type daily decay applied to importance scores before each archival decision. Items that decay below the archive threshold are queued for removal. Rates: `event` (-0.5\u002Fday), `fact` (-0.1\u002Fday), `preference` (-0.02\u002Fday), `rule`\u002F`habit`\u002F`goal` (no decay).\n\n**Pattern Promotion** — scans recent dream logs for recurring themes (3+ occurrences across 3+ separate days). Writes promotion proposals to `memory\u002Fdream-staging\u002F` for human review. Use `staging-review.sh` to list, show, approve, or reject proposals. The `context` type is never promoted automatically.\n\n### Setup\n\n1. Run `bash skills\u002Ftotal-recall\u002Fscripts\u002Fsetup.sh` — creates Dream Cycle directories automatically.\n\n2. Add the nightly cron job:\n   ```\n   # Dream Cycle — nightly at 3am\n   0 3 * * * OPENCLAW_WORKSPACE=~\u002Fyour-workspace bash ~\u002Fyour-workspace\u002Fskills\u002Ftotal-recall\u002Fscripts\u002Fdream-cycle.sh preflight\n   ```\n\n3. Configure your cron agent using `prompts\u002Fdream-cycle-prompt.md` as the system prompt. Recommended models: Claude Sonnet for the Dreamer (analysis + decisions), DeepSeek v3.2 for the Observer (cheap, fast).\n\n4. Start with `READ_ONLY_MODE=true` for the first few nights. Check `memory\u002Fdream-logs\u002F` after each run to verify what it would have archived.\n\n5. Switch to `READ_ONLY_MODE=false` once satisfied.\n\n### Configuration\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `DREAM_TOKEN_TARGET` | `8000` | Token target for observations.md after consolidation |\n| `READ_ONLY_MODE` | `false` | Set `true` for dry-run analysis without writes |\n\n### Files\n\n| File | Description |\n|------|-------------|\n| `scripts\u002Fdream-cycle.sh` | Shell helper: preflight, archive, update-observations, write-log, write-metrics, validate, rollback |\n| `prompts\u002Fdream-cycle-prompt.md` | Agent prompt for the nightly Dream Cycle run |\n| `dream-cycle\u002FREADME.md` | Dream Cycle quick reference |\n| `schemas\u002Fobservation-format.md` | Extended observation metadata format |\n\n### Directories Created\n\n```\nmemory\u002F\n  archive\u002F\n    observations\u002F        # Archived items (one .md file per night)\n    chunks\u002F              # Chunked observation groups\n  dream-logs\u002F            # Nightly run reports\n  dream-staging\u002F         # Pattern promotion proposals awaiting human review\n  .dream-backups\u002F        # Pre-run safety backups\nresearch\u002F\n  dream-cycle-metrics\u002F\n    daily\u002F               # JSON metrics per night\n```\n\n---\n\n## Troubleshooting\n\n**Observer not running?**\n- Check `logs\u002Fobserver.log` for errors\n- Verify `OPENROUTER_API_KEY` is set and valid\n- Confirm cron is active: `crontab -l`\n\n**Observations not being loaded at session start?**\n- Ensure your agent's startup instructions include reading `memory\u002Fobservations.md`\n- Check `MEMORY_DIR` points to the right location\n\n**Reactive watcher not triggering (Linux)?**\n- Run `systemctl --user status total-recall-watcher`\n- Check `inotify-tools` is installed: `which inotifywait`\n- View watcher logs: `journalctl --user -u total-recall-watcher -f`\n\n**Dream Cycle archiving too aggressively?**\n- Enable `READ_ONLY_MODE=true` and review dream logs before going live\n- Adjust `DREAM_TOKEN_TARGET` upward to archive less per run\n\n**Dream Cycle not archiving enough?**\n- Lower `DREAM_TOKEN_TARGET` to trigger more aggressive consolidation\n\n---\n\n## Inspired By\n\nThis system is inspired by how human memory works during sleep — the hippocampus (observer) captures experiences, and during sleep consolidation (reflector), important memories are strengthened while noise is discarded.\n\nRead more: [Your AI Has an Attention Problem](https:\u002F\u002Fgavlahh.substack.com\u002Fp\u002Fyour-ai-has-an-attention-problem)\n\n*\"Get your ass to Mars.\" — Well, get your agent's memory to work.*\n",{"name":5,"metadata":24,"description":7},{"openclaw":25},{"env":26,"emoji":31,"config":32,"requires":35},[27],{"key":28,"label":29,"required":30},"OPENROUTER_API_KEY","OpenRouter API key (for LLM calls)",true,"🧠",{"memorySearch":33},{"description":34},"Enable memory search on observations.md for cross-session recall",{"bins":36},[37,38],"jq","curl","master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Ft\u002Ftotal-recall",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":30},[50,53,56],{"tool":51,"command":52},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill total-recall",{"tool":54,"command":55},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill total-recall",{"tool":57,"command":58},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill total-recall","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Ft\u002Ftotal-recall\u002FSKILL.md",[],[62,69,76,83,90,97],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]