Agent skill

Total Recall

by gavdalf in gavdalf/total-recall

The only memory skill that watches on its own. An agent skill from gavdalf/total-recall.

MITAuto-check: notes

Install Total Recall

skills CLI
$ npx skills add gavdalf/total-recall --skill total-recall -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install gavdalf/total-recall total-recall --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
total-recall
GitHub stars
274
Token cost
~3.6k tokens
SKILL.md length
1,301 words
Files
51 (incl. scripts)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

The only memory skill that watches on its own. An agent skill from gavdalf/total-recall.

  • Works in 4 steps: Install the skill → Set your API key → Run the setup script → …
  • SKILL.md covers Architecture, What It Does, Quick Start and Platform Support, plus 10 more sections
  • Calls bash and apt; reaches openrouter.ai and api.groq.com; needs OPENROUTER_API_KEY and LLM_API_KEY

What it does

Total Recall is an agent skill from gavdalf/total-recall. 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.00/month (using free-tier models). While other memory skills ask you to remember to remember, this one just pays attention.

Its SKILL.md is about 3.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 54 other files, including scripts (for example `CHANGELOG.md`, `CODE_OF_CONDUCT.md` and `CONTRIBUTING.md`).

It works with Linux. The repository describes itself as: Total Recall — Autonomous Agent Memory. The only memory system that watches on its own. Five-layer observational memory for OpenClaw agents. ~$0.10/month. The licence is MIT.

Example prompts

  • “/total-recall”

Requirements

  • A credential in OPENROUTER_API_KEY
  • A credential in LLM_API_KEY

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Install the skill
  2. Set your API key
  3. Run the setup script
  4. Configure your agent to load observations

What it can do on your machine

Read from SKILL.md and the folder at commit 437ab36. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    Shell commands in SKILL.md call:

    • bash
    • apt

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • openrouter.ai
    • api.groq.com

    Also links to:

    • gavlahh.substack.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • OPENROUTER_API_KEY
    • LLM_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Total Recall loads about 3.6k tokens when it runs. Until then it costs about 103 tokens; SKILL.md has 1,301 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~103
When it runs · the whole SKILL.md, loaded when a task matches
~3.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:57
    Add to your `.env` or OpenClaw config:
  • NoteRuns commands with sudoSKILL.md:167
    sudo apt install inotify-tools

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from gavdalf/total-recall at commit 437ab36, republished under its MIT licence (© gavdalf). 1,301 words, ~3,610 tokens.

