Synthèse automatique
Ce skill explique comment piloter la CLI `imsg` sur macOS depuis un agent OpenClaw pour envoyer des iMessage/SMS, gérer des groupes, réagir, sonder et lire l'historique local de Messages.app.
Points forts
- Flux de travail clair en quatre étapes : résoudre la conversation, choisir le type de fil, privilégier l'outil `message` puis retomber sur `imsg`
- Insiste sur l'utilisation d'identifiants stables (`--chat-id`, GUID de chat) et sur la confirmation explicite en cas d'ambiguïté avant tout envoi
- Couvre précisément les prérequis d'hôte : macOS 14+, Full Disk Access, Automation, Accessibilité, Contacts et Text Message Forwarding pour les SMS
- Décrit la différence entre mode API privée (réponses, tapbacks, sondages, gestion de groupe) et mode basique, avec des exemples de lecture en JSON
Limites
- Fonctionne uniquement sur macOS ; sous Linux la lecture se limite à une copie de `chat.db`, sans envoi ni réaction
- Nécessite plusieurs autorisations système délicates à accorder (Full Disk Access, Automation, Accessibilité) et une session Messages.app active
- La page semble tronquée : la liste des commandes s'arrête au milieu du paragraphe sur l'envoi de texte et de fichiers
À utiliser quand un agent doit lire, rechercher, surveiller ou modifier des conversations iMessage/SMS locales sur un Mac, au-delà de ce que permet l'outil `message`.
À éviter pour Telegram, Signal, WhatsApp, Discord ou Slack, ou pour répondre dans la conversation OpenClaw courante lorsque le canal configuré gère déjà la réponse.
Analyse de sécurité
PrudenceThe skill is a straightforward CLI wrapper for a legitimate iMessage automation tool and explicitly instructs the agent to confirm recipients and visible/destructive state changes before acting. Risk is not from exfiltration or obfuscated payloads, but from the level of system access it requires: Full Disk Access to the message database, Accessibility/Automation, and particularly the `imsg launch` step that terminates and re-injects code into Messages.app. Powerful but legitimate, hence caution rather than safe.
- •Requires broad macOS permissions: Full Disk Access (to read the Messages SQLite DB), Accessibility, and Automation for Messages.app
- •`imsg launch` kills and relaunches Messages.app to inject a private-API bridge into a system app — third-party code injection into a signed Apple application, which can destabilize or violate host policy
- •Destructive/visible actions exposed without capability gating: chat-delete, chat-leave, chat-remove-member, message edit/unsend/delete, read receipts, typing indicators
- •Installs a binary from a third-party Homebrew tap (steipete/tap/imsg) that is not the default formula set
- •Reads and transmits local private message history via a CLI and optional JSON-RPC daemon
- •Requires broad host permissions (Full Disk Access to the Messages chat.db, Accessibility for UI automation, Automation permission) and drives a CLI that can send messages and mutate chat state.
- •Uses a private-API injection mode (`imsg launch`) that kills and relaunches Messages.app and is described as potentially blocked by SIP/library-validation checks — effectively encouraging a reduced-security posture on the host.
- •Includes destructive/visible operations (chat-delete, chat-remove-member, unsend, edit, mark-read, tapbacks, poll votes) that are only gated by prompt-level 'confirm first' instructions rather than technical controls.
- •Installs a third-party binary from an external Homebrew tap (steipete/tap/imsg) with an unverified homepage (imsg.to).
- •No allowed-tools declared, but the skill's content is entirely operational commands executed on the host.
Exemples
Look up my existing iMessage thread with Dana, show me which contact matched, and send her 'running 10 minutes late' once I confirm.Search my local Messages history for anything mentioning 'dinner' in the last month and summarize which conversations it came from.Create a new iMessage group with Sam and Priya, then send a first message saying 'Planning doc is in the shared folder'.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
- Resolve the conversation first.
- Choose DM, existing group, or new group.
- Prefer an available
messageaction; otherwise pick the lowest-capabilityimsgcommand that preserves the requested semantics. - Confirm any send or visible state change unless the user already gave exact recipient, content, and action.
- Execute with stable identifiers: prefer
--chat-idfor normal sends/watch/history and--chatchat 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
imsgor 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. Bridgetapbackuses 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.dbonly; 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.
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 --towhen 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 fromgroup. - New group: use
chat-createonly 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 smsonly 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:
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:
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:
imsg send --to "+14155551212" --text "On my way" --service auto
Known DM thread:
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:
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:
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:
imsg group --chat-id 42 --json
imsg history --chat-id 42 --limit 20 --json | jq -s
Send to an existing group:
imsg send --chat-id 42 --text "Works for me"
Bridge reply or poll in an existing group:
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:
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.
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:
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.
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:
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:
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 USor another region only when needed for local formats. - Use bridge actions for bridge-only semantics, but confirm visible state changes and destructive actions first.
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/imessage-sms-automation-via-imsg-mte1llov/download' --output '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md.part' && mv '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md.part' '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md' && test -s '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/imsg' && cp -R '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov' '.claude/skills/imsg'Cursor
test -f '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md' && test -s '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/imsg' && cp -R '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov' '.cursor/skills/imsg'Codex
test -f '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md' && test -s '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/imsg' && cp -R '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov' '.agents/skills/imsg'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/imessage-sms-automation-via-imsg-mte1llov'openskills read 'imessage-sms-automation-via-imsg-mte1llov'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Lecteur PDF
Productivite
Lit et extrait le texte de fichiers PDF (rapports, contrats, tableurs). Gère les fichiers locaux, les URL et les pièces jointes WhatsApp. Utilisez-le dès qu'un contenu PDF est nécessaire, même sans demande explicite.
Workflows de messagerie Discord
Productivite
Utilisez l'outil message pour envoyer, modifier et modérer des messages Discord avec des composants interactifs.
Aperçu interactif des verdicts
Productivite
Générer un aperçu HTML interactif des verdicts (garder/supprimer) pour la revue par le mainteneur, puis traiter le JSON de retour.