soul-guardian

Detect workspace file drift against approved baselines with per-file policies.

1.1k|114|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/prompt-security/clawsec --skill soul-guardian
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: soul-guardian
Source: https://github.com/prompt-security/clawsec/tree/main/skills/soul-guardian
Command: npx skills add https://github.com/prompt-security/clawsec --skill soul-guardian

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Drift and unauthorized edits to critical workspace files can destabilize agent behavior. Soul Guardian detects drift against approved baselines, auto-restores restore-mode files, and records an auditable trail.

Core Features & Use Cases

  • Per-file policy restoration, auto-restore for restore-mode targets, and alert-only targets.
  • Audit logging with hash chaining, patch generation, and quarantine of drifted files.
  • Flexible policy resolution and external state directory storage for resilience.

Quick Start

Initialize baselines for all targets in the workspace, then run periodic drift checks to auto-restore restore-mode files and emit an auditable alert for drift.

Frequently Asked Questions about soul-guardian

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect drift in workspace files like SOUL.md and AGENTS.md?

Auto-restore applies to restore-mode targets, automatically reverting drifted files to their approved baselines. Alert-only targets monitor drift and emit auditable alerts without modifying the workspace files.

How do I maintain an audit log for workspace file changes?

An audit log with hash chaining records all drift events and patch generations in a tamper-evident format. Soul Guardian stores this trail in a dedicated state directory, ensuring traceable history for all baseline restorations and alerts.

Can I quarantine drifted files instead of auto-restoring them?

Soul Guardian supports flexible policy resolution across targeted files, allowing mixed configurations where some files auto-restore while others remain alert-only. Baselines and approved snapshots are stored externally in a dedicated state directory for resilience.

What is the best way to prevent unauthorized edits to agent workspace files?

Soul Guardian uses per-file policies and hash-chained audit logs to ensure traceable history. However, it relies on periodic drift checks rather than real-time blocking, meaning rapid unauthorized edits may temporarily persist before detection and restore.