К основному содержанию
скилл Claude Code CX Codex Cursor GitHub Copilot

imsg — скилл для Claude Code: что делает и как установить

Позволяет агенту читать локальную историю сообщений, отправлять iMessage и SMS, а также управлять реакциями и опросами через утилиту imsg.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add openclaw/openclaw --skill imsg -a claude-code
Открыть на GitHub

Что делает imsg

Скилл подключает агента к утилите imsg для взаимодействия с системными сообщениями на macOS 14+. Инструмент умеет искать нужные диалоги, возвращать историю переписки в формате JSON, отправлять файлы и текст в личные чаты или группы, а также публиковать опросы.

Для базовой отправки и поиска утилите нужен бинарник imsg из Homebrew и права Full Disk Access к базе сообщений. Для расширенных возможностей задействуется bridge к приватным API Messages.app. Он открывает ветки ответов, эффекты сообщений, tapback по GUID и отслеживание статуса набора. На Linux поддерживается только чтение заранее скопированного файла chat.db без отправки.

Ставить этот скилл имеет смысл разработчикам на macOS, которым нужна автоматизация персональных чатов прямо в терминале. Без выданных системных доступов автоматизация работать не будет.

Какие задачи решает

  • найти диалог и прочитать историю сообщений в Messages.app
  • отправить iMessage или SMS по номеру или идентификатору чата
  • создать опрос с вариантами ответов в групповом чате Apple Messages
  • отправить форматированный текст с эффектами и реакцией на конкретное сообщение

Примеры запросов агенту

  • Найди последние сообщения со словом 'dinner' в чатах Messages
  • Отправь в чат 42 текст 'Буду вовремя' с эффектом impact
  • Создай опрос 'Dinner?' с вариантами 'Pizza' и 'Sushi' в нашей группе

Как установить imsg

1Через Skills CLI (Vercel)

npx skills add openclaw/openclaw --skill imsg -a claude-code

2Вручную: положить файлы

~/.claude/skills/imsg/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/imsg/

Из того же набора45

Весь набор →
summarize openclaw Скилл запускает CLI для создания выжимок и расшифровок из веб-страниц, YouTube-роликов, подкастов и локальных PDF-файлов. Claude Code CX Codex Cursor +1 26 900установок weather openclaw Скилл получает текущую погоду и прогноз по городу, региону, коду аэропорта или координатам. Пригодится для проверки температуры и осадков или планирования поездки. Claude Code CX Codex Cursor +1 9 300установок gog openclaw Даёт агенту правила работы с CLI gog для Gmail, Calendar, Drive, Contacts, Sheets и Docs. Нужен, когда действия в Google Workspace надо выполнять из терминала. Claude Code CX Codex Cursor +1 8 500установок tmux openclaw Даёт агенту доступ к живым tmux-сессиям: читать вывод панели, отправлять клавиши и текст, ждать появления строки в промпте. Claude Code CX Codex Cursor +1 8 400установок openai-whisper openclaw Скилл учит агента вызывать Whisper CLI и расшифровывать аудио на вашей машине. Ключ API не нужен. Claude Code CX Codex Cursor +1 7 100установок nano-pdf openclaw Скилл редактирует страницы PDF по текстовым инструкциям через CLI nano-pdf. Пригодится, когда нужно исправить опечатку или заменить заголовок прямо в терминале. Claude Code CX Codex Cursor +1 7 100установок skill-creator openclaw Скилл для создания, починки и проверки других скиллов: разбирает задачу по веткам, пишет frontmatter и раскладывает ресурсы по папкам. Пригодится, когда скиллов стало много и надо держать их в порядке. Claude Code CX Codex Cursor +1 6 700установок coding-agent openclaw Скилл передаёт крупные задачи Codex, Claude Code или OpenCode фоновой работе. Подходит для рефакторинга, ревью PR и цикла от issue до PR. Claude Code CX Codex Cursor +1 6 500установок

Похожие

