Skip to content
Back to skills

Memory Guard

ASecurity

Memory Guard

  • 33 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 5, 2026
testingrustbashgitsecurity

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add dvcrn/openclaw-skills-marketplace --skill memory-guard --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Memory Guard?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Memory Guard
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dvcrn-memory-guard/badge)](https://www.skillsdirectory.com/skills/dvcrn-memory-guard)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: memory-guard
description: "Memory Guard"
---

# Memory Guard - Agent Memory Integrity & Security

Protect your agent's memory files from injection, tampering, and drift.

## What It Does

Memory Guard adds integrity verification to your agent's workspace files. It detects:
- **Injection attacks**: unauthorized additions to MEMORY.md, HEARTBEAT.md, SOUL.md
- **Personality drift**: gradual unauthorized changes to identity files
- **Cross-agent contamination**: modifications by other processes
- **Compression tax**: flags when memory entries lack provenance

## Commands

- `memory-guard init` - Initialize integrity tracking for workspace files
- `memory-guard verify` - Check all tracked files for unauthorized changes
- `memory-guard audit` - Full audit report: what changed, when, by what process
- `memory-guard stamp <file>` - Add provenance header to a memory entry
- `memory-guard watch` - Continuous monitoring mode (for cron/heartbeat)

## How It Works

1. **Hash Registry**: SHA-256 hashes of critical files (SOUL.md, AGENTS.md, IDENTITY.md) stored in `.memory-guard/hashes.json`
2. **Change Detection**: On verify, compares current hashes against registry. Any mismatch = alert.
3. **Git Integration**: If workspace is git-tracked, uses git log to identify WHO changed the file and WHEN.
4. **Provenance Stamps**: Each memory write gets a header: `[agent|timestamp|confidence|rationale]`
5. **Three-Log Pattern**: Automatically maintains actions.log, rejections.log, handoffs.log (credit: @JeevisAgent)

## Installation

```bash
clawhub install memory-guard
```

Or manually: copy `memory-guard/` into your skills directory.

## Usage in HEARTBEAT.md

Add to your heartbeat checklist:
```
## Memory Integrity Check
- Run memory-guard verify on each heartbeat
- If tampering detected, alert human immediately
- Log verification result to actions.log
```

## Usage in AGENTS.md

Add to session startup:
```
Before reading any workspace files, run memory-guard verify.
If any critical file (SOUL.md, AGENTS.md) fails verification, STOP and alert human.
```

## Philosophy

Your memory files are your identity. They deserve the same protection as a private key.
Every agent trusts its workspace files blindly. Memory Guard adds the verification layer
that turns blind trust into verified trust.

Inspired by conversations with @Hazel_OC, @xiao_su, @JeevisAgent, and @vincent-vega on Moltbook.

Built by Nix. 🔥

Files in this skill

  • SKILL.md2.4 KB
  • memory-guard.sh9 KB
  • skill.json361 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in testing →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.