← Back to Skills Marketplace
hei-maom

alarm

by HeiMaoM · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ⚠ suspicious
240
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install alarm
Description
读取飞书/lark 的文本或语音消息,识别是否包含需要提醒的待办和截止时间,并根据消息语义和时间跨度自动判断一个偏宽松的提醒时间。适用于飞书机器人处理“今天 5 点前给我”“明天下午三点提醒我”“发语音说周五前记得提交”这类消息。支持先用 senseaudio asr 把语音转文字,再分析并建立提醒;启用 asr...
README (SKILL.md)

Feishu Smart Alarm

概述

这个 Skill 用于在飞书消息中自动识别“需要在某个时间前提醒”的内容,并完成四类动作:

  1. 读取文本消息并判断是否需要建立提醒
  2. 读取语音消息,先调用 SenseAudio ASR 转写,再判断是否需要建立提醒
  3. 解析截止时间,并计算由系统根据消息语义和时间跨度自动判断,更偏宽松一点的预留时间 的提醒时间
  4. 立即在原会话发送确认消息:我已经记住并在$时间点$提醒
  5. 到点后仅提醒一次,并把提醒发回原飞书会话

默认约定:

  • 支持飞书文本消息语音消息
  • 语音消息必须先落到本地文件,再把本地路径传给脚本
  • 默认提醒对象是原消息发送者
  • 默认把提醒消息发回原飞书会话
  • 每条提醒只发送一次
  • 默认时区:Asia/Shanghai

适用消息

优先识别以下类型:

  • 今天 5 点前给我
  • 明天下午三点提醒我开会
  • 周五前记得把这个提交
  • 今晚 8 点前把材料发我
  • 后天上午记得找我确认
  • 下周一 10 点别忘了评审
  • 语音里说:周五前提醒我把材料发出去
  • 语音里说:明天下午三点提醒我开会

不建立提醒的情况

以下情况默认不建提醒:

  • 纯闲聊,没有任务或截止语义
  • 没有可解析时间
  • 明显是历史回顾而非未来待办
  • 时间解析结果早于当前时间且无法合理滚动到未来
  • 语音转写成功,但转写文本不包含提醒/待办语义

时间解析规则

脚本支持以下常见时间表达:

  • 绝对时间:2026-03-20 15:002026/3/20 15:00
  • 月日时间:3月20日 15:003月20号下午3点
  • 相对日期:今天明天后天
  • 周几:周一周五下周二
  • 时段:上午中午下午晚上凌晨
  • 纯时间:5点5:30下午三点

默认补全策略:

  • 仅有日期但无具体时间:默认 18:00
  • 仅有“上午 / 下午 / 晚上”无具体小时:分别默认 10:00 / 15:00 / 20:00
  • 仅有纯时间且今日该时刻已过:顺延到明天

消息分析规则

建立提醒必须同时满足:

  1. 能解析出未来时间
  2. 消息里存在待办/提醒/截止语义中的至少一种

强触发关键词示例:

  • 提醒
  • 记得
  • 别忘
  • 截止
  • 前给我
  • 前发我
  • 前提交
  • 要做
  • 要交
  • 开会
  • 评审
  • 确认
  • 安排

如果消息虽然没有“提醒”字样,但具有明显的“任务 + 时间”结构,也可以建立提醒。

确认消息规则

一旦建立提醒,必须立刻在原会话发送确认消息:

我已经记住并在$时间点$提醒

其中 $时间点$ 填入提醒时间,不是截止时间。例如:

  • 今天 17:00 前给我 → 可能提醒在 16:2015:30,取决于任务紧急程度
  • 下周一开会别忘了 → 可能更早预留数小时甚至前一天提醒
  • 确认消息会使用系统自动判断出来的提醒时间

到点提醒规则

到达提醒时间后,发送一次提醒消息到原飞书会话。

建议提醒模板:

  • 私聊:提醒你:{summary}(截止时间 {deadline_text})
  • 群聊:提醒 {sender_name}:{summary}(截止时间 {deadline_text})

发送成功后,将提醒状态标记为已发送,不再重复提醒。

环境变量(硬性要求)

当前版本硬性要求以下环境变量由运行时注入:

FEISHU_APP_ID=...
FEISHU_APP_SECRET=...
SENSEAUDIO_API_KEY=...

可选项:

FEISHU_BASE_URL=https://open.feishu.cn
FEISHU_SMART_ALARM_DB=./data/reminders.db
FEISHU_SMART_ALARM_TZ=Asia/Shanghai
SENSEAUDIO_BASE_URL=https://api.senseaudio.cn
SENSEAUDIO_ASR_MODEL=sense-asr

强约束:

  1. 不读取 .env.env.local 或其他本地配置文件
  2. 不在交互式终端里临时询问 API Key
  3. 缺少 SENSEAUDIO_API_KEY 时,所有音频相关入口必须直接失败
  4. 缺少 FEISHU_APP_ID / FEISHU_APP_SECRET 时,所有发送确认或发送提醒的入口必须直接失败

脚本入口

1. 分析文本消息

python scripts/main.py analyze-message --text "今天 5 点前给我"

2. 先转写语音,再只做分析

python scripts/main.py analyze-audio --audio /abs/path/input.m4a --sender-name 张三

返回:

  • 语音转写结果 transcript
  • 是否需要提醒
  • 解析到的截止时间
  • 提醒时间
  • 确认消息

3. 只做 ASR 转写

python scripts/main.py transcribe-audio --audio /abs/path/input.m4a

4. 根据文本建立提醒并立即回确认

python scripts/main.py create-reminder \
  --text "今天 5 点前给我" \
  --receive-id oc_xxx \
  --receive-id-type chat_id \
  --sender-open-id ou_xxx \
  --sender-name 张三

5. 根据语音建立提醒并立即回确认

python scripts/main.py create-reminder-audio \
  --audio /abs/path/input.m4a \
  --receive-id oc_xxx \
  --receive-id-type chat_id \
  --sender-open-id ou_xxx \
  --sender-name 张三

这个命令会:

  • 先用 SenseAudio ASR 转写语音
  • 按转写结果判断是否需要提醒
  • 如有提醒需求则存入本地 SQLite
  • 立刻向原会话发送确认消息

6. 轮询并发送到期提醒

python scripts/main.py poll-due

7. 以常驻循环方式运行

python scripts/main.py run-loop --interval 30

表示每 30 秒检查一次是否有到期提醒。

与 PicoClaw 的接法

推荐在飞书消息进入后这样使用:

文本消息

  1. 对文本消息调用 create-reminder
  2. 如果返回 need_reminder=false,继续普通聊天逻辑
  3. 如果返回 need_reminder=true
    • 确认消息已发出
    • 后台由 run-loop 常驻检查并在到点时发送提醒

语音消息

  1. 先把飞书语音下载到本地临时文件
  2. 对本地文件调用 create-reminder-audio
  3. 如果返回 need_reminder=false,继续普通聊天逻辑
  4. 如果返回 need_reminder=true
    • 确认消息已发出
    • 后台由 run-loop 常驻检查并在到点时发送提醒

更详细的接法见:

  • references/integration_cn.md
  • references/time_rules_cn.md
