CC memory-engine
Memory guardian for OpenClaw — three-layer anti-amnesia with capacity management. v6.0: MEMORY.md soft cap (5000 chars) + USER.md cap (1500 chars) prevent prompt explosion. Auto-snapshot before compaction/GC. Integrity monitoring restores from snapshot if MEMORY.md is wiped. Works alongside OpenClaw native memorySearch (vector+hybrid) when available, falls back to built-in FTS5 when not. Focuses on what native lacks: auto-write, session extraction, watcher daemon, GC, health checks, backup, capacity management. Layer 1 (system): cron every 1h + watcher detects resets <30s + integrity checks. Layer 2 (platform): memory-flush + session-memory hook. Layer 3 (agent): write/search/maintain/boot scripts. Use when: recalling past conversations, writing memory entries, checking memory health, maintaining search index. Triggers: 'remember', 'recall', 'what did we discuss', 'memory status', 'search memory', 'reindex'.
As a process C 53/100 · Has gaps — weak spots: result and completion, when it triggers, consistency
What is at stake
Medium-severity findings: the skill is probably honest, but read what alarmed the scanner.
Below is the worst case for this category. The finding here is medium: the guard saw a sign, not a proof.
The skill contains commands that delete files, rewrite disks or execute code fetched from the network. The agent may run them without asking if it believes the instructions require it.
Replace destructive commands with safe equivalents that ask for confirmation, scope them to one folder, and stop piping curl into a shell: pin a version and a checksum.
How to improve
- Your own cases (evals/evals.json, 4–6 real requests with expected answers): the full check would then run those instead of a model-drafted suite.
- A spec.yaml with trigger phrases and assertions — a behaviour contract for CI; `skilltest init` writes a template.
Guard findings · 13
✓ No critical or high findings
Medium and low: 13
-
medium Dangerous commands
cmd-persistenceREADME.md:88Persistence mechanism (cron / launchd / scheduled task / autorun registry) (documentation of a security skill)(crontab -l 2>/dev/null; echo "0 * * * * $(pwd)/scripts/memory-cron.sh") | crontab -
security skill -
medium Dangerous commands
cmd-persistencescripts/memory-cron.sh:3Persistence mechanism (cron / launchd / scheduled task / autorun registry) (code comment)# Install: (crontab -l; echo "0 * * * * /path/to/memory-cron.sh") | crontab -
comment -
medium Dangerous commands
cmd-persistenceSKILL.md:100Persistence mechanism (cron / launchd / scheduled task / autorun registry) (documentation of a security skill)(crontab -l 2>/dev/null; echo "0 * * * * $(pwd)/scripts/memory-cron.sh") | crontab -
security skill -
medium Dangerous commands
cmd-persistenceSKILL.md:116Persistence mechanism (cron / launchd / scheduled task / autorun registry) (documentation of a security skill)(crontab -l 2>/dev/null; echo "0 * * * * $(pwd)/scripts/memory-cron.sh") | crontab -
security skill -
low Dangerous commands
cmd-cron-mentionREADME.md:88Mentions editing / listing crontab (documentation of a security skill)(crontab -l 2>/dev/null; echo "0 * * * * $(pwd)/scripts/memory-cron.sh") | crontab -
security skill -
low Dangerous commands
cmd-cron-mentionscripts/memory-backup.sh:21Mentions editing / listing crontabcrontab -l > "$WORKSPACE/crontab.backup" 2>/dev/null || true
-
low Dangerous commands
cmd-cron-mentionscripts/memory-cron.sh:3Mentions editing / listing crontab (code comment)# Install: (crontab -l; echo "0 * * * * /path/to/memory-cron.sh") | crontab -
comment -
low Dangerous commands
cmd-background-processscripts/memory-cron.sh:142Starts a background / autostarted processnohup bash "$SCRIPT_DIR/memory-watcher.sh" >> "$WORKSPACE/.memory/watcher.log" 2>&1 &
-
low Dangerous commands
cmd-cron-mentionscripts/memory-migrate.js:159Mentions editing / listing crontab (quoted — discussed, not commanded)const crontab = require('child_process').execSync('crontab -l', { encoding: 'utf8' });quoted -
low Dangerous commands
cmd-cron-mentionscripts/memory-migrate.js:205Mentions editing / listing crontab (quoted — discussed, not commanded)const crontab = execSync('crontab -l', { encoding: 'utf8' });quoted -
low Dangerous commands
cmd-background-processscripts/memory-watcher.sh:6Starts a background / autostarted process (code comment)# Usage: nohup bash memory-watcher.sh &
comment -
low Dangerous commands
cmd-cron-mentionSKILL.md:100Mentions editing / listing crontab (documentation of a security skill)(crontab -l 2>/dev/null; echo "0 * * * * $(pwd)/scripts/memory-cron.sh") | crontab -
security skill -
low Dangerous commands
cmd-cron-mentionSKILL.md:116Mentions editing / listing crontab (documentation of a security skill)(crontab -l 2>/dev/null; echo "0 * * * * $(pwd)/scripts/memory-cron.sh") | crontab -
security skill
Files scanned: 18. Evidence is masked. Grey chips explain why severity was lowered.
Against the Agent Skills spec
✓ No remarks against the Agent Skills spec
Process rating: all ten parameters 53/100
- 0Result and completion. Does not say what the result is
- 20When it triggers. No condition that starts the skill
- 30Running it twice. 4 mutating operations with no state check
- 40Consistency. Frontmatter name (memory-engine) differs from the folder (memory-engine-3layer)
- 50Failures and branches. 0 branches, has a failure section
- 60Tools and files. Uses tools (bash) that frontmatter does not declare
- 70Inputs and preconditions. Inputs and preconditions are listed
- 100Steps. 42 steps
- 100Execution cost. Instruction body is 3776 tokens
- 100Progress reporting. Reports progress
Everything here is measured from the skill text rather than judged by a model, so the numbers are checkable. A parameter weighs more when it is a more common reason for the process to stall.
Quality signals
- +5Description has no quoted example phrases that should trigger the skill
- +4Description does not say when NOT to use the skill (false activations)
- +3Description length 921: 120–800 characters recommended
- +3Output format is not stated: the model decides each time
- -223 emoji in the instructions: noise for the model
- -31 of 14 scripts are never mentioned in SKILL.md
- +1No license
- +2Single-language instructions
- +4Structure: 32 headings
- +3Step-by-step instructions: 42 items
- +4Has examples (20 code blocks)
Quality base 70; lint remarks subtract, signals add up to 100. Result: 76.