anti-amnesia
БесплатноБез исполняемых скриптовНе проверенComplete anti-amnesia system for OpenClaw agents. Prevents context loss across sessions with structured state files, automatic session saving, health…
от modbender★ 21 звезда на GitHubОб этом скилле
Anti-Amnesia Agent System 🧠🛡️
Your OpenClaw agent forgets everything between sessions. This skill fixes that.
What It Does
- STATE.md — Single source of truth. Active projects, iron decisions, open issues. Read first on every wake-up.
- Session Memory Hook — Automatically saves full conversation when you
/newor/reset. Zero manual work. - Daily Journals —
memory/YYYY-MM-DD.mdfiles capture everything that happens each day. - MEMORY.md — Long-term curated memory. The distilled wisdom, not raw logs.
- Heartbeat Health Checks — Every wake-up: verify crons, check processes, validate state consistency.
- Decision Capture — Decisions made in conversation get written to files immediately. No "mental notes."
Setup
Step 1: Enable Session Memory Hook
Add to your ~/.openclaw/openclaw.json under hooks:
{
"hooks": {
"session-memory": {
"enabled": true,
"messages": 9999,
"path": "memory/"
}
}
}
Step 2: Create Core Files
Copy the templates from this skill's templates/ folder to your workspace:
templates/STATE.md → workspace/STATE.md
templates/HEARTBEAT.md → workspace/HEARTBEAT.md
Edit STATE.md with your actual projects and decisions.
Step 3: Update AGENTS.md
Add to your AGENTS.md session start protocol:
## Every Session — Mandatory
1. Read `STATE.md` — current world state
2. Read `memory/YYYY-MM-DD.md` (today) — if missing, create it
3. Read `MEMORY.md` — long-term memory
Step 4: Create memory directory
mkdir -p workspace/memory
The Anti-Amnesia Protocol
On Every Session Start:
STATE.md → What's happening now
memory/today.md → What happened today
MEMORY.md → What happened before
On Every Heartbeat:
1. Read STATE.md
2. Check cron health (consecutiveErrors > 0 → alert)
3. Check critical processes (are they running?)
4. Read income-tracker.md (if night shift)
5. Write everything to memory/today.md
On Every Decision:
Decision made in chat → Write to file IMMEDIATELY
No "I'll remember that" — files only
Key Principle
If it's not in a file, it didn't happen.
Mental notes don't survive session restarts. Files do. Every decision, every status change, every important conversation — write it down in the same response.
Files Reference
| File | Purpose | When to Read |
|---|---|---|
STATE.md |
Current world state | Every session + heartbeat |
MEMORY.md |
Long-term curated memory | Every session |
memory/YYYY-MM-DD.md |
Daily journal | Every session + heartbeat |
HEARTBEAT.md |
Wake-up protocol | Every heartbeat |
AGENTS.md |
Agent behavior rules | On first load |
Why This Works
Most OpenClaw agents lose context because they rely on conversation history alone. When context resets, everything is gone.
This system creates external persistent memory — files that survive any reset. Your agent reads them on startup and knows everything within 30 seconds.
Tested in production: 24/7 autonomous trading system, 20+ cron jobs, multi-agent coordination — zero context loss over weeks of operation.
Установить anti-amnesia в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл anti-amnesia?
Complete anti-amnesia system for OpenClaw agents. Prevents context loss across sessions with structured state files, automatic session saving, health monitoring, and decision tracking. Your agent wakes up knowing everything — every time.
Как установить скилл anti-amnesia?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл anti-amnesia запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic