← 返回 Skills 市场
dilboy

Last Words

作者 Leon Liu · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
116
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install last-words
功能描述
Auto-deliver final messages to loved ones after 30 days of inactivity. Use when user wants to record a final message, configure email delivery, manage voice...
使用说明 (SKILL.md)

Last Words - 最后留言

Manage final messages to be delivered to loved ones when the user is unreachable for an extended period.

Overview

This skill helps users record a final message (voice or text) to be delivered to their parents or loved ones if they haven't been active for 30 days. The system:

  1. Records and stores the final message securely (text + optional voice/audio)
  2. Monitors user activity via chat history
  3. Sends warning notifications at 10 and 20 days of inactivity
  4. Automatically delivers the message after 30 days of no activity (email includes voice as attachment if available)
  5. Supports delivery via email (WeChat and phone are planned)

Workflow

1. Record a Final Message

When user says something like "我想给我爸妈留下最后一句话":

  1. Respond: "可以,请说吧,顺便提醒一下这句话默认设置半个月没和我聊天记录的话就会自动触发"
  2. Accept voice or text input as the message content
  3. Save the message using: scripts/save_message.py --message "content" [--audio-path path]
  4. Confirm: "已保存,请确认发送形式:邮件 或 微信"

2. Configure Delivery Settings

Ask user to choose delivery method:

  • 邮件: Collect email address
  • 微信: Collect WeChat ID (placeholder - not yet implemented)
  • 电话: Collect phone number (placeholder - not yet implemented)

Save settings using: scripts/configure_delivery.py --method email --contact "[email protected]"

3. Interactive Email Configuration (Chat)

Users can configure email settings through natural chat conversation:

Trigger phrases:

  • "配置最后留言邮箱"
  • "设置最后留言邮箱"
  • "最后留言 配置邮箱"
  • "最后留言 设置邮箱"
  • "修改最后留言邮箱"

Interactive flow:

  1. Ask for sender email:

    • Respond: "请提供你的发件邮箱(用于发送留言的邮箱,目前支持QQ邮箱):"
    • Wait for user input: e.g., "[email protected]"
  2. Ask for authorization code:

    • Respond: "请提供邮箱授权码(不是登录密码)。QQ邮箱授权码获取方式:登录QQ邮箱→设置→账户→开启POP3/SMTP服务→获取授权码:"
    • Wait for user input: e.g., "xxxxxxxxxxxxxxxx"
  3. Ask for recipient email:

    • Respond: "请提供收件人邮箱(父母/亲人的邮箱):"
    • Wait for user input: e.g., "[email protected]"
  4. Confirm and save:

    • Show summary: "配置确认:
      发件人:{smtp_user}
      收件人:{contact}
      是否确认保存?(确认/取消)"
    • If user confirms:
      • Run: python3 scripts/configure_delivery.py --method email --contact "{contact}" --smtp-host smtp.qq.com --smtp-port 465 --smtp-user "{smtp_user}" --smtp-pass "{smtp_pass}"
      • Respond: "✓ 邮箱配置已保存。正在测试邮件发送..."
      • Run test: python3 scripts/debug_mode.py on then python3 scripts/debug_mode.py send
      • Respond with result
    • If user cancels: "已取消配置。"

Security notes for interactive config:

  • Passwords are masked in chat display (e.g., "授权码已收到:************")
  • Credentials are stored locally only
  • User can reconfigure anytime by saying "修改最后留言邮箱"

4. Voice/Audio Support

Users can attach a voice recording to their message:

Option A: Save existing audio file

python3 scripts/audio_manager.py save /path/to/recording.wav

Option B: Record from microphone (if available)

python3 scripts/audio_manager.py record

Play back saved audio:

python3 scripts/audio_manager.py play

List all saved audio files:

python3 scripts/audio_manager.py list

The audio file will be attached to the email when the final message is delivered.

5. Debug Mode Management (Chat)

Users can manage debug mode through normal chat conversation by explicitly mentioning "最后留言":

Enable debug mode: When user says: "最后留言 开启调试模式", "最后留言 打开调试", or "最后留言 启用调试"

  1. Run: python3 scripts/debug_mode.py on
  2. Respond: "最后留言调试模式已开启。现在可以立即发送测试消息,无需等待30天。"

