SuperAPI AI 工具集

notification-triggers

通用与其它

查看项目

更新于 10-16 02:36

技能介绍

Notification Triggers 是一个可配置的正则告警系统,用于在工具调用和会话活动中检测特定模式。触发器定义在 .claude/context/runtime/notification-triggers.json 中,包含 id、name、description、type(error、regex、token_threshold、pattern)、enabled、condition 与 actions 字段;条件支持 pattern(JavaScript RegExp)、minTokens、minOccurrences 和 scope(session、task、global)。动作类型包括 log(写入 notifications.jsonl)、alert(在会话输出中显示)、spawn_agent(创建 Task 处理通知)和 interrupt(暂停执行等待用户输入),按 log → alert → spawn → interrupt 顺序执行,并记录到 notification-log.jsonl。

使用方式:调用 /notification-triggers [arguments],或直接运行 node .claude/skills/notification-triggers/scripts/main.cjs --help。评估流程为加载配置并校验 schema、过滤启用的触发器、按类型评估条件、执行匹配动作并记录事件。资料给出三类示例配置:超 12 万 Token 告警、Hook 错误模式检测、安全违规正则告警。

限制与注意:资料未提供安装方式、依赖要求、价格或平台兼容性等信息;具体行为受本地 .claude 目录结构与运行时工具影响,需按项目实际情况配置。