← 返回 Skills 市场
hoyin258

MAC OS screenshot to telegram

作者 hoyin258 · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
851
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install macos-screenshot-telegram
功能描述
Take a screenshot on macOS and send it to Telegram. Use when the user asks to capture their screen, take a screenshot, or send a screen capture to Telegram....
使用说明 (SKILL.md)

Setup (Prerequisites)

1. Telegram Bot Token

  1. 搵 @BotFather on Telegram
  2. Send /newbot 創建新 bot
  3. 拎個 bot token(好似 1234567890:ABCdefGHIjklMNOpqrsTUVwxyz

2. 搵 Telegram Chat ID

  • 個人 ID: 搵 @userinfobot 或者 forward message 俾 @userinfobot
  • Group ID: Forward 任何 message 俾 @userinfobot

3. OpenClaw Config

響你既 OpenClaw profile config 度加入:

{
  "telegram": {
    "botToken": "YOUR_BOT_TOKEN_HERE",
    "allowFrom": ["YOUR_CHAT_ID"]
  }
}

4. Profile Naming

記住你用既 profile 名(例如 mainrescue),之後用既時候補返上去。


macOS Screenshot to Telegram

This skill captures the macOS screen and sends it directly via Telegram Bot API.

Workflow

  1. Capture screenshot using macOS built-in command:

    /usr/sbin/screencapture -x \x3Coutput-path>
    
  2. Copy to workspace (required - OpenClaw has security restriction):

    cp \x3Csource> \x3Cworkspace>/screenshot.png
    
  3. Send via Telegram Bot API (bypasses buggy message tool):

    BOT_TOKEN=$(grep botToken \x3Cconfig-path> | sed 's/.*"botToken": *"\([^"]*\)".*/\1/')
    curl -s -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendPhoto" \
      -F "chat_id=\x3Ctarget-chat-id>" \
      -F "photo=@\x3Cworkspace>/screenshot.png"
    

Required Parameters

When using this skill, ask the user for:

  • target-chat-id: The Telegram chat ID to send to (e.g., user's ID for DM)
  • profile: The OpenClaw profile name (e.g., "main", "rescue")

How to Find Paths

  1. Config file: ~/.openclaw-\x3Cprofile>/openclaw.json
  2. Workspace: ~/.openclaw/workspace-\x3Cprofile>/

For example, if your profile is "main", paths would be:

  • Config: ~/.openclaw-main/openclaw.json
  • Workspace: ~/.openclaw/workspace-main/

Notes

  • The message tool in OpenClaw has a bug (#15541) that returns success but doesn't send media
  • Always use curl with Telegram Bot API directly for reliable media delivery
  • The screenshot must be copied to workspace first due to OpenClaw's allowed directory security restriction
  • This skill is profile-agnostic - just pass the correct profile name
安全使用建议
This skill appears to do exactly what it says: capture your macOS screen and send it to a Telegram chat using a bot token stored in your OpenClaw profile config. Before installing/running: 1) Inspect the script (scripts/screenshot-telegram.sh) yourself — it is short and readable. 2) Ensure you trust the bot token in ~/.openclaw-<profile>/openclaw.json and that the file permissions restrict access (others with read access could reuse the token). 3) Confirm you want screenshots sent to the specified Telegram chat (sensitive info on screen will be transmitted). 4) Make sure /usr/sbin/screencapture and curl are present on your system (the registry metadata did not declare required binaries). 5) Prefer creating a dedicated bot with minimal permissions and an allow-list chat ID. If any of these raise concerns, do not run the script or remove the bot token from the profile until you are comfortable.
功能分析
Type: OpenClaw Skill Name: macos-screenshot-telegram Version: 1.0.0 The skill is designed for a legitimate purpose (screenshot to Telegram). However, the `scripts/screenshot-telegram.sh` file is vulnerable to shell injection and path traversal. The user-controlled `PROFILE` parameter is directly concatenated into file paths (`CONFIG_PATH`, `WORKSPACE`) without sanitization, and these paths are then used in shell commands (`grep`, `sed`, `screencapture`, `curl`). This allows an attacker to potentially execute arbitrary commands or access/write files outside the intended directories by crafting a malicious `PROFILE` value.
能力评估
Purpose & Capability
The name/description (send macOS screenshots to Telegram) matches the implementation: the script captures the screen, reads a Telegram bot token from the OpenClaw profile config, and posts the image to the Telegram Bot API. Asking for a profile and chat ID is consistent with using per-profile config files.
Instruction Scope
The SKILL.md and included script stay within the stated scope (capture screen, copy to workspace, read botToken from ~/.openclaw-<profile>/openclaw.json, then POST to api.telegram.org). Minor inconsistencies: the registry metadata lists no required binaries even though the instructions/scripts rely on /usr/sbin/screencapture and curl; SKILL.md mentions an explicit cp step while the script writes the screenshot directly into the workspace path. These are implementation nits, not malicious scope creep.
Install Mechanism
Instruction-only skill with an included shell script and no install spec — minimal disk footprint and no external downloads. No high-risk install behavior present.
Credentials
The only secret the skill relies on is the Telegram bot token stored in the OpenClaw profile config; this is necessary to call the Bot API. The skill does not request unrelated credentials or environment variables. Note: the script reads the token directly from the user's config file, so possession of that file implies the ability to send messages as the bot.
Persistence & Privilege
always is false and the skill doesn't attempt to modify other skills, agent-wide settings, or persist itself beyond the provided files. It runs only when invoked.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install macos-screenshot-telegram
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /macos-screenshot-telegram 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release: take a screenshot on macOS and send it to Telegram via the Telegram Bot API. - Designed to work around the OpenClaw message tool bug (#15541) that fails to send media. - Requires Telegram bot token, target chat ID, and OpenClaw profile name as setup/prerequisites. - Handles screenshot capture, workspace file management, and direct API upload. - Supports any OpenClaw profile by specifying the profile name in use.
元数据
Slug macos-screenshot-telegram
版本 1.0.0
许可证
累计安装 1
当前安装数 1
历史版本数 1
常见问题

MAC OS screenshot to telegram 是什么?

Take a screenshot on macOS and send it to Telegram. Use when the user asks to capture their screen, take a screenshot, or send a screen capture to Telegram.... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 851 次。

如何安装 MAC OS screenshot to telegram?

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

MAC OS screenshot to telegram 是免费的吗?

是的,MAC OS screenshot to telegram 完全免费(开源免费),可自由下载、安装和使用。

MAC OS screenshot to telegram 支持哪些平台?

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

谁开发了 MAC OS screenshot to telegram?

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

💬 留言讨论