Disable debug mode: When user says: "最后留言 关闭调试模式" or "最后留言 禁用调试"

  1. Run: python3 scripts/debug_mode.py off
  2. Respond: "最后留言调试模式已关闭。系统恢复正常运行(30天无活动后发送)。"

Check debug mode status: When user says: "最后留言 调试模式状态" or "最后留言 调试状态"

  1. Run: python3 scripts/debug_mode.py status
  2. Show current status and configuration summary

Send immediate test (when debug mode is on): When user says: "最后留言 立即发送测试" or "最后留言 测试发送"

  1. Run: python3 scripts/debug_mode.py send
  2. Report result: delivery success/failure details

6. Daily Check Process

Run scripts/check_activity.py daily via cron to:

  • Check last chat timestamp
  • Send warning at 10 days of inactivity
  • Send warning at 20 days of inactivity
  • Deliver final message at 30 days of inactivity (with audio attachment if available)

Commands Reference

Save Message (text only)

python3 scripts/save_message.py --message "爸爸妈妈我爱你们"

Save Message with Audio

# First save the audio file
python3 scripts/audio_manager.py save /path/to/voice-recording.wav

# Or record directly (requires microphone)
python3 scripts/audio_manager.py record

Configure Delivery

python3 scripts/configure_delivery.py --method email --contact "[email protected]"
# Methods: email, wechat, phone

Audio Management

python3 scripts/audio_manager.py save /path/to/audio.wav   # Save existing audio
python3 scripts/audio_manager.py record                    # Record from mic
python3 scripts/audio_manager.py play                      # Play saved audio
python3 scripts/audio_manager.py list                      # List all audio files

Check Activity (run daily)

python3 scripts/check_activity.py

Get Status

python3 scripts/get_status.py

Reset/Clear Data

python3 scripts/reset.py

Debug Mode (Testing)

Enable debug mode to bypass the 30-day wait and test immediate delivery:

Enable/Disable debug mode:

python3 scripts/debug_mode.py on       # Enable debug mode
python3 scripts/debug_mode.py off      # Disable debug mode
python3 scripts/debug_mode.py status   # Check debug mode status

Immediate send in debug mode:

python3 scripts/debug_mode.py send     # Send message immediately (debug)

Or use the check script with debug flag:

python3 scripts/check_activity.py --debug-send  # Force immediate send

When debug mode is enabled:

  • Messages can be sent immediately without waiting 30 days
  • Use for testing email delivery, audio attachments, etc.
  • The system will still log the delivery as a debug/test delivery
  • Disable debug mode for normal operation

Data Storage

All data is stored in SQLite database at ~/.openclaw/last-words/data.db:

  • message: Stores the final message content and audio path
  • config: Stores delivery method and contact information
  • activity_log: Tracks daily check results and deliveries

Security & Privacy

  • Messages are stored locally only
  • No cloud storage or external API calls for message content
  • Email delivery uses user's configured SMTP settings
  • All scripts run within OpenClaw sandbox

Setup Daily Check

Add to OpenClaw cron:

