微算力 · API 导航与自营网关
API 接入 EN
未登录登录
📬

智能慢通道消息通知系统

snail-mail · vv1.0.2
专业技能 安全 A 级 作者 dvdegenz 公开目录收录
下载 1.9k 安装 895 收藏 4.1k 浏览 9k
原始页面

简介

来自 OpenClaw 的零依赖本地消息管理技能,让 Agent 以优雅方式记录重要非紧急事件,避免打扰操作员的同时确保关键信息不遗漏。

原始描述

A slow-channel inbox for leaving your operator important messages. Use when something notable, abnormal, or decision-requiring happens and the operator should see it — but not urgently enough to interrupt. Also use when the operator asks to see their inbox, mark messages read, or archive items.

中文使用说明 来自收录源

核心用法

Snail Mail 是一个"慢通道"收件箱系统,用于 AI 助手与操作者之间的非紧急信息传递。当发生值得关注但无需立即打断用户的事件时,助手可将消息写入收件箱,待用户方便时统一查看。

典型使用场景:

  • 需要人类决策的事项(支付、审批、政策确认)
  • 异常情况(错误、故障、安全事件、意外模式)
  • 有趣的机会(重要互动、媒体提及、里程碑)
  • 备忘信息(未来可能重要的上下文,无需立即行动)

优先级体系:

  • [URGENT] — 数小时内需关注
  • [IMPORTANT] — 当日应查看
  • 无标记 — 常规优先级,待用户自行查看

CLI 命令:支持添加消息、列表查看(未读/全部/归档)、标记已读、归档、多格式渲染(HTML/Markdown/纯文本)等完整生命周期管理。

显著优点

  1. 零依赖安全架构:仅使用 Node.js 内置模块(fs, path, crypto),彻底消除供应链攻击风险
  2. 原子写入保障:采用 write-then-rename 模式防止数据损坏
  3. 灵活呈现:自动检测渠道并输出最优格式(Telegram/webchat → HTML;Discord/Slack → Markdown;SMS → 纯文本)
  4. 智能静默:常规事件不打扰,紧急事项才上浮
  5. 心跳集成:可在定期心跳中自动检查并上报紧急未读事项

潜在局限

  1. 单写者设计:假设仅有 AI 助手写入,不支持多并发写入场景
  2. 本地存储限制:数据仅存于本地 JSON 文件,无云端同步或备份机制
  3. 缺乏深度输入过滤:仅做基础参数校验,未对内容做严格过滤(虽风险可控)
  4. 无内置加密:敏感数据以明文存储于本地文件

适合人群

  • 需要 AI 助手长期运行、异步汇报状态的个人开发者或团队
  • 重视隐私、偏好本地数据存储的用户
  • 工作流包含大量后台任务,需区分"立即打断"与"稍后查看"场景的专业用户
  • 使用 OpenClaw 或其他支持 skill 系统的 AI 平台的操作者

常规风险

  • 环境变量篡改风险:若 OPENCLAW_WORKSPACE 或 HOME 被恶意设置,可能导致数据写入非预期路径(低危,需本地环境访问权限)
  • 存储膨胀风险:无内置消息长度限制,极端情况下可能积累大量数据
  • 隐私泄露:本地明文存储,若设备共享或丢失可能暴露收件箱内容
  • 无审计日志:操作无追踪记录,难以排查异常行为

技能正文


name: snail-mail description: A slow-channel inbox for leaving your operator important messages. Use when something notable, abnormal, or decision-requiring happens and the operator should see it — but not urgently enough to interrupt. Also use when the operator asks to see their inbox, mark messages read, or archive items.

Operator Inbox

A "slow channel" between you and your operator. Not every event deserves a ping. The inbox captures what matters and presents it beautifully when they're ready to look.

Setup

On first use, the inbox file is created automatically at {workspace}/inbox/messages.json.

When to Write to the Inbox

Write an inbox entry when something is notable enough that your operator would want to know, but not urgent enough to interrupt them.

Write when:

  • Needs decision — something only a human can resolve (payment, approval, policy)
  • Abnormal — errors, failures, unexpected patterns, security events
  • Interesting — notable engagement, media mentions, milestones, opportunities
  • FYI — context that might matter later but needs no action now

Do NOT write when:

  • Routine success ("cron ran fine", "heartbeat OK")
  • Something you already told them in chat
  • Trivial events with no lasting significance
  • Duplicate of something already in the inbox

Priority levels:

  • urgent — needs attention within hours (prefix title with [URGENT])
  • important — should see today (prefix title with [IMPORTANT])
  • normal — whenever they check (no prefix)

Writing good entries:

  • Title: Short, scannable. Include the WHO or WHAT. ("@bigaccount (500K) mentioned us", not "Social media event")
  • Message: 1-3 sentences. What happened, why it matters, what (if anything) needs doing. Include links/handles when relevant.

CLI Usage

# Add entry
node {skill}/scripts/inbox.js add "Title" "Description of what happened"

# Add with priority
node {skill}/scripts/inbox.js add "[URGENT] Server disk 95%" "Only 2GB remaining on /dev/sda1"

# List unread
node {skill}/scripts/inbox.js list

# List all (including read)
node {skill}/scripts/inbox.js list all

# List archived
node {skill}/scripts/inbox.js list archived

# Mark one read
node {skill}/scripts/inbox.js read <id>

# Mark all read
node {skill}/scripts/inbox.js read-all

# Archive one
node {skill}/scripts/inbox.js archive <id>

# Archive all read
node {skill}/scripts/inbox.js archive-read

# Render for chat (auto-detects channel)
node {skill}/scripts/inbox.js render [unread|all|archived]

# Render as HTML (force)
node {skill}/scripts/inbox.js render --html

# Render as markdown (force)
node {skill}/scripts/inbox.js render --md

# Render as plain text (force)
node {skill}/scripts/inbox.js render --text

Presenting the Inbox

When the operator asks to see their inbox (or says "inbox", "messages", "check inbox"), run:

node {skill}/scripts/inbox.js render [unread|all|archived] [--html|--md|--text]

Choose format based on channel:

  • Telegram, webchat → --html
  • Discord, Slack → --md
  • SMS, plain → --text

Send the output as your reply. Do not add commentary unless they ask.

Heartbeat Integration

During heartbeats, check for unread urgent/important items:

node {skill}/scripts/inbox.js list unread --json

If urgent items exist, surface them proactively. Otherwise stay quiet.

Storage

Messages stored in {workspace}/inbox/messages.json. Single-writer (the agent), so no locking needed. Writes use atomic rename (write .tmp → rename) to prevent corruption.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

其他来源收录

同一技能在不同目录的原始页面:

标签

productivityoperationsautomation

同类 Skill