← 返回 Skills 市场
tankyhsu

Imsg Media

作者 tankyhsu · GitHub ↗ · v1.0.1
cross-platform ⚠ suspicious
424
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install imsg-media
功能描述
Fetch iMessage/Messages.app attachments (voice memos and images) and process them — transcribe audio via Silicon Flow ASR (SenseVoiceSmall), and analyze imag...
使用说明 (SKILL.md)

imsg-media

Full iMessage multimedia pipeline:

  • 🎙️ Voice memo → text via Silicon Flow ASR (SenseVoiceSmall, cloud, no local model)
  • 🖼️ Image → description/OCR via agent's built-in vision model

Requirements

macOS permissions

  • Full Disk Access must be granted to the process running OpenClaw
  • Settings → Privacy & Security → Full Disk Access → add your terminal/app
  • Without this, imsg cannot read ~/Library/Messages/chat.db and will return permissionDenied

API key (audio only)

  • Silicon Flow API key — sign up free at https://siliconflow.cn
  • Long-term use: add to ~/.openclaw/.env: SILICON_FLOW_KEY=sk-...
  • Quick test / override: pass --api-key sk-... directly to the script
  • Image analysis does not require this key

CLI dependency

  • imsg CLI: npm install -g imsg

Trigger conditions

Activate this skill when:

  • Incoming message text contains the attachment placeholder
  • User says "语音转文字", "转写", "识别语音", "transcribe"
  • User says "看图", "识别图片", "读图", "OCR", "截图里写的什么"
  • User references a photo/audio/file they just sent via iMessage

Decision flow

Attachment detected?
├── Audio (.m4a / .caf / .wav / .mp3)  → transcribe via Silicon Flow ASR
├── Image (.jpg / .png / .heic / .gif) → read with vision model
└── Unknown / not downloaded            → increase --limit or ask user to resend

Workflow

Step 1 — Get the sender identifier

Always read from the message envelope:

Step 2 — Fetch the attachment

# Run from the skill directory
cd ~/.openclaw/skills/imsg-voice-transcribe

python3 scripts/imsg_voice_transcribe.py fetch \
  --identifier "[email protected]" \
  --limit 50

Returns JSON with file, type (audio or image), and metadata.

If nothing found, try --limit 100.

Step 3a — Audio: transcribe

# One-liner (fetch + transcribe)
python3 scripts/imsg_voice_transcribe.py auto \
  --identifier "[email protected]" \
  --limit 50 --raw

# Or transcribe a specific file
python3 scripts/imsg_voice_transcribe.py transcribe \
  --file /path/to/audio.m4a --raw

# Quick test with explicit API key (no env setup needed)
python3 scripts/imsg_voice_transcribe.py transcribe \
  --file /path/to/audio.m4a --api-key sk-... --raw

Step 3b — Image: analyze

After fetch returns an image path (e.g. {"file": "/path/to/photo.jpg", "type": "image"}):

# Example: fetch image from a sender
python3 scripts/imsg_voice_transcribe.py fetch \
  --identifier "[email protected]" --type image --limit 50
# → {"file": "/Users/.../Messages/Attachments/photo.jpg", "type": "image", ...}

Then in the agent:

  1. If HEIC/HEIF: convert first → sips -s format png "input.heic" --out "output.png"
  2. Open with the read tool → agent vision model processes it
  3. Respond with: what it is, main subject, any text/OCR, notable details

Default image response format:

  • What it is: photo / screenshot / document
  • Main subject: 1–2 sentences
  • Text (OCR): quote key text, or "无明显文字"
  • Details: 3–5 bullets
  • Follow-up: ask if they want OCR / table extraction / comparison / etc.

Supported formats

Format Type Notes
.m4a Audio Standard iMessage voice memo
.caf Audio Older iOS voice memo (AAC in CAF)
.wav .mp3 Audio Other sources
.jpg .jpeg .png Image Standard photos
.heic .heif Image iPhone default — convert to PNG first
.gif Image Animated or static

Troubleshooting

Error Cause Fix
permissionDenied No Full Disk Access Grant FDA in System Settings
SILICON_FLOW_KEY not set Missing API key Add to ~/.openclaw/.env
No attachments found Low limit or iCloud not synced Increase --limit; ask user to resend
Request timed out Network or large file Retry; check file \x3C 25MB
HEIC not displaying Format not supported by read Convert with sips first
安全使用建议
This skill does what it says — it locates iMessage attachments (requires the imsg CLI) and uploads audio files to the Silicon Flow ASR endpoint for transcription. Before installing: (1) understand that you must grant Full Disk Access to the process running OpenClaw/your terminal — that allows reading all Messages data and attachments; (2) review Silicon Flow's privacy/security policy because audio will be sent to api.siliconflow.cn; (3) prefer using a one-time --api-key override instead of putting a long-lived key in ~/.openclaw/.env if you want less persistence; (4) verify the imsg CLI you install is from a trusted source; (5) note the small filename/slug mismatch in the README (cd path) and check the skill directory name before running. If you are uncomfortable granting FDA or sending audio to an external service, do not install or run this skill.
功能分析
Type: OpenClaw Skill Name: imsg-media Version: 1.0.1 The skill is classified as suspicious due to a significant shell injection vulnerability risk, amplified by its requirement for Full Disk Access. The `SKILL.md` instructs the OpenClaw agent to execute shell commands (e.g., `python3 scripts/imsg_voice_transcribe.py fetch --identifier "[email protected]"` and `sips -s format png "input.heic" --out "output.png"`) where arguments like `identifier` and attachment file paths (`input.heic`) are derived from untrusted external sources (iMessage sender, attachment filenames). If the OpenClaw agent does not properly sanitize or escape these inputs before executing the commands, an attacker could inject arbitrary shell commands.
能力评估
Purpose & Capability
Name/description match what the files do: the script uses the 'imsg' CLI to locate iMessage attachments and sends audio to Silicon Flow for transcription. Required binary (imsg) and env var (SILICON_FLOW_KEY) are expected for this functionality. Minor inconsistency: SKILL.md asks to cd into '~/.openclaw/skills/imsg-voice-transcribe' while the registry slug is 'imsg-media' (directory/name mismatch), but this is an operational nit, not a functional mismatch.
Instruction Scope
Runtime instructions and the script operate within the declared scope: they read Messages attachments via the imsg CLI, classify files as audio/image, upload audio to the declared Silicon Flow API, and instruct the agent to use its vision model for images. The skill explicitly requires Full Disk Access so it can read ~/Library/Messages attachments; that is necessary but also grants broad access to message contents (see guidance). The script only reads the specified env file (~/.openclaw/.env) for the API key and does not attempt to read unrelated system config.
Install Mechanism
This is instruction-only with one included script; there is no automated install or remote download. The only external install the SKILL.md recommends is 'npm install -g imsg' for the imsg CLI, which is reasonable and expected.
Credentials
The single required credential (SILICON_FLOW_KEY) is appropriate for the declared cloud transcription service, but the skill requires Full Disk Access to read Messages data — a high privilege that exposes all message attachments and metadata. Additionally audio files are uploaded to https://api.siliconflow.cn, so granting the API key and FDA has privacy/egress implications. The script only reads the stated ~/.openclaw/.env file for the key and supports a one-off --api-key override (good), but users should confirm they trust the external ASR provider before storing a long‑lived key.
Persistence & Privilege
The skill does not request always:true, does not modify other skills' configs, and has no install-time persistent service. It suggests adding the API key to ~/.openclaw/.env for convenience, which is normal but increases persistent credential exposure if used.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install imsg-media
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /imsg-media 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Fix: correct imsg attachment path resolution (original_path + expanduser); tested with real .caf voice memos
v1.0.0
Full iMessage media pipeline: fetch voice memos (ASR via Silicon Flow SenseVoiceSmall) and images (vision model analysis). Supports .m4a/.caf audio and .jpg/.png/.heic images.
元数据
Slug imsg-media
版本 1.0.1
许可证
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Imsg Media 是什么?

Fetch iMessage/Messages.app attachments (voice memos and images) and process them — transcribe audio via Silicon Flow ASR (SenseVoiceSmall), and analyze imag... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 424 次。

如何安装 Imsg Media?

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

Imsg Media 是免费的吗?

是的,Imsg Media 完全免费(开源免费),可自由下载、安装和使用。

Imsg Media 支持哪些平台?

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

谁开发了 Imsg Media?

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

💬 留言讨论