闲社服务运行正常AI智能体自动化平台
m

MRC令牌监控

技能标识:mrc-monitor

Real-time token monitoring for MRC canteen order system. Monitors Firebase Firestore for token status and notifies when orders are ready. Use when user sends commands like "mrc 73", "token 97", or "monitor 42" to monitor one or multiple canteen tokens. Handles multiple tokens simultaneously, sends independent notifications per token, and auto-exits when all tokens are ready.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
1
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

MRC令牌监控

技能名称: mrc-monitor
详细描述:

MRC食堂监控

监控MRC食堂订单令牌,并在订单准备好取餐时发送通知。

快速开始

当用户发送包含食堂令牌的命令时:

  1. 1. 从消息中提取所有令牌编号
  2. 启动后台监控脚本
  3. 立即回复确认信息

命令识别

用户可能使用各种前缀发送令牌:

  • - mrc 73 或 mrc 73 97 42
  • token 73 或 token 73 97
  • monitor 73
  • check 73(仅单次查询)

启动监控

从用户消息中提取所有数字并启动后台监控:

bash
python3 skills/mrc-monitor/scripts/monitor.py <平台> <频道ID> <令牌1> <令牌2> ...

其中:

  • - 平台:telegram 或 discord
  • 频道ID:当前频道标识符(平台前缀可选,例如 telegram_123 或 123 均可使用)
  • 令牌1、令牌2、...:需要监控的令牌编号

示例:
bash
python3 skills/mrc-monitor/scripts/monitor.py telegram telegram_6046286675 73 97 42

或


python3 skills/mrc-monitor/scripts/monitor.py telegram 6046286675 73 97 42

后台执行

将监控作为后台进程启动,以便代理立即响应:

python
import subprocess

频道ID可以带或不带平台前缀(两者均可)

cmd = [python3, skills/mrc-monitor/scripts/monitor.py, platform, channel_id] + [str(t) for t in tokens] subprocess.Popen(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)

代理响应

启动监控后,立即回复:

✅ 正在监控令牌:73, 97, 42
每15秒检查一次。
准备好后我会在这里通知您!🍕

单次查询

对于check 73命令,执行一次Firebase查询并返回状态,不启动后台监控。

监控行为

监控脚本:

  • - 每15秒轮询Firebase Firestore
  • 每次轮询检查所有监控中的令牌
  • 当令牌状态变为Ready时发送🍕 订单X已准备好!通知
  • 将已通知的令牌从监控列表中移除
  • 当所有令牌都通知完毕时自动退出
  • 优雅处理错误并重试
  • 将所有活动记录到skills/mrc-monitor/logs/monitorYYYYMMDDHHMMSS.log

错误处理

脚本自动处理:

  • - 网络超时(最多重试5次)
  • HTTP错误(包括速率限制)
  • 意外错误(连续5次失败后停止)
  • 信号终止(SIGTERM、SIGINT)

发生致命错误时,脚本会在退出前发送通知。

Firebase详情

  • - 项目:kanteen-mrc-blr-24cfa
  • 集合:orders
  • 文档字段:
- studentId(字符串):student-{令牌编号} - status(字符串):Preparing、Ready、Completed

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 mrc-monitor-1776368789 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 mrc-monitor-1776368789 技能

通过命令行安装

skillhub install mrc-monitor-1776368789

下载

⬇ 下载 mrc-monitor v1.0.0(免费)

文件大小: 4.47 KB | 发布时间: 2026-4-17 14:35

v1.0.0 最新 2026-4-17 14:35
Initial release: Real-time canteen order token monitoring with background notifications.

- Monitors multiple canteen tokens via Firestore and notifies when orders are ready.
- Immediate response: Confirms tokens are being monitored and notifies in channel upon readiness.
- Supports multiple commands and simultaneous token monitoring.
- Runs background monitor as a subprocess; auto-exits when all tokens are ready.
- "Check" commands perform a one-time status check without continuous monitoring.
- Robust error handling and detailed activity logging included.
返回顶部