Download SKILL.mdSave it as .claude/skills/total-recall/SKILL.md (or your agent's skills folder). This skill also uses 50 other files; get the full folder from GitHub.
name
total-recall
description
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.00/month (using free-tier models). While other memory skills ask you to remember to remember, this one just pays attention.

Total Recall — Autonomous Agent Memory

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.00/month (using free-tier models).

While other memory skills ask you to remember to remember, this one just pays attention.

Architecture

Layer 1: Observer (cron, every 15-30 min)
    ↓ compresses recent messages → observations.md
Layer 2: Reflector (auto-triggered when observations > 8000 words)
    ↓ consolidates, removes superseded info → 40-60% reduction
Layer 3: Session Recovery (runs on every /new or /reset)
    ↓ catches any session the Observer missed
Layer 4: Reactive Watcher (inotify daemon, Linux only)
    ↓ triggers Observer after 40+ new JSONL writes, 5-min cooldown
Layer 5: Pre-compaction hook (memoryFlush)
    ↓ emergency capture before OpenClaw compacts context

What It Does

  • Observer reads recent session transcripts (JSONL), sends them to an LLM, and appends compressed observations to observations.md with priority levels (high, medium, low)
  • Reflector kicks in when observations grow too large, consolidating related items and dropping stale low-priority entries
  • Session Recovery runs at session start, checks if the previous session was captured, and does an emergency observation if not
  • Reactive Watcher watches the session directory with inotify so high-activity periods get captured faster than the cron interval
  • Pre-compaction hook fires when OpenClaw is about to compact context, ensuring nothing is lost

Quick Start

1. Install the skill
bash
clawdhub install total-recall
2. Set your API key

Add to your .env or OpenClaw config:

bash
OPENROUTER_API_KEY=sk-or-v1-xxxxx
3. Run the setup script
bash
bash skills/total-recall/scripts/setup.sh

This will:

  • Create the memory directory structure (memory/, logs/, backups)
  • On Linux with inotify + systemd: install the reactive watcher service
  • Print cron job and agent configuration instructions for you to add manually
4. Configure your agent to load observations

Add to your agent's workspace context (e.g., MEMORY.md or system prompt):

At session startup, read `memory/observations.md` for cross-session context.

Or use OpenClaw's memoryFlush.systemPrompt to inject a startup instruction.

Platform Support

PlatformObserver + Reflector + RecoveryReactive Watcher
Linux (Debian/Ubuntu/etc.)Full supportWith inotify-tools
macOSFull supportNot available (cron-only)

All core scripts use portable bash. stat, date, and md5 commands are handled cross-platform via _compat.sh.

Configuration

All scripts read from environment variables with sensible defaults:

VariableDefaultDescription
OPENROUTER_API_KEY(required)OpenRouter API key for LLM calls
MEMORY_DIR$OPENCLAW_WORKSPACE/memoryWhere observations.md lives
SESSIONS_DIR~/.openclaw/agents/main/sessionsOpenClaw session transcripts
OBSERVER_MODELstepfun/step-3.5-flash:freePrimary model for compression (free)
OBSERVER_FALLBACK_MODELnvidia/nemotron-3-nano-30b-a3b:freeFallback if primary fails (free)
OBSERVER_LOOKBACK_MIN15Minutes to look back (daytime)
OBSERVER_MORNING_LOOKBACK_MIN480Minutes to look back (before 8am)
OBSERVER_LINE_THRESHOLD40Lines before reactive trigger (Linux)
OBSERVER_COOLDOWN_SECS300Cooldown between reactive triggers (Linux)
REFLECTOR_WORD_THRESHOLD8000Words before reflector runs
REFLECTOR_MODELnvidia/nemotron-3-super-120b-a12b:freeModel for consolidating observations (free)
REFLECTOR_FALLBACK_MODELopenrouter/hunter-alphaFallback if reflector model fails (free)
OPENCLAW_WORKSPACE~/your-workspaceWorkspace root

LLM Provider Configuration

Total Recall uses any OpenAI-compatible chat completion API. Switch providers by setting environment variables:

VariableDefaultDescription
LLM_BASE_URLhttps://openrouter.ai/api/v1API endpoint
LLM_API_KEYfalls back to OPENROUTER_API_KEYAPI key
LLM_MODELdeepseek/deepseek-v3.2Model to use
Provider examples
bash
# OpenRouter (default)
export OPENROUTER_API_KEY="your-key"

# Ollama (local)
export LLM_BASE_URL="http://localhost:11434/v1"
export LLM_API_KEY="ollama"
export LLM_MODEL="llama3.1:8b"

# Groq
export LLM_BASE_URL="https://api.groq.com/openai/v1"
export LLM_API_KEY="your-groq-key"
export LLM_MODEL="llama-3.3-70b-versatile"

Files Created

memory/
  observations.md          # The main observation log (loaded at startup)
  observation-backups/     # Reflector backups (last 10 kept)
  .observer-last-run       # Timestamp of last observer run
  .observer-last-hash      # Dedup hash of last processed messages
logs/
  observer.log
  reflector.log
  session-recovery.log
  observer-watcher.log

Cron Jobs

The setup script creates these OpenClaw cron jobs:

JobScheduleDescription
memory-observerEvery 15 minCompress recent conversation
memory-reflectorHourlyConsolidate if observations are large

Reactive Watcher (Linux only)

The reactive watcher uses inotifywait to detect session activity and trigger the observer faster than cron alone. Requires Linux with inotify-tools installed.

bash
# Install inotify-tools (Debian/Ubuntu)
sudo apt install inotify-tools

# Check watcher status
systemctl --user status total-recall-watcher

# View logs
journalctl --user -u total-recall-watcher -f

Cost

Using the default free models via OpenRouter:

  • ~$0.00/month (using free-tier models) for typical usage (observer + reflector)
  • ~15-30 cron runs/day, each processing a few hundred tokens
  • All default models are free tier models

Model Notes

The scripts include defensive handling for both .content and .reasoning fields in API responses. While most models return content in the standard .content field, the fallback to .reasoning ensures compatibility with models that may use different response formats.

How It Works (Technical)

Observer
  1. Finds recently modified session JSONL files
  2. Filters out subagent/cron sessions
  3. Extracts user + assistant messages from the lookback window
  4. Deduplicates using MD5 hash comparison
  5. Sends to LLM with the observer prompt (priority-based compression)
  6. Appends result to observations.md
  7. If observations exceed the word threshold, triggers reflector
Reflector
  1. Backs up current observations
  2. Sends entire log to LLM with consolidation instructions
  3. Validates output is shorter than input (sanity check)
  4. Replaces observations with consolidated version
  5. Cleans old backups (keeps last 10)
Session Recovery
  1. Runs at every /new or /reset
  2. Hashes recent lines of the last session file
  3. Compares against stored hash from last observer run
  4. If mismatch: runs observer in recovery mode (4-hour lookback)
  5. Fallback: raw message extraction if observer fails
Reactive Watcher
  1. Uses inotifywait to monitor session directory
  2. Counts JSONL writes to main session files only
  3. After 40+ lines: triggers observer (with 5-min cooldown)
  4. Resets counter when cron/external observer runs are detected

Customizing the Prompts

The observer and reflector system prompts are in prompts/:

  • prompts/observer-system.txt — controls how conversations are compressed
  • prompts/reflector-system.txt — controls how observations are consolidated

Edit these to match your agent's personality and priorities.


Dream Cycle

The 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.

What It Does
  • Classifies every observation by impact (critical / high / medium / low / minimal) and age
  • Archives items that have passed their relevance threshold
  • Adds a semantic hook for each archived item (specific keywords + archive reference)
  • Validates the result and rolls back automatically if something goes wrong
Show full SKILL.md (536 more words)Show less
Features

Multi-Hook Retrieval — 4-5 alternative search phrasings per archived item. Searches using different words than the original still find the memory.

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.

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.

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.

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/day), fact (-0.1/day), preference (-0.02/day), rule/habit/goal (no decay).

