Search

PythonReactSEOPDF
OpenClaw

agent-guardian

Agent体验守护系统。解决AI助手常见体验问题:长时间无响应、任务卡死、中英文混用、状态不透明。包含看门狗监控、智能状态汇报、即时状态查询、语言一致性过滤、消息队列追踪。适用于所有渠道(QQ/微信/Telegram/飞书/Discord等)。当用户抱怨"等太久没回复"、"回复中英文混着"、"不知道在干什么"时使用此skill。

fanxinyun19910 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install fanxinyun1991/agent-guardian

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

Agent Guardian 🛡️

AI 助手体验守护系统——让用户永远不会觉得你"卡了"或"乱说话"。

问题背景

AI 助手在实际使用中常见的体验痛点:

  1. 无响应 — 工具调用卡住,用户干等没反馈
  2. 状态不透明 — 用户不知道AI在干什么
  3. 语言混乱 — 中文对话里夹杂英文短语
  4. 任务死循环 — 同一个错误反复重试

架构

┌─────────────────────────────────────────────┐
│                Agent Guardian               │
├─────────────┬──────────────┬────────────────┤
│ 🐕 看门狗    │ 📊 状态汇报   │ 🔤 语言过滤    │
│ (cron 3min) │ (cron 5min)  │ (出站 hook)    │
├─────────────┼──────────────┼────────────────┤
│ 🔍 即时查询  │ 📝 消息队列   │ ⏰ 活跃追踪    │
│ (systemd)   │ (脚本)       │ (插件 hook)    │
└─────────────┴──────────────┴────────────────┘

安装

bash {baseDir}/scripts/install.sh

交互式安装,会询问渠道类型和用户ID。

安装后还需:

  1. 添加 openclaw cron 看门狗任务(见下方)
  2. 应用渠道插件 patch(见 references/patches/)
  3. 重启 gateway

组件说明

🐕 看门狗(supervisor.sh)

每3分钟由 openclaw cron 触发,检测:

  • 任务卡住(3分钟无状态更新)
  • 死循环(同一状态重复5次)
  • 错误累积(连续3次错误)
  • 僵尸进程

设置 cron 任务示例:

{
  "name": "agent-guardian-watchdog",
  "schedule": { "kind": "cron", "expr": "*/3 * * * *", "tz": "Asia/Shanghai" },
  "sessionTarget": "isolated",
  "payload": {
    "kind": "agentTurn",
    "message": "读取 /tmp/agent-supervisor-report.txt,如果有告警内容就发给用户,没有就回复 HEARTBEAT_OK"
  }
}
📊 智能状态汇报(smart-status-report.sh)

系统 crontab 每5分钟执行,智能开关:

  • 对话时(最近10分钟有消息)→ 推送状态
  • 沉默时 → 自动静默,不打扰
🔍 即时状态查询(status-query-daemon.sh)

用户发"状态"→ 渠道插件拦截 → 写触发文件 → 守护进程秒回 不经过AI,即使AI卡死也能响应。

🔤 语言一致性过滤(lang-filter.py + detect-language.py)

出站消息自动检测并替换常见英文混用。

  • 70+ 常见英文短语映射(金融/日常/科技)
  • 技术术语白名单保护(AI/API/GDP等不替换)
  • 字符集 + langdetect 双重语言检测
📝...

Source information

Source
github
Repository
openclaw/skills
Path
skills/fanxinyun1991/agent-guardian
Version
—
Commit
e06aedeb777814e353cfdadbd7873bb9c01ccea2
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

Extracted content

SKILL.md
# Agent Guardian 🛡️

AI 助手体验守护系统——让用户永远不会觉得你"卡了"或"乱说话"。

## 问题背景

AI 助手在实际使用中常见的体验痛点:
1. **无响应** — 工具调用卡住,用户干等没反馈
2. **状态不透明** — 用户不知道AI在干什么
3. **语言混乱** — 中文对话里夹杂英文短语
4. **任务死循环** — 同一个错误反复重试

## 架构

```
┌─────────────────────────────────────────────┐
│                Agent Guardian               │
├─────────────┬──────────────┬────────────────┤
│ 🐕 看门狗    │ 📊 状态汇报   │ 🔤 语言过滤    │
│ (cron 3min) │ (cron 5min)  │ (出站 hook)    │
├─────────────┼──────────────┼────────────────┤
│ 🔍 即时查询  │ 📝 消息队列   │ ⏰ 活跃追踪    │
│ (systemd)   │ (脚本)       │ (插件 hook)    │
└─────────────┴──────────────┴────────────────┘
```

## 安装

```bash
bash {baseDir}/scripts/install.sh
```

交互式安装,会询问渠道类型和用户ID。

安装后还需:
1. 添加 openclaw cron 看门狗任务(见下方)
2. 应用渠道插件 patch(见 `references/patches/`)
3. 重启 gateway

## 组件说明

### 🐕 看门狗(supervisor.sh)

每3分钟由 openclaw cron 触发,检测:
- 任务卡住(3分钟无状态更新)
- 死循环(同一状态重复5次)
- 错误累积(连续3次错误)
- 僵尸进程

设置 cron 任务示例:
```json
{
  "name": "agent-guardian-watchdog",
  "schedule": { "kind": "cron", "expr": "*/3 * * * *", "tz": "Asia/Shanghai" },
  "sessionTarget": "isolated",
  "payload": {
    "kind": "agentTurn",
    "message": "读取 /tmp/agent-supervisor-report.txt,如果有告警内容就发给用户,没有就回复 HEARTBEAT_OK"
  }
}
```

### 📊 智能状态汇报(smart-status-report.sh)

系统 crontab 每5分钟执行,智能开关:
- 对话时(最近10分钟有消息)→ 推送状态
- 沉默时 → 自动静默,不打扰

### 🔍 即时状态查询(status-query-daemon.sh)

用户发"状态"→ 渠道插件拦截 → 写触发文件 → 守护进程秒回
**不经过AI**,即使AI卡死也能响应。

### 🔤 语言一致性过滤(lang-filter.py + detect-language.py)

出站消息自动检测并替换常见英文混用。
- 70+ 常见英文短语映射(金融/日常/科技)
- 技术术语白名单保护(AI/API/GDP等不替换)
- 字符集 + langdetect 双重语言检测

### 📝...

Related skills

OpenClaw

13-Day Sprint Method

galizki

Productivity system based on Maya calendar with 13 natural tones for project management and personal development

OpenClaw

1password

daggerkun007

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.