automating-messages

automating-messages is a skill for Claude Code from SpillwaveSolutions/automating-mac-apps-plugin. It costs 78 tokens per session (1,266 once invoked), scanned A, original, MIT.

Instructions for controlling the macOS Messages app with scripts to send or inspect iMessage and SMS conversations.

In plain words
What is it for?
Sending messages, attaching files through the user interface, reading message history, and investigating the Messages database.
Why use it?
They explain how to identify the right recipient and provide fallback methods when direct automation does not work.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the automating-mac-apps plugin — 16 skills, 10 commands, 9 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/spillwavesolutions/automating-mac-apps-plugin/automating-messages
Any agent
npx skills add SpillwaveSolutions/automating-mac-apps-plugin --skill automating-messages
Clone the repo
git clone --depth 1 https://github.com/SpillwaveSolutions/automating-mac-apps-plugin

Made for: Claude Code.

Or install automating-mac-apps, the plugin that ships this one along with the rest of its 16 skills, 10 commands, 9 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for automating-messages

README.md
[![agentmods](https://agentmods.dev/badge/skills/spillwavesolutions/automating-mac-apps-plugin/automating-messages.svg)](https://agentmods.dev/skills/spillwavesolutions/automating-mac-apps-plugin/automating-messages)
Your own site
<a href="https://agentmods.dev/skills/spillwavesolutions/automating-mac-apps-plugin/automating-messages"><img src="https://agentmods.dev/badge/skills/spillwavesolutions/automating-mac-apps-plugin/automating-messages.svg" alt="Measured on agentmods" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,266 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00078 $0.01266
Opus 5 $0.00039 $0.00633
Sonnet 5 $0.00016 $0.00253
Haiku 4.5 $0.00008 $0.00127

Measured 6d ago against content hash 237eba47bfef, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

automating-messages scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/automating-mac-apps-plugin/skills/automating-messages/SKILL.md · 103 lines

How it starts

The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Automating Messages (JXA-first with UI/DB fallbacks)

Contents

Permissions and scope

  • Grants needed: Automation + Accessibility; Full Disk Access for any chat.db reads.
  • Keep automation scoped and auditable; avoid unsolicited sends and DB writes.
  • Pairs with automating-mac-apps for common setup (permissions, osascript invocation, UI scripting basics).

Default workflow (happy path)

  1. Resolve transport: pick serviceType (iMessage or SMS) before targeting a buddy.
  2. Identify recipient: filter buddies by handle (phone/email). Avoid ambiguous names.
  3. Send via app-level send: pass Buddy object to Messages.send().
  4. Verify window context: activate Messages when mixing with UI steps.
  5. Fallbacks: if send/attachments fail, use UI scripting; for history, use SQL.

Quick recipe (defensive send)

const Messages = Application('Messages');
Messages.includeStandardAdditions = true;

function safeSend(text, handle, svcType = 'iMessage') {
  const svc = Messages.services.whose({ serviceType: svcType })[0];
  if (!svc) throw new Error(`Service ${svcType} missing`);
  const buddy = svc.buddies.whose({ handle })[0];
  if (!buddy) throw new Error(`Buddy ${handle} missing on ${svcType}`);
  Messages.send(text, { to: buddy });
}
  • Wrap with try/catch and log; add small delays when activating UI.
  • For groups, target an existing chat by GUID or fall back to UI scripting; array sends are unreliable.

Attachments and UI fallback

  • Messages lacks a stable JXA attachment API; use clipboard + System Events paste/send.
  • Ensure Accessibility permission, bring app forward, paste file, press Enter.
  • See references/ui-scripting-attachments.md for the full flow and ObjC pasteboard snippet.

Read the full file on GitHub · 103 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 103 lines · 78 tokens per session scan A 237eba47bfef

Subscribe to this mod's changes

automating-messages is a skill published in the GitHub repository SpillwaveSolutions/automating-mac-apps-plugin (40 stars, last pushed 14d ago), licensed MIT. It adds 78 tokens to every session and 1,266 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

import-audio

Moves audio files to the correct album location with proper path structure. Use when the user has downloaded WAV files from Suno or other sources that need to be organized.

bitwize-music-studio/claude-ai-music-skills · 37 tokens

catch

Shape output for a human working through agents. Use on every response, out to and including casual conversation, even when the user did not ask for brevity.

saadshahd/moo.md · 34 tokens

lark-workflow-standup-report

日程待办摘要:编排 calendar +agenda 和 task +get-my-tasks,生成指定日期的日程与未完成任务摘要。适用于了解今天/明天/本周的安排。.

DropFan/claude-code-plugins · 53 tokens

lark-attendance

飞书考勤打卡:查询自己的考勤打卡记录.

DropFan/claude-code-plugins · 19 tokens

job-applier

Apply to jobs from your real browser. Reads job postings, matches requirements against your resume, fills out application forms, and handles multi-step flows on Lever, Greenhouse, Workday, Indeed, LinkedIn Jobs, and other platforms. Reviews everything before submitting. Requires the hanzi browser automation MCP server…

hanzili/hanzi-browse · 68 tokens

lark-im

飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件(支持大文件分片下载)、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。.

DropFan/claude-code-plugins · 147 tokens