Pattern Promotion — scans recent dream logs for recurring themes (3+ occurrences across 3+ separate days). Writes promotion proposals to memory/dream-staging/ for human review. Use staging-review.sh to list, show, approve, or reject proposals. The context type is never promoted automatically.

Setup
  1. Run bash skills/total-recall/scripts/setup.sh — creates Dream Cycle directories automatically.

  2. Add the nightly cron job as a full agent turn:

    # Dream Cycle — nightly (3am recommended; adjust to your timezone)
    # The dream cycle runs as a full agent turn — NOT as a direct bash call.
    # dream-cycle.sh is a file operations helper called BY the agent, not the entry point.
    #
    # 0 3 * * * bash -c 'source ~/.openclaw/shared/secrets/openclaw-secrets.env \
    #   && openclaw agent --agent main \
    #   --message "Run the Total Recall Dream Cycle. Follow the instructions in \
    # $WORKSPACE/skills/total-recall/prompts/dream-cycle-prompt.md exactly. \
    # Use READ_ONLY_MODE=false and DREAM_PHASE=1." \
    #   --json >> $WORKSPACE/logs/dream-cycle.log 2>&1'
  3. Configure your cron agent using prompts/dream-cycle-prompt.md as the system prompt. Recommended models: Claude Sonnet for the Dreamer (analysis + decisions), DeepSeek v3.2 for the Observer (cheap, fast).

  4. Start with READ_ONLY_MODE=true for the first few nights. Check memory/dream-logs/ after each run to verify what it would have archived.

  5. Switch to READ_ONLY_MODE=false once satisfied.

Configuration
VariableDefaultDescription
DREAM_TOKEN_TARGET8000Token target for observations.md after consolidation
READ_ONLY_MODEfalseSet true for dry-run analysis without writes
Files
FileDescription
scripts/dream-cycle.shShell helper called by the agent (not a standalone runner): preflight, archive, update-observations, write-log, write-metrics, validate, rollback
prompts/dream-cycle-prompt.mdAgent prompt for the nightly Dream Cycle run
dream-cycle/README.mdDream Cycle quick reference
schemas/observation-format.mdExtended observation metadata format
Directories Created
memory/
  archive/
    observations/        # Archived items (one .md file per night)
    chunks/              # Chunked observation groups
  dream-logs/            # Nightly run reports
  dream-staging/         # Pattern promotion proposals awaiting human review
  .dream-backups/        # Pre-run safety backups
research/
  dream-cycle-metrics/
    daily/               # JSON metrics per night

Troubleshooting

Observer not running?

  • Check logs/observer.log for errors
  • Verify OPENROUTER_API_KEY is set and valid
  • Confirm cron is active: crontab -l

Observations not being loaded at session start?

  • Ensure your agent's startup instructions include reading memory/observations.md
  • Check MEMORY_DIR points to the right location

Reactive watcher not triggering (Linux)?

  • Run systemctl --user status total-recall-watcher
  • Check inotify-tools is installed: which inotifywait
  • View watcher logs: journalctl --user -u total-recall-watcher -f

Dream Cycle archiving too aggressively?

  • Enable READ_ONLY_MODE=true and review dream logs before going live
  • Adjust DREAM_TOKEN_TARGET upward to archive less per run

Dream Cycle not archiving enough?

  • Lower DREAM_TOKEN_TARGET to trigger more aggressive consolidation

Inspired By

This 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.

Read more: Your AI Has an Attention Problem

"Get your ass to Mars." — Well, get your agent's memory to work.