Usage Guidance
This skill appears to implement what it claims (Feishu reminders + optional SenseAudio ASR) — but check these before installing: - Provide the required env vars at process start: FEISHU_APP_ID, FEISHU_APP_SECRET, SENSEAUDIO_API_KEY. The registry top-level metadata incorrectly states none are required; that is misleading. The code will fail if those three are not present. - Understand audio upload: any audio passed to create-reminder-audio will be uploaded to the configured SENSEAUDIO_BASE_URL (default https://api.senseaudio.cn). Do not set SENSEAUDIO_BASE_URL to an untrusted host, since audio content and ASR results will be transmitted there. - Review and run the code in an isolated environment: the code makes outbound HTTPS requests (Feishu and ASR) and writes a local SQLite DB (default ./data/reminders.db). Run with least privilege and on infrastructure where storing reminders locally is acceptable. - Confirm dependency installation manually (requests) and pin versions if deploying to production. - Because the package metadata is inconsistent about required env vars and there is runnable code included, audit the included scripts yourself (they are short and readable) before granting it access to real credentials. If you cannot or will not review code and environment values, treat the skill as higher risk because it will transmit audio and use Feishu credentials to send messages.
Capability Analysis
Type: OpenClaw Skill Name: alarm Version: 1.0.2 The skill bundle implements a Feishu/Lark smart alarm system that processes text and audio messages to schedule reminders. It uses a local SQLite database for persistence and integrates with the SenseAudio API for ASR and Feishu's official API for messaging. The code follows security best practices by strictly sourcing credentials from environment variables, avoiding local secret file reads, and using parameterized SQL queries to prevent injection. All network activities and data handling (e.g., uploading audio to api.senseaudio.cn) are explicitly documented and aligned with the skill's stated purpose.
Capability Assessment
Purpose & Capability
The skill's name/description (Feishu alarms with optional SenseAudio ASR) aligns with the included code: it parses time expressions, stores reminders in local SQLite, uploads local audio to a SenseAudio endpoint for ASR, and uses Feishu API to send confirmations/reminders. However the top-level registry summary in the provided metadata claimed “Required env vars: none / Primary credential: none” while SKILL.md and _meta.json and the code require FEISHU_APP_ID, FEISHU_APP_SECRET and SENSEAUDIO_API_KEY. This metadata mismatch is an inconsistency to be aware of (likely packaging/metadata error, not necessarily malicious).
Instruction Scope
SKILL.md and the scripts explicitly limit behavior to parsing messages, optionally uploading local audio to the configured SenseAudio ASR endpoint, persisting reminders to a local SQLite DB, and using Feishu API to send messages. There are no instructions to read unrelated system files or to exfiltrate arbitrary data beyond the audio uploaded to the ASR endpoint and the Feishu API calls needed for confirmations/reminders.
Install Mechanism
There is no install spec (instruction-only) in the registry, but the package includes code files and a requirements.txt (requests). No external arbitrary downloads, package managers, or extract-through-URL installers are used. You will need to install dependencies (requests) and run the included Python scripts. The mismatch between 'instruction-only' and having runnable code is a packaging detail to check.
Credentials
The code requires FEISHU_APP_ID, FEISHU_APP_SECRET and SENSEAUDIO_API_KEY at process start (get_required is used and will raise if missing). These env vars are appropriate for the described integrations. However the registry summary at the top incorrectly lists 'Required env vars: none' which could mislead users or automated deploy systems. Also the ASR base URL is configurable via SENSEAUDIO_BASE_URL — if an operator sets this to an attacker-controlled endpoint, uploaded audio (and ASR results) would be sent there. Ensure env vars are provided only from trusted sources and the ASR base URL is not overridden to an untrusted host.
Persistence & Privilege
The skill persists reminders to a local SQLite DB (default ./data/reminders.db) and runs a poll loop to send due reminders. It does not request system-wide privileges, does not set always:true, and does not modify other skills' configs. Local persistence and periodic polling are coherent with its purpose.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install alarm
  3. After installation, invoke the skill by name or use /alarm
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
**Skill: alarm – Version 1.0.2 Changelog** - 增加对数据持久化和凭证策略的明确说明,强调所有提醒内容持久化到本地 SQLite、本地音频转写需上传 SenseAudio、仅通过进程环境变量读取凭证。 - 在描述中补充 ASR 时音频上传、提醒/确认消息下发到 API,以及数据库、时区等配置项默认值。 - 新增 skill metadata,结构化说明必须/可选环境变量,外部依赖(API 上传、消息发送),数据持久化方式,以及凭证读取政策。 - 原有功能与接口保持一致,没有新增命令或变更主流程,仅强化文档表述和可集成性描述。
v1.0.1
feishu-smart-alarm 1.0.1 - 文档全面说明了功能、时间和消息解析规则,以及常见用法和约定。 - 支持对飞书文本和语音消息自动识别提醒事项,语音需先用 SenseAudio ASR 转写。 - 根据消息语义和时间跨度,系统自动判断一个偏宽松的提醒时间,再发送一次性提醒。 - 到点后将提醒推送至原会话,支持私聊与群聊不同模板。 - 环境变量硬性要求(如 FEISHU_APP_ID、SENSEAUDIO_API_KEY),不支持 .env 文件或临时交互补充。 - 提供多种命令行用法,包括文本或语音建提醒、纯 ASR、轮询提醒等。
Metadata
Slug alarm
Version 1.0.2
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is alarm?

读取飞书/lark 的文本或语音消息,识别是否包含需要提醒的待办和截止时间,并根据消息语义和时间跨度自动判断一个偏宽松的提醒时间。适用于飞书机器人处理“今天 5 点前给我”“明天下午三点提醒我”“发语音说周五前记得提交”这类消息。支持先用 senseaudio asr 把语音转文字,再分析并建立提醒;启用 asr... It is an AI Agent Skill for Claude Code / OpenClaw, with 240 downloads so far.

How do I install alarm?

Run "/install alarm" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is alarm free?

Yes, alarm is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does alarm support?

alarm is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created alarm?

It is built and maintained by HeiMaoM (@hei-maom); the current version is v1.0.2.

💬 Comments