OpenClaw Warden Pro:工作区安全与对策 - Openclaw Skills
作者:互联网
2026-04-05
什么是 OpenClaw Warden Pro?
OpenClaw Warden Pro 是专为智能体工作区设计的专业级安全层。虽然标准工具可能仅能检测到变化,但该技能通过提供一套强大的自动化对策来主动应对威胁。它允许开发人员严格控制其环境,确保关键文件和身份文档不会受到恶意提示词注入模式或流氓脚本的篡改。
通过在 Openclaw Skills 生态系统中使用此工具,用户可以自动保护其 SOUL.md、IDENTITY.md 和配置文件。它完全使用 Python 标准库在本地运行,是一种用于保护 Claude Code、Cursor 和其他兼容智能体的 IDE 的高性能、零依赖解决方案。
下载入口:https://github.com/openclaw/skills/tree/main/skills/atlaspa/openclaw-warden-pro
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install openclaw-warden-pro
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 openclaw-warden-pro。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
OpenClaw Warden Pro 应用场景
- 在发生未经授权的修改后,将关键身份和配置文件恢复到已知基线。
- 自动隔离不受信任或可疑的第三方技能以防止执行。
- 使用 Git 集成将文件回滚到上一个已知良好状态。
- 在会话启动期间运行自动化防护扫描,以确保工作区的完整性。
- 用户建立工作区基线,创建所有关键系统和配置文件的快照。
- 该技能通过将当前工作区状态与既定基线进行比较,定期执行完整性检查。
- 一旦检测到威胁或未经授权的更改,即可触发 protect 命令来执行自动响应。
- 对策包括从快照恢复文件、执行 git 回滚或通过重命名技能目录来隔离它们。
- 集成钩子允许这些安全检查作为心跳或启动任务运行,从而维持持久的防御态势。
OpenClaw Warden Pro 配置指南
要开始使用 Openclaw Skills 中的这一项,请初始化您的工作区基线并配置保护脚本:
# 初始化安全基线
python3 scripts/integrity.py baseline --workspace /path/to/workspace
# 运行带有自动化对策的全方位防护扫描
python3 scripts/integrity.py protect --workspace /path/to/workspace
为了实现持久安全,请将 protection 命令添加到您的 HEARTBEAT.md 中,或作为智能体配置中的 SessionStart 钩子。
OpenClaw Warden Pro 数据架构与分类体系
OpenClaw Warden Pro 根据文件对智能体行为和安全性的影响来监控文件:
| 类别 | 监控的文件 | 动作级别 |
|---|---|---|
| 关键 | SOUL.md, AGENTS.md, IDENTITY.md, USER.md, HEARTBEAT.md | 警告 / 自动恢复 |
| 记忆 | memory/*.md, MEMORY.md | 信息 / 日志 |
| 配置 | 根级 .json 文件 | 警告 / 自动恢复 |
| 技能 | skills/*/SKILL.md | 警告 / 自动隔离 |
name: openclaw-warden-pro
description: "Full workspace security suite: detect unauthorized modifications, scan for prompt injection patterns, and automatically respond with countermeasures — snapshot restore, skill quarantine, git rollback, and automated protection sweeps. The complete post-installation security layer for agent workspaces."
user-invocable: true
metadata: {"openclaw":{"emoji":"???","requires":{"bins":["python3"]},"os":["darwin","linux","win32"]}}
OpenClaw Warden Pro
Everything in openclaw-warden (free) plus automated countermeasures.
Free version detects threats. Pro version responds to them.
Detection Commands (also in free)
python3 {baseDir}/scripts/integrity.py baseline --workspace /path/to/workspace
python3 {baseDir}/scripts/integrity.py verify --workspace /path/to/workspace
python3 {baseDir}/scripts/integrity.py scan --workspace /path/to/workspace
python3 {baseDir}/scripts/integrity.py full --workspace /path/to/workspace
python3 {baseDir}/scripts/integrity.py status --workspace /path/to/workspace
python3 {baseDir}/scripts/integrity.py accept SOUL.md --workspace /path/to/workspace
Pro Countermeasures
Restore from Snapshot
Restore a tampered file to its baseline snapshot. Critical, config, and skill files are automatically snapshotted when the baseline is established.
python3 {baseDir}/scripts/integrity.py restore SOUL.md --workspace /path/to/workspace
Git Rollback
Restore a file to its last git-committed state.
python3 {baseDir}/scripts/integrity.py rollback SOUL.md --workspace /path/to/workspace
Quarantine a Skill
Disable a suspicious skill by renaming its directory. The agent will not load quarantined skills.
python3 {baseDir}/scripts/integrity.py quarantine bad-skill --workspace /path/to/workspace
Unquarantine a Skill
Restore a quarantined skill after investigation.
python3 {baseDir}/scripts/integrity.py unquarantine bad-skill --workspace /path/to/workspace
Protect (Automated Response)
Full scan + automatic countermeasures in one pass: restore tampered critical files, quarantine malicious skills, flag remaining issues. This is the recommended command for session startup.
python3 {baseDir}/scripts/integrity.py protect --workspace /path/to/workspace
Recommended Integration
Session Startup Hook (Claude Code)
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "python3 scripts/integrity.py protect",
"timeout": 30
}
]
}
]
}
}
Heartbeat (OpenClaw)
Add to HEARTBEAT.md for periodic protection:
- Run workspace integrity protection (python3 {skill:openclaw-warden-pro}/scripts/integrity.py protect)
After Installing New Skills
Run protect to auto-quarantine skills that modified workspace files.
What Gets Monitored
| Category | Files | Alert Level |
|---|---|---|
| Critical | SOUL.md, AGENTS.md, IDENTITY.md, USER.md, TOOLS.md, HEARTBEAT.md | WARNING |
| Memory | memory/*.md, MEMORY.md | INFO |
| Config | *.json in workspace root | WARNING |
| Skills | skills/*/SKILL.md | WARNING |
Countermeasure Summary
| Command | Action |
|---|---|
protect |
Full scan + auto-restore + auto-quarantine + flag |
restore |
Restore from baseline snapshot |
rollback |
Restore from git history |
quarantine |
Disable skill by renaming directory |
unquarantine |
Re-enable a quarantined skill |
No External Dependencies
Python standard library only. No pip install. No network calls. Everything runs locally.
Cross-Platform
Works with OpenClaw, Claude Code, Cursor, and any tool using the Agent Skills specification.
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
从零搭建 AI 智能体:OpenClaw 2.6.2 Windows 一键部署超详细教程
AI 英语教育 APP 的开发
Tokens是什么?AI大模型中的Token是干什么的?开通百炼可以免费领取7000万Tokens
什么是阿里云AI通用型节省计划?AI大模型节省计划Tokens如何计费?
《TikTok 商品详情页前端性能优化实战》
一个客户需求,捅穿了 Anthropic 整套 Agent 架构
Claude 开始进桌面之后,AI 系统的测试边界是不是又变了?
4. OpenClaw 2.6.2 常见问题排查|部署与使用避坑指南
本地 AI 智能体 OpenClaw 2.6.2 环境搭建教程
OpenClaw 2026最新使用手册
AI精选