openclaw cron add --name "last-words-check" --schedule "0 9 * * *" --command "python3 ~/.openclaw/workspace/last-words/scripts/check_activity.py"
安全使用建议
Before installing or entering credentials: 1) Treat the SMTP auth code as highly sensitive. The skill will ask for it and will store it in the local SQLite DB in plaintext by default. Although a secure_storage module exists, it is not used by the configure flow — so your credential will be stored unencrypted unless you modify the code. 2) Prefer creating a dedicated/send-only email account (or application-specific password) for this feature rather than using your primary email account. That limits blast radius if the DB is exposed. 3) Avoid pasting secrets into chat if you can. Use the --from-env path with a .env file or set environment variables and then run python3 configure_delivery.py --from-env so the credential is read from the environment file instead of being typed into the chat flow. Still be aware .env files on disk are another local secret store to protect. 4) If you need encryption: either (a) set LAST_WORDS_MASTER_PASSWORD and modify configure_delivery.py to call secure_storage.secure_store before saving smtp_pass, or (b) patch configure_delivery.py to encrypt before database.save_config — otherwise stored secrets remain plaintext. 5) Review/test the code in an isolated environment first. Note debug_mode allows immediate sends — keep debug disabled until you have validated recipients and credentials. Also confirm where warning emails go: the current implementation may send inactivity warnings to the configured 'contact' (recipient) rather than to the user, which could leak status information. 6) If you are uncomfortable with local storage of credentials or with the skill having the ability to send email autonomously, do not install it or audit and patch the credential handling first.
功能分析
Type: OpenClaw Skill Name: last-words Version: 1.0.0 The 'last-words' skill is a functional 'Dead Man's Switch' designed to deliver a final message (text and audio) to a designated recipient after 30 days of user inactivity. It monitors activity by reading local OpenClaw session logs and uses user-provided SMTP credentials to send automated warnings and the final message. The skill demonstrates security consciousness by including a dedicated encryption module (scripts/secure_storage.py) using PBKDF2 and Fernet to protect sensitive SMTP passwords, and its behavior is entirely consistent with its stated purpose without any evidence of malicious exfiltration or unauthorized access.
能力评估
Purpose & Capability
The skill's requested capabilities (record messages, monitor chat activity, send email attachments) align with the stated purpose. It legitimately needs an SMTP account to deliver email and needs access to local OpenClaw session files to detect activity. However, the repository includes a secure_storage module for encrypting secrets but the interactive configuration flow and configure_delivery.py store SMTP credentials directly in the local SQLite database (no call to secure_storage), so the claimed 'secure storage' is not actually wired into the save path.
Instruction Scope
SKILL.md instructs the agent to collect SMTP authorization codes via chat and to run local scripts that save those credentials. The code then writes the SMTP password into the local SQLite DB in plaintext (configure_delivery.py -> database.save_config). The instructions claim passwords are masked in chat and stored locally only, but masking in chat does not prevent the credential from being captured in chat logs or the DB. Also, check_activity.py's warning email implementation appears to set the warning recipient to config['contact'] (the configured recipient), which means warnings intended for the user may be sent to the recipient — a surprising/incorrect behavior that could leak information to third parties.
Install Mechanism
There is no remote install/download step; the skill contains local scripts and a deploy.sh for manual remote deployment. No external, arbitrary downloads or URL-extraction installs are used. The lack of an install spec in registry metadata is fine for a script-based skill, though the package includes multiple executable scripts that will be written to disk when installed.
Credentials
Registry metadata declares no required env vars, but the skill requires SMTP credentials (smtp_user/smtp_pass/contact) to function. It also supports loading from a .env file and mentions LAST_WORDS_MASTER_PASSWORD / secure_storage for encryption, yet the configure path does not use secure_storage to encrypt the password. So the skill requests highly sensitive secrets (email auth code) for a plausible reason, but the handling is inconsistent and exposes those secrets locally (and potentially in chat logs).
Persistence & Privilege
The skill does not request special global privileges and isn't marked always:true. It stores data under ~/.openclaw/last-words and creates a local SQLite DB and audio files. One additional behavioral note: the debug mode enables immediate sending of messages (bypassing the 30-day wait), which increases the risk of accidental or unexpected delivery if enabled — consider auditing or disabling debug mode before configuring sensitive credentials. Autonomous invocation is allowed by default (normal), so the skill could run its daily check if installed and scheduled.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install last-words
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /last-words 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of "last-words" skill. - Enables users to record and securely store a final message (text and/or voice) for loved ones, to be delivered after 30 days of inactivity. - Provides interactive chat-based configuration for email delivery, including setup for sender/recipient and SMTP authorization. - Supports voice message recording, playback, and management; voice files are sent as attachments. - Delivers warning notifications at 10 and 20 days of inactivity; auto-sends the final message at 30 days, with daily automated checks. - Includes a debug mode for immediate message testing, full status checks, and reset/clear functions. - All data is locally stored for user privacy and security.
元数据
Slug last-words
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Last Words 是什么?

Auto-deliver final messages to loved ones after 30 days of inactivity. Use when user wants to record a final message, configure email delivery, manage voice... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 116 次。

如何安装 Last Words?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install last-words」即可一键安装,无需额外配置。

Last Words 是免费的吗?

是的,Last Words 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Last Words 支持哪些平台?

Last Words 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Last Words?

由 Leon Liu(@dilboy)开发并维护,当前版本 v1.0.0。

💬 留言讨论