Skills memory-consolidate
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/blusehuang1121/memory-consolidate" ~/.claude/skills/openclaw-skills-memory-consolidate && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/blusehuang1121/memory-consolidate" ~/.openclaw/skills/openclaw-skills-memory-consolidate && rm -rf "$T"
manifest:
skills/blusehuang1121/memory-consolidate/SKILL.mdtags
source content
memory-consolidate
Scripts live in the directory containing this SKILL.md. No copying needed.
OPENCLAW_WORKSPACE (default: ~/.openclaw/workspace) tells scripts where to read/write.
Install
Create required directories:
mkdir -p $OPENCLAW_WORKSPACE/memory/structured/{archive,candidates,semantic}
Patch OpenClaw config to inject snapshot into agent sessions:
gateway config.patch path="hooks.internal" raw='{"enabled":true,"entries":{"bootstrap-extra-files":{"enabled":true,"paths":["MEMORY_SNAPSHOT.md"]}}}'
Add daily cron (read timezone from USER.md, default UTC):
cron add job={ "name": "Memory Consolidation (daily)", "schedule": {"kind": "cron", "expr": "0 3 * * *", "tz": "<tz_from_USER.md>"}, "payload": { "kind": "agentTurn", "message": "bash $OPENCLAW_WORKSPACE/scripts/memory_consolidate_report.sh", "thinking": "off", "timeoutSeconds": 300 }, "sessionTarget": "isolated", "delivery": {"mode": "announce"} }
Run initial consolidation and verify:
bash $OPENCLAW_WORKSPACE/scripts/memory_consolidate_report.sh
Semantic Pipeline (LLM-powered)
memory_consolidate_report.sh runs the full pipeline including a semantic consolidation step powered by claude-haiku-4-5-20251001 via the tui provider. This is auto-configured from openclaw.json — no manual API key setup needed. The LLM step clusters related memories, deduplicates, and improves signal quality in MEMORY_SNAPSHOT.md.
Identity
Auto-detected from
IDENTITY.md (assistant name) and USER.md (owner name, timezone, language). No config needed if these files exist with - **Key:** Value format.
Config
Edit
config.yaml in the directory containing this SKILL.md:
— which agents to scan (default:ingest.agent_ids
, or"main"
)["main", "worker"]
— lookback window (default: 24)ingest.session_hours
— project keyword → tag mappingtag_rules
— decay speed (default: 0.07)temperature.age_lambda
Health check
python3 $OPENCLAW_WORKSPACE/scripts/memory_consolidate_observe.py
🟢 healthy / 🟡 watch / 🔴 needs tuning
Troubleshooting
| Symptom | Fix |
|---|---|
| Snapshot shows "Assistant"/"User" | Ensure IDENTITY.md/USER.md have format |
| LLM semantic step fails | Check provider config in has and |
| Semantic pipeline degraded | Run , check import errors |
| SNR too low | Increase in config.yaml |
| No cold items after 2 weeks | Increase (0.07 default should work) |
| Memory not updating | Verify env var is set and cron job is active |