mem-search thedotmack Ищет решения и контекст из прошлых сессий кодинга. Пригодится, когда нужно вспомнить, как решали задачу ранее. Claude Code CX Codex Cursor +1 8 900установок baoyu-translate JimLiu Переводит статьи, файлы и ссылки в трёх режимах: quick, normal и refined. Режим refined добавляет вычитку и шлифовку текста перед публикацией. Claude Code CX Codex Cursor +1 25 600установок prd официальный github Собирает из идеи структурированный PRD с пользовательскими историями, техническими требованиями и рисками. Подходит для планирования новых функций, в том числе с AI. GitHub Copilot 24 035установок bmad bmad-code-org Координирует работу модулей BMad Method, подсказывает следующий шаг и управляет инициативами проекта. Пригодится при настройке или обновлении окружения. Claude Code CX Codex Cursor +1 13 100установок paperclip paperclipai Скилл для работы агентов в цикле heartbeats сервиса Paperclip: управление задачами, передача документов и запуск действий через control plane API. Claude Code CX Codex Cursor +1 3 800установок smart-explore thedotmack Структурно ищет функции и классы через tree-sitter. Пригодится, когда нужно разобраться в кодовой базе без чтения всех файлов. Claude Code CX Codex Cursor +1 7 300установок find-skills vercel-labs Ищет и устанавливает готовые скиллы для ИИ-агентов через каталог skills.sh. Пригодится, когда для рабочей задачи нужен специализированный воркфлоу. Claude Code CX Codex Cursor +1 4 000 000установок grill-me Matt Pocock Скилл проводит жёсткое интервью по плану или дизайну, чтобы найти пробелы и уточнить решения. Подойдёт перед началом разработки. Claude Code 1 424 476установок

Вопросы о imsg

Как установить imsg в Claude Code?

Выполните команду npx skills add openclaw/openclaw --skill imsg -a claude-code. Также потребуется установить бинарник через Homebrew командой brew install steipete/tap/imsg.

Что делает скилл imsg?

Он предоставляет агенту команды для чтения переписки в Messages.app, отправки сообщений, простановки реакций и создания опросов через утилиту imsg.

Работает ли отправка сообщений на Linux?

Нет. На Linux поддерживается только чтение скопированного файла chat.db, а все функции отправки и реакций требуют macOS 14+.

Исходный текст

SKILL.md · MIT
---
name: imsg
description: "Use the imsg CLI from OpenClaw agents for iMessage/SMS DMs, groups, replies, reactions, polls, watching, and private-API actions."
homepage: https://imsg.to
metadata:
  {
    "openclaw":
      {
        "emoji": "📨",
        "os": ["darwin"],
        "requires": { "bins": ["imsg"] },
        "install":
          [
            {
              "id": "brew",
              "kind": "brew",
              "formula": "steipete/tap/imsg",
              "bins": ["imsg"],
              "label": "Install imsg (brew)",
            },
          ],
      },
  }
---

# imsg

Use the generic `message` tool first for actions that its current iMessage schema exposes. Use `imsg` when the task needs local Messages.app history, target discovery, watching, or an administrative/private-API capability that is not exposed by `message`.

Do not use this skill for Telegram, Signal, WhatsApp, Discord, Slack, or for replying inside the current OpenClaw conversation when the configured channel already routes the reply.

## Agent Flow

1. Resolve the conversation first.
2. Choose DM, existing group, or new group.
3. Prefer an available `message` action; otherwise pick the lowest-capability `imsg` command that preserves the requested semantics.
4. Confirm any send or visible state change unless the user already gave exact recipient, content, and action.
5. Execute with stable identifiers: prefer `--chat-id` for normal sends/watch/history and `--chat` chat GUID for bridge actions.

Never infer a recipient from a casual name alone when several chats or handles could match. Show the matched display name, handle(s), group participants, and message text/action before sending.

## Host Requirements

- macOS 14+ with Messages.app signed in for send/react/bridge actions.
- Private API mode is strongly encouraged for OpenClaw iMessage. It unlocks replies, precise tapbacks, effects, polls, attachment replies, read/typing actions, and group management. Basic mode is a fallback for reads plus plain text/file send.
- Full Disk Access for the process context that runs `imsg` or OpenClaw; reads fail without Messages DB access.
- Automation permission for Messages.app when using public `send`.
- Accessibility permission for the process context that runs public `imsg react`; it uses System Events UI automation. Bridge `tapback` uses private API instead.
- Optional Contacts permission for contact-name resolution.
- SMS sends require Text Message Forwarding from the user's iPhone to this Mac.
- Linux reads a copied `chat.db` only; it cannot send, react, launch Messages.app, mark read, or type.

