Memory Guard for Openclaw

Secure your agent's identity and memory files against injection attacks and unauthorized personality drift.

cassh100k
v1.0.0
Feb 28, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install memory-guard

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install memory-guard using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Memory Guard?

Memory Guard is a robust security framework among the available Openclaw Skills that safeguards an agent's workspace files from unauthorized modifications. By treating memory files like sensitive identity data, it ensures that your agents operate within a trusted environment, preventing common issues like personality drift, cross-agent contamination, and malicious injection attacks. This skill provides the verification layer necessary to turn blind trust into verified trust for all your workspace files.

Built to protect critical files such as SOUL.md, MEMORY.md, and IDENTITY.md, Memory Guard monitors the integrity of an agent's internal state. By integrating this into your Openclaw Skills workflow, you ensure that every change to an agent's memory is tracked, audited, and verified against a secure hash registry, maintaining the long-term stability and security of your AI agents.

Memory Guard Use Cases

  • Detecting unauthorized injections or malicious additions to MEMORY.md, HEARTBEAT.md, or SOUL.md.
  • Preventing personality drift by monitoring unauthorized changes to identity files.
  • Auditing workspace modifications to identify which specific process or agent modified a file.
  • Eliminating the compression tax by ensuring every memory entry has clear provenance.

How Memory Guard Works

  1. Initialize a Hash Registry using SHA-256 hashes to track the baseline state of critical files like SOUL.md and IDENTITY.md.
  2. Perform Change Detection by comparing current file hashes against the registry to alert on mismatches.
  3. Utilize Git Integration to leverage git logs for identifying who changed a file and at what exact timestamp.
  4. Apply Provenance Stamps to every memory write, including metadata for the agent, timestamp, confidence level, and rationale.
  5. Maintain a Three-Log Pattern that automatically updates actions.log, rejections.log, and handoffs.log for a complete audit trail.

Memory Guard Setup

To install this component of your Openclaw Skills, run the following command in your terminal:

clawhub install memory-guard

Alternatively, you can manually copy the memory-guard directory into your workspace's skills folder to begin protecting your agent memory.

Memory Guard Data Schema & Taxonomy

Memory Guard organizes its security metadata and tracking files within a specific structure to ensure your Openclaw Skills remain secure:

File/Directory Purpose
.memory-guard/hashes.json The central registry for SHA-256 file hashes.
actions.log Records every authorized modification made to the memory files.
rejections.log Tracks all blocked or unauthorized access and modification attempts.
handoffs.log Documents the transfer of data or context between different agents.

Memory Guard Advanced Features

  • Continuous monitoring mode through memory-guard watch for real-time heartbeat and cron job integration.
  • Full forensic audit reports via memory-guard audit that detail the history of workspace modifications.
  • Automatic provenance headers for every memory entry to ensure a verifiable chain of custody.
  • Deep integration with HEARTBEAT.md and AGENTS.md to stop agent execution if tampering is detected.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*