© gavdalf, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 50 other files (scripts) in the repository root of gavdalf/total-recall.

  • SKILL.md
  • .gitignore
  • CHANGELOG.md
  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • INSTALL-AGENT.md
  • LICENSE
  • README.md
  • config/aie.yaml
  • config/cron-job.json
  • config/memory-flush.json
  • docs/architecture.md
  • docs/edge-cases.md
  • docs/faq.md
  • dream-cycle/README.md
  • prompts/dream-cycle-prompt.md
  • prompts/observer-system.txt
  • … and 34 more

Open the folder on GitHubat commit 437ab36

Compare with similar skills

Total Recall next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Total Recall compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Total Recall this skillgavdalf/total-recall274—~3.6kAutomated safety check: NotesMIT
Configuring Horizoncoollabsio/coolify63k4 repos~898Automated safety check: PassMIT
Model Usageopenclaw/openclaw392k1 repos~637Automated safety check: PassMIT
Engine Whats Newflutter/flutter179k—~978Automated safety check: PassBSD-3-Clause
Openclaw Live Updateropenclaw/openclaw392k—~3.7kAutomated safety check: PassMIT
Upgrade Browserflutter/flutter179k—~1.1kAutomated safety check: PassBSD-3-Clause

Similar skills

  • Configuring Horizon

    coollabsio/coolify

    A skill your agent uses whenever the user mentions Horizon by name in a Laravel context.

    63k GitHub starsUsed in 4 repos~898 tokens
    Backend & APIsAuto-check passed
  • Model Usage

    openclaw/openclaw

    Summarize CodexBar local cost logs by model for Codex or Claude, including current or full breakdowns.

    392k GitHub starsUsed in 1 repo~637 tokens
    Auto-check passed
  • Engine Whats New

    flutter/flutter

    Generates the "what's new" release summary and diff file for changes in the Flutter engine (//engine/src/flutter) between two releases (e.g., 3.47 vs 3.44).

    179k GitHub stars~978 tokensUpdated yesterday
    MobileAuto-check passed
  • Openclaw Live Updater

    openclaw/openclaw

    Maintain the canonical live OpenClaw main checkout, macOS LaunchAgent-managed Gateway, local macOS app, exact-head main CI, and recurring full release validation.

    392k GitHub stars~3.7k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Upgrade Browser

    flutter/flutter

    Upgrade browser versions (Chrome or Firefox) in the Flutter Web Engine and/or Framework tests.

    179k GitHub stars~1.1k tokensUpdated yesterday
    MobileAuto-check passed
  • K8s Security Policies

    Cybereason-Public/owLSM

    Comprehensive guide for implementing NetworkPolicy, PodSecurityPolicy, RBAC, and Pod Security Standards in Kubernetes.

    280 GitHub starsUsed in 12 repos~2k tokens
    Backend & APIsAuto-check passed

Works with

Questions about Total Recall

What does Total Recall do?

The only memory skill that watches on its own. An agent skill from gavdalf/total-recall. Total Recall is an agent skill from gavdalf/total-recall. The only memory skill that watches on its own.

How do I install Total Recall in Claude Code?

Run `npx skills add gavdalf/total-recall --skill total-recall -a claude-code`. Or copy the skill folder (the gavdalf/total-recall repository) into .claude/skills/total-recall in your project. Claude Code loads it when a task matches its description.

How do I install Total Recall in Codex?

Run `npx skills add gavdalf/total-recall --skill total-recall -a codex`. Or copy the skill folder (the gavdalf/total-recall repository) into .agents/skills/total-recall in your project. Codex loads it when a task matches its description.

Can I use Total Recall in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add gavdalf/total-recall --skill total-recall -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/total-recall, .gemini/skills/total-recall, .github/skills/total-recall and .opencode/skills/total-recall in your project.

What does Total Recall need to run?

Going by SKILL.md and its folder, Total Recall needs the command-line tools its instructions call (bash and apt) and credentials named OPENROUTER_API_KEY and LLM_API_KEY. Our summary lists: A credential in OPENROUTER_API_KEY; A credential in LLM_API_KEY.

Does Total Recall access the network?

SKILL.md names 3 domains. In commands or code: openrouter.ai and api.groq.com; the agent is likely to contact these when it follows the instructions. As links in the text: gavlahh.substack.com. This is read from the text; nothing was executed.

Is Total Recall safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file; runs commands with sudo), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Total Recall use?

Total Recall is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Total Recall use?

About 3.6k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Total Recall?

Skills that share tags, products or a category with Total Recall: Configuring Horizon (coollabsio/coolify, 63k stars), Model Usage (openclaw/openclaw, 392k stars), Engine Whats New (flutter/flutter, 179k stars) and Openclaw Live Updater (openclaw/openclaw, 392k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Total Recall?

gavdalf (a GitHub user) maintains it in gavdalf/total-recall, which has 274 GitHub stars. The repository was last updated on April 1, 2026.

Source: gavdalf/total-recall on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.