TopRank Skills

Home / Claw Skills / Monitoring / openclaw-health-audit
Official OpenClaw rules 36%

openclaw-health-audit

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

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 openclaw-health-audit 技能。 若已安装,则直接安装 openclaw-health-audit 技能。

Overview

Skill Key
halfmoon82/openclaw-health-audit
Author
halfmoon82
Source Repo
openclaw/skills
Version
1.0.0
Source Path
skills/halfmoon82/openclaw-health-audit
Latest Commit SHA
537149c2dc9ebc3ce5e771d61768fb1887024b09

Extracted Content

SKILL.md excerpt

# openclaw-health-audit

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

## 首次安装

```bash
python3 {skill_dir}/scripts/audit_wizard.py
```

向导将自动:
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 {skill_dir}/scripts/health_monitor.py --report
```

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

## 修复指令解析

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

| 用户回复 | 执行命令 |
|---------|---------|
| `health fix all` | `health_monitor.py --fix all` |
| `health fix 1,3` | `health_monitor.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" — 本次忽略
```

## 监控类别说明

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

## 更新配置

```bash
# 重新运行向导更新阈值
python3 {skill_dir}/scripts/audit_wizard.py

# 手动编辑配置
# config/config.json
```

## 调试命令

```bash
# 预览报告(不修改任何文...

README excerpt

# openclaw-health-audit

**OpenClaw 系统健康审计与自动修复 Skill** | v1.0.0

> OpenClaw System Health Audit & Auto-Repair Skill

---

## 简介 / Overview

本 Skill 提供 OpenClaw 实例的持续健康监控,解决 LLM Token 消耗的四类隐性成本问题:

This skill provides continuous health monitoring for OpenClaw instances, addressing four types of hidden LLM token cost issues:

| 类别 | 问题 | 典型影响 |
|------|------|---------|
| A | System Prompt 体积漂移 | 每会话 +500-2000 tokens |
| B | Cron Job 配置违规 | 任务挂起 / 会话污染 / 模型成本 10x |
| C | 孤儿 Session 积累 | 状态文件膨胀 |
| D | Token 消耗趋势异常 | 失控任务早期预警 |
| E | LLM 缓存配置漂移(可选)| 对话 cache 命中率归零 |

---

## 安装 / Installation

```bash
# 1. 克隆或下载 skill 到 OpenClaw skills 目录
cd ~/.openclaw/workspace/skills/
# clawhub install openclaw-health-audit  (待 ClawHub 上线后)

# 2. 运行安装向导(推荐)
python3 openclaw-health-audit/scripts/audit_wizard.py
```

向导自动完成:
- 测量当前 prompt 文件大小并生成个性化阈值
- 检测已安装的子代理
- 检测 semantic-router(决定是否启用 Category E)
- 生成 `config/config.json`
- 可选注册 48h 定期检查 Cron Job

---

## 使用 / Usage

```bash
SKILL=~/.openclaw/workspace/skills/openclaw-health-audit

# 生成健康报告(供 agent 推送 Telegram)
python3 $SKILL/scripts/health_monitor.py --report

# 预览报告(不修改任何文件)
python3 $SKILL/scripts/health_monitor.py --dry-run

# 修复指定编号的问题
python3 $SKILL/scripts/health_monitor.py --fix "1,3"

# 修复全部问题
python3 $SKILL/scripts/health_monitor.py --fix all

# 列出可修复的命令
python3 $SKILL/scripts/health_monitor.py --list-fixes

# 重新运行安装向导(更新配置)
python3 $SKILL/scripts/health_monitor.py --setup
```

---

## 配置 / Configuration

配置文件:`config/config.json`(由向导生成,也可手动参考 `config/config.template.json` 调整)

关键配置项:

```json
{
  "prompt_files": {
    "SOUL.md": {"warn": 6144, "alert": 8192}
  },
  "checks": {
    "cache_config": false
  }
}
```

Category E(缓存配置监控)默认...

Related Claw Skills

0xnyk

xint

★ 49

X Intelligence CLI — search, monitor, analyze, and engage on X/Twitter. TypeScript + Bun. AI agent skill.

heyixuan2

bambu-studio-ai

★ 41

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pipeline: search → generate → analyze → colorize → preview → open BS → user slice → print → monitor. Supports all 9 Bambu Lab printers (A1 Mini, A1, P1S, P2S, X1C, X1E, H2C, H2S, H2D).

jackculpan

flightclaw

★ 32

Track flight prices from Google Flights with this OpenClaw skill. Search routes, monitor prices, and get alerts when prices drop.

openclaw-trade

openclaw-trading-assistant

★ 24

openclaw trading assistant| openclaw trading skill | nof1.ai & openclaw [moltbot] collaboration | We get the best practices from alpha arena trading seasons and bring it to clawdbot All top AI agents, realtime monitoring and news research, gather info from private insiders and many other! Using Hyperliquid API.

xquik-dev

x-twitter-scraper

★ 16

X (Twitter) automation skill for AI coding agents. Tweet search, user lookup, follower/following extraction, media download, reply/retweet/quote extraction, 40+ tools, account monitoring & trending topics. REST API, MCP server, HMAC webhooks. Works with Claude Code, Cursor, Codex, Copilot, Windsurf & 40+ agents.

mohsinkhadim59

Openclaw-Setup

★ 8

Step-by-step guides for installing and running OpenClaw, an open-source AI agent, on Mac, Linux VPS, and AWS covering setup, security, messaging channels, Google integration, skills, and monitoring.