Skip to content
Agentmart
Submit a tool

agent-guardian

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

Skill by lza6

IndexedApache-2.0★ 8
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/lza6-agent-guardian

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

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

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/agent-guardian

What's inside

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

Before installing

  • Ships executable scripts

Agent Skills spec issues

  • name: "agent-guardian" does not match folder "agent-guardian-1.0.0"

Files (14)

  • SKILL.md
  • _meta.json
  • generic.md · references/patches/
  • qqbot.md · references/patches/
  • apply-qqbot-patch.sh · scripts/
  • detect-language.py · scripts/
  • install.sh · scripts/
  • lang-filter.py · scripts/
  • msg-queue.py · scripts/
  • reset-work-state.sh · scripts/
  • smart-status-report.sh · scripts/
  • status-query-daemon.sh · scripts/
  • supervisor.sh · scripts/
  • update-work-state.sh · scripts/

SKILL.md (first lines)

#特工守护 🛡️

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.应用渠道插件补丁(见 __ INLINE_0 __ )
3.重启网关

## 组件说明

# # # 🐕 看门狗( 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 双重语言检测

# # # 📝 消息队列( msg-queue.py )

追踪每条消息的处理状态(等待→处理→完成)。
- 自动超时:加工超5分钟自动标记完成
- 日报统计:今日处理数量

### AI 干活时的状态更新

在执行任务时调用:

```bash
bash {baseDir}/scripts/update-work-state.sh working "任务描述"
```

完成时:

```bash
bash {baseDir}/scripts/update-work-state.sh done
```

出错时:

```bash
bash {baseDir}/scripts/update-work-state.sh error "任务描述" "yes"
```


## 渠道适配

- QQ机器人: 详见 __ INLINE_0 __
-通用指南: 详见 __ INLINE_1 __
- 核心原理:在入站 (收消息 )和出站 (发消息 )两个 HOOK 点插入 GUARDIAN 逻辑

From lza6/Claude-code-cli-config, Apache-2.0.

More from lza6/Claude-code-cli-config

Signals

Stars
8
Forks
1
Open issues
0
Last commit (this folder)
Apr 13, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from lza6

Cite this page

agent-guardian skill. Agent Mart. https://agentmart.dev/skills/lza6-agent-guardian (last updated 2026-10-24)