## Resolve Targets

Use `--json` reads. Output is newline-delimited JSON; use `jq -s` when `jq` is available, or consume one object per line directly.

```bash
imsg chats --limit 25 --json | jq -s
imsg search --query "dinner" --match contains --json | jq -s
imsg history --chat-id 42 --limit 20 --attachments --json | jq -s
imsg group --chat-id 42 --json
```

Target rules:

- DM to a phone/email: use `imsg send --to` when the user gave an exact handle, or after a single unambiguous chat match.
- Existing DM thread: `imsg send --chat-id <id>` is safer than re-resolving a name.
- Existing group: inspect with `imsg group --chat-id <id> --json`; send with `--chat-id`, bridge with the chat GUID from `group`.
- New group: use `chat-create` only when the user explicitly asked to create a group or no existing group matches.
- Ambiguous group names: confirm participants, not just display name.
- SMS: use `--service sms` only when requested or when iMessage fallback is not desired. SMS relay requires Text Message Forwarding.

Do not make `jq` a hard prerequisite for the skill; it is only a convenient formatter for examples.

## Capability Choice

Use `imsg` standard commands when the current `message` schema does not cover the operation or when local history is needed:

- Read/list/search/watch: `chats`, `group`, `history`, `search`, `watch`
- Basic text/file send: `send`
- Standard tapback to most recent incoming message in a chat: `react`

Use the private API bridge for the native iMessage actions OpenClaw users normally expect:

- Rich replies, text formatting, effects, subjects, multipart sends
- Native Apple Messages polls and poll votes
- Tapback by message GUID or tapback removal
- Edit, unsend, delete, notify anyways
- Read receipts, typing indicators, bridge event watch
- Group create/name/photo/member/leave/delete/mark actions
- Account, whois, nickname checks

For OpenClaw channel setup, check bridge availability early:

```bash
imsg status --json
```

If the host supports bridge actions but Messages is not injected yet, ask before running `imsg launch`. It kills and relaunches Messages.app to inject the bridge, so treat it as a visible state change:

```bash
imsg launch
imsg status --json
```

If SIP, library validation, private entitlement checks, or missing selectors still block the capability, explain that the requested private-API action is unavailable on this host and offer the closest non-bridge action, if one exists. Do not silently downgrade a threaded reply, effect, subject, poll, or GUID-targeted tapback into a plain send/react.

## DM Scenarios

Exact handle, basic send:

```bash
imsg send --to "+14155551212" --text "On my way" --service auto
```

Known DM thread:

```bash
imsg send --chat-id 42 --text "On my way"
imsg send --chat-id 42 --file /path/to/photo.jpg
```

Force channel only when the user asks:

```bash
imsg send --to "+14155551212" --text "green bubble" --service sms
imsg send --to "+14155551212" --text "iMessage only" --service imessage --no-sms-fallback
```

Threaded reply, formatting, effects, or attachment reply:

```bash
imsg send-rich --chat 'iMessage;-;+15551234567' \
  --reply-to <message-guid> --text "reply text"
imsg send-rich --chat 'iMessage;-;+15551234567' --text 'hello world' \
  --format '[{"start":0,"length":5,"styles":["bold"]}]'
imsg send-rich --chat 'iMessage;-;+15551234567' --text "boom" --effect impact
imsg send-attachment --chat 'iMessage;-;+15551234567' \
  --reply-to <message-guid> --file /path/to/file.jpg
```

Formatting ranges are UTF-16 positions. Supported styles include `bold`, `italic`, `underline`, and `strikethrough`; use `--format-file` for generated JSON.

## Group Scenarios

Inspect before acting:

```bash
imsg group --chat-id 42 --json
imsg history --chat-id 42 --limit 20 --json | jq -s
```

Send to an existing group:

```bash
imsg send --chat-id 42 --text "Works for me"
```

Bridge reply or poll in an existing group:

```bash
imsg send-rich --chat 'iMessage;+;chat0000' \
  --reply-to <message-guid> --text "replying in thread"
imsg poll send --chat 'iMessage;+;chat0000' \
  --question "Dinner?" --option "Pizza" --option "Sushi"
```

