返回顶部
o

openclaw-health-audit系统健康审计

OpenClaw 系统健康审计与自动修复 — 监控 prompt 体积、Cron 合规、Session 清理、Token 消耗

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.5.0
安全检测
已通过
390
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

openclaw-health-audit

openclaw-health-audit

OpenClaw 系统健康审计与自动修复工具。发现并修复 prompt 体积漂移、Cron Job 违规、孤儿 Session 积累、Token 消耗异常等隐性成本问题。

⚠️ 安全与权限声明

本技能执行的权限操作(均由用户发起):

操作目的范围
读取 ~/.openclaw/openclaw.json检查配置是否存在健康问题只读
读取 OpenClaw 日志
检测异常和成本激增 | 仅限本地文件 |
| 列出并检查 Cron Job | 检查隔离合规性 | 本地 OpenClaw API |
| 运行本地 Python 健康检查脚本 | 分析系统状态 | 无需网络 |
| 更新 Cron Job sessionTarget | 自动修复隔离违规 | 仅限 OpenClaw sessions |

本技能不会执行的操作:

  • - 不会删除或修改用户数据
  • 不会直接访问 API 密钥
  • 不会向外部服务器发送数据
  • 不会以提升权限(sudo/root)运行

首次安装

bash
python3 {skilldir}/scripts/auditwizard.py

向导将自动:

  1. 1. 测量当前 prompt 文件大小并生成个性化阈值
  2. 检测已安装的子代理
  3. 检测 semantic-router(决定是否启用 Category E)
  4. 生成 config/config.json
  5. 可选注册 48h 定期 Cron Job

触发词

以下关键词会触发本 skill:

  • - 健康检查、system health、health check
  • 健康报告、health report、audit
  • 运行监控、检查 cron、token 消耗

生成健康报告

bash
python3 {skilldir}/scripts/healthmonitor.py --report

将报告发送给用户(Telegram/Discord),等待用户回复修复指令。

修复指令解析

用户回复以下内容时,执行对应命令:

用户回复执行命令
health fix allhealthmonitor.py --fix all
health fix 1,3
healthmonitor.py --fix 1,3 |
| health fix 2 | health_monitor.py --fix 2 |
| health skip | 跳过,等待下次检查 |

报告格式说明

🔍 OpenClaw 健康报告 (2026-03-05 02:00)

🔴 告警: 1 | 🟡 警告: 2 | ✅ 正常类别: 2/5

问题清单:

🔴 [1] [B] Cron Job 违规: 3 个
- [abc12345...] weekly-report: sessionKey 非 null(污染主会话)
💊 修复: 修复 3 个违规 Job

🟡 [2] [A] SOUL.md 体积漂移: 9KB (9215B)
阈值: warn=6KB, alert=8KB
💊 修复: 手动审查 SOUL.md,将非核心内容移至 memory/LESSONS/lessons.md

────────────────────────────────────────
• health fix all — 执行全部 (2 项)
• health skip — 本次忽略

监控类别说明

类别检查内容可自动修复
ASystem Prompt 体积漂移❌ 手动
B
Cron Job 合规性 | ✅ 自动 | | C | 孤儿 Session(>N 天无活动)| ✅ 自动 | | D | Token 消耗趋势 | ❌ 手动 | | E | 缓存配置完整性(可选,需 semantic-router M1/M3)| ❌ 手动 |

更新配置

bash

重新运行向导更新阈值


python3 {skilldir}/scripts/auditwizard.py

手动编辑配置

config/config.json

调试命令

bash

预览报告(不修改任何文件)


python3 {skilldir}/scripts/healthmonitor.py --dry-run

列出所有可执行的修复命令

python3 {skilldir}/scripts/healthmonitor.py --list-fixes

执行全部修复

python3 {skilldir}/scripts/healthmonitor.py --fix all

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 openclaw-health-audit-1776206020 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 openclaw-health-audit-1776206020 技能

通过命令行安装

skillhub install openclaw-health-audit-1776206020

下载

⬇ 下载 openclaw-health-audit v1.5.0(免费)

文件大小: 35.04 KB | 发布时间: 2026-4-15 11:44

v1.5.0 最新 2026-4-15 11:44
openclaw-health-audit 1.5.0 introduces security and transparency improvements.

- Added a detailed security & permissions declaration to SKILL.md, clarifying all privileged operations and their scope.
- Added README_CN.md for Chinese documentation and NOTICE.md for legal/compliance information.
- Updated scripts to reflect the new permission model (audit_wizard.py, health_monitor.py).
- Minor updates to configuration and documentation for improved clarity and transparency.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部