Provide file protection while users work with openclaw. All file operations are version-indexed and support delete recovery and modification rollback.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install mmxagent-guardian或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install mmxagent-guardian⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/mmxagent-guardian/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: mmxagent-guardian version: 1.0.3 description: Provide file protection while users work with openclaw. All file operations are version-indexed and support delete recovery and modification rollback. ---
This Skill uses MiniVCS to track all file operations with version history.
Runtime requirement: Python 3 is required to run scripts/minivcs/minivcs.py.
Script location: scripts/minivcs/minivcs.py in the same directory as this SKILL.md (Before executing, first determine the directory containing this file. It is referred to as $SKILL_DIR below.)
Core mechanism:
~/.openclaw/minivcs/trash/, supporting restoreUsage limitations:
.bak copy instead. This applies to binary-file backup/rollback protection, and deletion protection also stores a full local copy in ~/.openclaw/minivcs/trash/. The user must be informed before the operation because storage usage may be relatively high.record_modify following an edit automatically saves a snapshot, allowing rollback to the state before any edit.~/.openclaw/minivcs/. This Skill does not provide encryption or remote sync.---
Before performing any operation, you must first check whether Python 3 is installed in the user's environment. This Skill requires Python 3 and should not run without it.
# macOS / Linux
python3 --version
# Windows (PowerShell)
python --version
Python 3.x.x, it is installed and you can continuecommand not found or is not recognized as an internal or external command, stop and tell the user that this Skill requires Python 3If Python 3 is missing:
curl | bash~/.zshrc or ~/.bash_profile> Note: On some Windows systems the command is python, while on macOS/Linux it is python3. > In all commands below that use python, replace it with the correct command for the actual environment.
---
| File Type | Retention Days | Decision Rule | |---------|---------|---------| | Important files | 14 days | System paths (/etc/, /root/, /usr/local/etc/, /opt/), user config directories (~/.ssh/, ~/.gnupg/, ~/.config/, ~/.openclaw/, ~/.kube/, ~/.docker/, ~/.aws/, ~/.azure/, ~/.local/share/), Windows system directories (C:\Windows\, C:\ProgramData\, C:\Program Files\), config files (.yaml/.toml/.env, etc.), entry files (main.py/index.ts, etc.) | | Normal files | 7 days | All other files |
When each record is created, the expireAt (expiration timestamp) and expireAtDatetime (human-readable time) fields are set automatically.
---
Files whose path contains any of the following segments are automatically skipped by record_modify and record_delete. These are generated, vendored, or cache directories that should not be version-tracked:
node_modules, .git, __pycache__, .venv, venv, .tox, .mypy_cache, .pytest_cache, .ruff_cache, dist, build, .next, .nuxt, .turbo
When a file is skipped, the return value will contain "skipped": true and a "reason" field. The Agent should inform the user that the file was not tracked and explain why.
---
When a binary file exceeds 50 MB, the return value from record_modify (binary backup) will include:
"sizeWarning": true"sizeWarningMessage": a human-readable description of the file size and thresholdWhen sizeWarning is present, the Agent must explicitly inform the user of the file size and ask for confirmation before proceeding with any further binary backup operations on similarly large files.
---
On first use, the storage directory is created automatically. No extra action is required:
python "$SKILL_DIR/scripts/minivcs/minivcs.py" history --project-root <project_root>
All data is stored uniformly in ~/.openclaw/minivcs/:
~/.openclaw/minivcs/
logs.json # operation log (includes the expireAt field)
diffs/ # incremental patches for text file modifications
bases/ # baseline for the next comparison (named by full relative path, so no same-name conflicts)
snapshots/ # full snapshots before text file modifications (used for rollback)
trash/ # full backups of deleted files (used for restore)
backups/ # full `.bak` copies of binary files (used for rollback)
---
Before deleting or modifying a file, you must explain the following to the user and wait for confirmation:
~/.openclaw/minivcs/~/.openclaw/minivcs/trash/ so the file can be restoredsizeWarning: true, the Agent must display the file size and warning message to the user, and ask for explicit confirmation before proceedingIf the file is binary and the user does not want a local stored copy, do not treat the operation as a protected delete/rollback flow under this Skill.
If the path is auto-skipped (return contains "skipped": true), inform the user that the file was not tracked and state the reason.
Example before the operation:
I am about to operate on the following file. Please confirm:
- File: /path/to/file.py
- Operation: delete
- Reason: This file has been replaced by a newer version and is no longer used
- Impact: Need to confirm that no other module imports this file
- Local storage: A full local copy will be stored under ~/.openclaw/minivcs/trash/ so the file can be restored later
- Protection: The stored copy will be retained for 7 days (14 days for important files), and can be restored at any time during that period
Do you want to continue?
...
安装 mmxagent-guardian 后,可以对 AI 说这些话来触发它
Help me get started with mmxagent-guardian
Explains what mmxagent-guardian does, walks through the setup, and runs a quick demo based on your current project
Use mmxagent-guardian to file protection while users work with openclaw
Invokes mmxagent-guardian with the right parameters and returns the result directly in the conversation
What can I do with mmxagent-guardian in my documents & notes workflow?
Lists the top use cases for mmxagent-guardian, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/mmxagent-guardian/ 目录(个人级,所有项目可用),或 .claude/skills/mmxagent-guardian/(项目级)。重启 AI 客户端后,用 /mmxagent-guardian 主动调用,或让 AI 根据上下文自动发现并使用。
mmxagent-guardian 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
mmxagent-guardian 可免费安装使用。请查阅仓库了解许可证信息。
Provide file protection while users work with openclaw. All file operations are version-indexed and support delete recovery and modification rollback.
mmxagent-guardian 属于「Documents & Notes」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my documents & notes tasks using mmxagent-guardian
Identifies repetitive steps in your workflow and sets up mmxagent-guardian to handle them automatically