Create or mutate groups only on explicit request:

```bash
imsg chat-create --addresses '+15551111111,+15552222222' --name 'Crew' --text 'gm'
imsg chat-name --chat 'iMessage;+;chat0000' --name 'Renamed'
imsg chat-photo --chat 'iMessage;+;chat0000' --file /path/to/group.jpg
imsg chat-add-member --chat 'iMessage;+;chat0000' --address +15553333333
imsg chat-remove-member --chat 'iMessage;+;chat0000' --address +15553333333
imsg chat-leave --chat 'iMessage;+;chat0000'
imsg chat-delete --chat 'iMessage;+;chat0000'
imsg chat-mark --chat 'iMessage;+;chat0000' --read
```

Group mutations are highly visible. Confirm the exact group and participant list before changing membership, name, photo, read state, leaving, or deleting.

## Reactions and Replies

Public `react` is limited: it reacts to the most recent incoming message in the chat.

```bash
imsg react --chat-id 42 --reaction like
imsg react --chat-id 42 --reaction love
imsg react --chat-id 42 --reaction dislike
imsg react --chat-id 42 --reaction laugh
imsg react --chat-id 42 --reaction emphasis
imsg react --chat-id 42 --reaction question
```

For a specific message GUID or removal, use bridge `tapback`:

```bash
imsg tapback --chat 'iMessage;-;+15551234567' --message <message-guid> --kind love
imsg tapback --chat 'iMessage;-;+15551234567' --message <message-guid> --kind love --remove
```

Use `send-rich --reply-to <message-guid>` for threaded replies. Confirm the referenced message if the user says "that" or "the previous one".

## Polls

Native Apple Messages polls require the bridge. Creation needs at least two `--option` values. Voting requires one of `--option-id`, `--option-index`, or `--option`.

Messages renders only the options on a poll balloon, so current `imsg poll send` echoes `--question` as a best-effort plain caption after the poll. Use `--comment` to override that caption. Do not retry automatically when only the caption fails: the poll may already be delivered.

```bash
imsg poll send --chat 'iMessage;-;+15551234567' \
  --question "Dinner?" --option "Pizza" --option "Sushi" --comment "Vote by 5pm"
imsg poll send --chat 'iMessage;+;chat0000' --reply-to <message-guid> \
  --question "Approve?" --option "Yes" --option "No"
imsg poll vote --chat 'iMessage;+;chat0000' \
  --poll <poll-message-guid> --option-id <option-id>
```

Find poll IDs and options with:

```bash
imsg history --chat-id 42 --limit 20 --json | jq -s '.[] | select(.poll != null) | {guid, poll}'
```

`history` and `watch` backfill a title-less inbound native poll's `poll.question` from its clean caption row. Poll vote rows are `poll` events, not tapbacks; `watch --reactions` is not required to see them.

## Watch and Long-Running Agents

For a short one-off wait, use `watch`:

```bash
imsg watch --chat-id 42 --since-rowid 9000 --json
imsg watch --chat-id 42 --attachments --convert-attachments --json
imsg watch --chat-id 42 --reactions --json
imsg watch --chat-id 42 --bb-events --json
```

`--since-rowid` is exclusive. Without it, `watch` starts at the newest row. `watch` uses filesystem events plus a low-frequency polling fallback, so it can catch up after missed SQLite sidecar events. Poll objects appear without `--reactions`.

For a daemon or multi-chat integration, use `imsg rpc`. It speaks JSON-RPC 2.0 over stdin/stdout. Inspect `imsg status --json` for `rpc_methods` before using newer bridge or poll methods.

## Safety Rules

- Confirm recipient, chat, and content before every send unless the user's request already contains exact values.
- Confirm visible state changes: read receipts, typing indicators, edits, unsends, deletes, poll votes, tapbacks, group membership, group name/photo, leaving/deleting chats.
- Never send to unknown numbers or ambiguous contact-name matches without approval.
- Confirm attachments exist and are the intended files.
- Prefer E.164 phone numbers; use `--region US` or another region only when needed for local formats.
- Use bridge actions for bridge-only semantics, but confirm visible state changes and destructive actions first.

© openclaw · MIT · openclaw/openclaw

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой