← Back to Skills Marketplace
hoyin258

MAC OS screenshot to telegram

by hoyin258 · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
851
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install macos-screenshot-telegram
Description
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....
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install macos-screenshot-telegram
  3. After installation, invoke the skill by name or use /macos-screenshot-telegram
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug macos-screenshot-telegram
Version 1.0.0
License
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is 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.... It is an AI Agent Skill for Claude Code / OpenClaw, with 851 downloads so far.

How do I install MAC OS screenshot to telegram?

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

Is MAC OS screenshot to telegram free?

Yes, MAC OS screenshot to telegram is completely free (open-source). You can download, install and use it at no cost.

Which platforms does MAC OS screenshot to telegram support?

MAC OS screenshot to telegram is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created MAC OS screenshot to telegram?

It is built and maintained by hoyin258 (@hoyin258); the current version is v1.0.0.

💬 Comments