imessage

imessage is a skill for Claude Code from diillson/chatcli. It costs 66 tokens per session (466 once invoked), scanned A, original, Apache-2.0.

A macOS tool for sending and reading iMessage and SMS through Apple’s Messages app.

In plain words
What is it for?
Sending messages, reading recent message history, and working with existing chats on a Mac.
Why use it?
It lets an agent handle text messages from the terminal instead of requiring manual work in Messages.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Sending messages, reading recent message history, and working with existing chats on a Mac.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/diillson/chatcli/imessage
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.

Any agent
npx skills add diillson/chatcli --skill imessage
Clone the repo
git clone --depth 1 https://github.com/diillson/chatcli

Made for: Claude Code.

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 imessage

README.md
[![agentmods](https://agentmods.dev/badge/skills/diillson/chatcli/imessage/github.svg)](https://agentmods.dev/skills/diillson/chatcli/imessage)
Your own site
<a href="https://agentmods.dev/skills/diillson/chatcli/imessage"><img src="https://agentmods.dev/badge/skills/diillson/chatcli/imessage/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for imessage

Your own site · 80×15
<a href="https://agentmods.dev/skills/diillson/chatcli/imessage"><img src="https://agentmods.dev/badge/skills/diillson/chatcli/imessage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 466 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00066 $0.00466
Opus 5.5 $0.00026 $0.00186
Sonnet 5.5 $0.00013 $0.00093
Haiku 4.5 $0.00007 $0.00047

Measured 1mo ago against content hash 6fbc7531b929, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

imessage 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 1mo 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.

pkg/persona/builtin/skills/imessage/SKILL.md · 50 lines

What it actually says

iMessage (macOS)

Send and read iMessage/SMS through the macOS Messages.app via osascript. This is macOS-only — check uname -s returns Darwin first; on Windows/Linux there is no iMessage, so route the user to the send-message skill (Telegram/WhatsApp/etc.) instead.

Preconditions

  • Messages.app is signed in to the user's Apple ID.
  • First send may require Automation permission (System Settings → Privacy & Security → Automation) — if osascript errors with "not allowed", tell the user to grant it.

Send

osascript -e 'tell application "Messages"
  set svc to 1st service whose service type = iMessage
  set buddy to buddy "+15551234567" of svc
  send "On my way 🚗" to buddy
end tell'

To send to an existing chat by name, target text chat instead of buddy.

Read recent messages

Messages stores history in ~/Library/Messages/chat.db (SQLite). Read-only query:

sqlite3 ~/Library/Messages/chat.db \
  "SELECT datetime(date/1000000000 + 978307200,'unixepoch'), text FROM message ORDER BY date DESC LIMIT 10;"

(Requires Full Disk Access for the terminal; mention this if it errors.)

Rules

  • Confirm recipient + text before sending — messages can't be unsent.
  • Phone numbers in E.164 (+countrycode...) are most reliable.
  • This is the one skill that is genuinely OS-locked; be explicit when the user isn't on macOS.
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. 1mo ago First seen · 50 lines · 66 tokens per session scan A 6fbc7531b929

Subscribe to this mod's changes

imessage is a skill published in the GitHub repository diillson/chatcli (93 stars, last pushed today), licensed Apache-2.0. It adds 66 tokens to every session and 466 once invoked, about $0.0003 per session on Opus 5.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-09-03.

Related

Other skills, from other repositories

agent-state-bar

A design guide for an agent status bar: a short, automatically updated summary of progress, remaining tasks, tool counts, errors, and system state placed near the latest model input.

bojieli/ai-agent-book · 105 tokens

context-engineering

A guide to organizing the instructions and information an AI agent receives at each step. It covers system prompts, tool descriptions, conversation history, on-demand skills, and protections against unsafe outside content.

bojieli/ai-agent-book · 96 tokens

reward-design

A guide to defining the scores that an AI agent receives during trial-and-error training. It covers checks based on rules, human preferences, or another model, and distinguishes rewarding the final result from rewarding the steps taken.

bojieli/ai-agent-book · 131 tokens

kv-cache-design

A guide to arranging an AI agent's conversation so previously processed text can be reused. A KV cache stores intermediate results for earlier tokens, while a prompt cache reuses a stable beginning across requests.

bojieli/ai-agent-book · 91 tokens

loop-engineering

A guide to building reliable loops for AI agents that plan, act, check their work, and continue until a task is truly complete. It includes independent verification and a proposer-reviewer pattern in which one agent's work is checked using outside evidence.

bojieli/ai-agent-book · 139 tokens

pptx

A guide for turning a paper, outline, or structured text into a PowerPoint presentation. It covers an 8–12-slide structure, concise slide points, and generation of a .pptx file.

bojieli/ai-agent-book · 84 tokens