{"skill":{"slug":"let-me-know","displayName":"Let Me Know","summary":"Notify the user before starting any long-running task and keep them updated. Use when a task will take noticeable time (>2-3 minutes). Send a start message, schedule a 5‑minute heartbeat update, and send a completion message immediately when done.","description":"---\nname: let-me-know\ndescription: Notify the user before starting any long-running task and keep them updated. Use when a task will take noticeable time (>2-3 minutes). Send a start message, schedule a 5‑minute heartbeat update, and send a completion message immediately when done.\n---\n\n# Let Me Know\n\n## Purpose\nEnsure the user is informed **before** long-running tasks start, gets periodic updates on a **configurable interval** (default 5 minutes), and receives an immediate completion/failure notice. Heartbeat messages must reflect **real-time progress**, not a repeated template.\n\n## Trigger\nUse this skill whenever a task will take noticeable time (>2–3 minutes) or involves long-running installs/builds/tests.\n\n## Workflow (required)\n\n1) **Pre-flight message** (before starting):\n- Send a short message: what will run, estimated time, and explicitly state:\n  - “完成或失败都会立刻通知你；期间我每 **X 分钟** 发一次进度心跳，您也可以修改心跳时间间隔。”\n\n2) **Start a heartbeat (configurable interval, with pre-check)**\n- **Default interval = 5 minutes** (`everyMs=300000`). If the user specifies a different interval, use it.\n- Schedule repeating updates while the task runs.\n- **Before each heartbeat message**, read the latest progress (state file/logs) and send **current** progress (no repeated template):\n  - Running → include latest step, progress metrics, and next step.\n  - Failed → send failure notice **and stop the heartbeat**.\n- **优先推荐：同一条 agentTurn 内“原地心跳”**（不创建额外 cron）：\n  - 在长任务执行期间，用循环 `sleep <interval>` → 读取进度 → `message send` 发一次动态进度。\n  - 任务结束自然停止，不会遗留心跳任务。\n- **只有在必须脱离当前执行流时才用 cron 心跳**，并且必须满足：\n  - 通过 `cron add` 创建心跳 job 时，**payload.deliver=false**（避免“收到/启动”之类消息被转发给用户）。\n  - 心跳 job 内部用 `message send` 主动推送进度。\n  - 创建后把返回的 **heartbeatJobId** 写入状态文件（例如 `<task>-state.json`），供清理使用。\n  - 创建前先 `cron list`，若已存在同名心跳 job，先 remove（去重）。\n- Content template (dynamic):\n  - Running: `进度：<最新步骤/阶段>（<关键指标>）。下一步：<next>。完成/失败会立刻通知你。`\n  - Failed: `失败：<task> 发生错误（简述原因）。已停止心跳提醒。`\n\n3) **Run the task**\n- Execute the long-running command(s).\n\n4) **Completion message** (immediately after finish)\n- Send result summary (success/failure + key output).\n\n5) **Stop heartbeat（必须做到）**\n- 如果你使用了“原地心跳”（推荐）：任务结束即可，不会遗留任何 cron。\n- 如果你使用了 cron 心跳：\n  - 在任务**成功/失败的 finally** 里调用 `cron remove <heartbeatJobId>`。\n  - 若 remove 失败（gateway timeout）：至少重试 2 次（指数退避 2s/8s）。\n  - 仍失败：创建一个 2 分钟后的一次性 cleanup cron 再次 remove（避免永远刷屏）。\n\n## Heartbeat interval (user-configurable)\n- Default: **5 minutes**.\n- If the user specifies an interval (e.g., “每 2 分钟/10 分钟”), use that value.\n- If the user changes the interval mid-task, update the cron schedule and acknowledge in the next heartbeat.\n\n## Message Delivery\nPrefer outbound normal chat messages:\n- Use `message send` with the correct target format.\n- Example for Discord DM: `user:<id>`.\n\n## Safety\n- Do not start long tasks without the pre-flight message.\n- If blocked/failed, notify immediately, set state=failed, and stop the heartbeat.\n- If cron removal fails due to gateway timeout, retry removal; if still stuck, use gateway restart (requires `commands.restart: true`) and retry.\n\n## Example (Discord DM)\n\n**Start message:**\n- `即将开始：安装依赖并运行测试（预计 5–10 分钟）。完成或失败都会立刻通知你；期间我每 5 分钟发一次进度心跳，你也可以修改心跳时间间隔。`\n\n**Heartbeat (every 5 min, example):**\n- `进度：已完成安装依赖（1/2），测试运行中（已用时 4 分钟）。下一步：汇总测试结果。完成/失败会立刻通知你。`\n\n**Completion:**\n- `完成：安装成功，测试通过。`\n","tags":{"latest":"0.1.1","heartbeat":"1.0.0","notify":"1.0.0","progress":"1.0.0","reminder":"1.0.0"},"stats":{"comments":0,"downloads":2343,"installsAllTime":88,"installsCurrent":3,"stars":0,"versions":3},"createdAt":1770316685124,"updatedAt":1778988510449},"latestVersion":{"version":"0.1.1","createdAt":1770353952324,"changelog":"Fix: robust heartbeat cleanup (prefer in-run heartbeat); cron heartbeat deliver=false + dedupe + retry cleanup; document python3","license":null},"metadata":null,"owner":{"handle":"fogyoy","userId":"s17c3sq62xy22dbe7a2dwx0s258841jf","displayName":"fogyoy","image":"https://avatars.githubusercontent.com/u/229448016?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1779950885411}}