Community코딩 & 개발github.com

imsg

OpenClaw 에이전트가 사용자의 로컬 macOS Messages.app 계정을 통해 iMessage/SMS DM, 그룹, 답장, 반응, 투표, 감시 및 비공개 API 동작을 수행할 수 있게 합니다.

imsg란 무엇인가요?

이 스킬은 OpenClaw 에이전트가 macOS의 Messages.app와 상호작용하여 iMessage 및 SMS 메시지를 주고받고 관리할 수 있도록 설계되었습니다. 에이전트는 대화 기록을 조회하고, 적절한 DM 또는 그룹을 선택하며, 메시지 및 파일을 보내고, 답장, 반응(탭백), 투표 등 다양한 작업을 수행할 수 있습니다. 특히 macOS의 공개 자동화 API로는 불가능한 고급 기능(서식 있는 답장, 메시지 효과, 편집/취소, 그룹 관리 등)을 위해 비공개 API 브리지를 사용할 수 있습니다. 이 스킬은 사용자의 명확한 의도와 정확한 대상자 확인을 강조하며, 잠재적인 오작동을 방지하기 위해 모든 전송 및 상태 변경 전에 확인 절차를 거치도록 설계되었습니다. Linux 환경에서는 읽기 전용으로 제한됩니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/skills/imsg

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

imsg은(는) 무엇을 하나요?

OpenClaw 에이전트가 사용자의 로컬 macOS Messages.app 계정을 통해 동작해야 할 때 imsg를 사용하세요: iMessage/SMS 기록 확인, 올바른 DM 또는 그룹 선택, 메시지/파일 전송, 답장, 반응, 투표, 또는 비공개 API iMessage 기능 사용.

현재 OpenClaw 대화 내에서 구성된 채널이 이미 답장을 라우팅하는 경우 Telegram, Signal, WhatsApp, Discord, Slack 또는 해당 대화 내에서 답장하는 데 이 스킬을 사용하지 마세요.

에이전트 흐름

  1. 먼저 대상을 확인합니다.
  2. DM, 기존 그룹 또는 새 그룹을 선택합니다.
  3. 요청된 작업을 수행할 수 있는 가장 낮은 기능의 명령어를 선택합니다.
  4. 사용자가 정확한 수신자, 내용 및 작업을 이미 지정하지 않은 한 모든 전송 또는 표시 상태 변경을 확인합니다.
  5. 안정적인 식별자를 사용하여 실행합니다: 일반 전송/감시/기록에는 --chat-id를, 브리지 작업에는 --chat 채팅 GUID를 선호합니다.

여러 채팅이나 핸들이 일치할 수 있는 경우 캐주얼한 이름만으로 수신자를 추론하지 마세요. 전송하기 전에 일치하는 표시 이름, 핸들, 그룹 참가자 및 메시지 텍스트/동작을 표시합니다.

호스트 요구 사항

  • 전송/반응/브리지 작업을 위해 macOS 14+ 및 Messages.app에 로그인되어 있어야 합니다.
  • imsg 또는 OpenClaw를 실행하는 프로세스 컨텍스트에 대한 전체 디스크 액세스 권한; Messages DB에 접근하지 못하면 읽기가 실패합니다.
  • 공개 send를 사용할 때 Messages.app에 대한 자동화 권한.
  • 공개 imsg react를 실행하는 프로세스 컨텍스트에 대한 손쉬운 사용 권한; System Events UI 자동화를 사용합니다. 브리지 tapback은 대신 비공개 API를 사용합니다.
  • 연락처 이름 확인을 위한 선택적 연락처 권한.
  • SMS 전송을 위해 사용자 iPhone에서 이 Mac으로의 문자 메시지 전달이 필요합니다.
  • Linux는 복사된 chat.db만 읽을 수 있습니다. 전송, 반응, Messages.app 실행, 읽음 표시 또는 입력을 할 수 없습니다.

대상 확인

--json 읽기를 사용합니다. 출력은 줄바꿈으로 구분된 JSON입니다. jq를 사용할 수 있으면 jq -s를 사용하고, 그렇지 않으면 한 줄에 하나의 객체를 직접 처리합니다.

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

대상 규칙:

  • 전화번호/이메일로 DM: 사용자가 정확한 핸들을 제공했거나 단 하나의 명확한 채팅 일치 후 imsg send --to를 사용합니다.
  • 기존 DM 스레드: imsg send --chat-id <id>가 이름을 다시 확인하는 것보다 안전합니다.
  • 기존 그룹: imsg group --chat-id <id> --json으로 확인합니다. --chat-id로 전송하고, group의 채팅 GUID로 브리지합니다.
  • 새 그룹: 사용자가 명시적으로 그룹 생성을 요청했거나 일치하는 기존 그룹이 없는 경우에만 chat-create을 사용합니다.
  • 모호한 그룹 이름: 표시 이름뿐만 아니라 참가자를 확인합니다.
  • SMS: 요청된 경우 또는 iMessage 대체를 원하지 않는 경우에만 --service sms를 사용합니다. SMS 중계는 문자 메시지 전달이 필요합니다.

jq를 스킬의 필수 구성 요소로 만들지 마세요. 예제를 위한 편리한 포맷터일 뿐입니다.

기능 선택

공개 Messages 자동화가 충분할 때 사용합니다:

  • 읽기/목록/검색/감시: chats, group, history, search, watch
  • 기본 텍스트/파일 전송: send
  • 채팅에서 가장 최근 수신 메시지에 대한 표준 탭백: react

공개 자동화가 수행할 수 없는 기능에만 비공개 API 브리지를 사용합니다:

  • 리치 답장, 텍스트 서식, 효과, 제목, 멀티파트 전송
  • 기본 Apple Messages 투표 및 투표
  • 메시지 GUID별 탭백 또는 탭백 제거
  • 편집, 보내지 않음, 삭제, 알림 보내기
  • 읽음 확인, 입력 표시기, 브리지 이벤트 감시
  • 그룹 생성/이름/사진/멤버/나가기/삭제/표시 작업
  • 계정, whois, 닉네임 확인

브리지 작업 전에 다음을 확인합니다:

imsg status --json

호스트가 브리지 작업을 지원하지만 Messages가 아직 주입되지 않은 경우, imsg launch를 실행하기 전에 물어보세요. Messages.app를 종료하고 다시 시작하여 브리지를 주입하므로 표시 상태 변경으로 취급합니다:

imsg launch
imsg status --json

SIP, 라이브러리 유효성 검사, 개인 자격 확인 또는 누락된 선택기가 여전히 기능을 차단하는 경우, 사용자에게 SIP를 가볍게 비활성화하도록 요청하지 마세요. 요청된 비공개 API 작업이 이 호스트에서 사용 불가능함을 설명하고 가능한 경우 가장 가까운 비브리지 작업을 제공합니다.

DM 시나리오

정확한 핸들, 기본 전송:

imsg send --to "+14155551212" --text "가는 중이야" --service auto

알려진 DM 스레드:

imsg send --chat-id 42 --text "가는 중이야"
imsg send --chat-id 42 --file /path/to/photo.jpg

사용자가 요청한 경우에만 채널 강제:

imsg send --to "+14155551212" --text "초록색 말풍선" --service sms
imsg send --to "+14155551212" --text "iMessage만" --service imessage --no-sms-fallback

스레드 답장, 서식, 효과 또는 첨부 파일 답장:

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

서식 범위는 UTF-16 위치입니다. 지원되는 스타일에는 bold, italic, underline 및 strikethrough가 포함됩니다. 생성된 JSON에는 --format-file을 사용합니다.

그룹 시나리오

작업 전에 확인:

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

기존 그룹에 전송:

imsg send --chat-id 42 --text "나 괜찮아"

기존 그룹에서 브리지 답장 또는 투표:

imsg send-rich --chat 'iMessage;+;chat0000' \
  --reply-to <message-guid> --text "스레드에 답장 중"
imsg poll send --chat 'iMessage;+;chat0000' \
  --question "저녁?" --option "피자" --option "초밥"

명시적 요청이 있을 때만 그룹 생성 또는 변경:

imsg chat-create --addresses '+15551111111,+15552222222' --name '크루' --text '굿모닝'
imsg chat-name --chat 'iMessage;+;chat0000' --name '이름 변경됨'
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

그룹 변경은 매우 가시적입니다. 멤버십, 이름, 사진, 읽음 상태 변경, 나가기 또는 삭제 전에 정확한 그룹 및 참가자 목록을 확인합니다.

반응 및 답장

공개 react는 제한적입니다. 채팅에서 가장 최근 수신 메시지에 반응합니다.

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

특정 메시지 GUID 또는 제거의 경우 브리지 tapback을 사용합니다:

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

스레드 답장에는 send-rich --reply-to <message-guid>를 사용합니다. 사용자가 "그것" 또는 "이전 것"이라고 말하면 참조된 메시지를 확인합니다.

투표

기본 Apple Messages 투표에는 브리지가 필요합니다. 생성에는 최소 2개의 --option 값이 필요합니다. 투표에는 --option-id, --option-index 또는 --option 중 하나가 필요합니다.

Messages는 투표 풍선에 옵션만 렌더링합니다. --question 제목은 수신자에게 표시되지 않습니다. --question(필수)과 최소 2개의 --option 값을 설정합니다.

imsg poll send --chat 'iMessage;-;+15551234567' \
  --question "저녁?" --option "피자" --option "초밥"
imsg poll send --chat 'iMessage;+;chat0000' --reply-to <message-guid> \
  --question "승인?" --option "예" --option "아니오"
imsg poll vote --chat 'iMessage;+;chat0000' \
  --poll <poll-message-guid> --option-id <option-id>

투표 ID 및 옵션을 찾으려면:

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

투표 행은 poll 이벤트이지 탭백이 아닙니다. 확인하기 위해 watch --reactions가 필요하지 않습니다.

감시 및 장기 실행 에이전트

짧은 일회성 대기의 경우 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는 배타적입니다. 없으면 watch는 최신 행에서 시작합니다. watch는 파일 시스템 이벤트와 저주파 폴링 대체를 사용하므로 누락된 SQLite 사이드카 이벤트를 따라잡을 수 있습니다. --reactions 없이 폴 객체가 나타납니다.

데몬 또는 다중 채팅 통합의 경우 imsg rpc를 사용합니다. stdin/stdout을 통해 JSON-RPC 2.0을 사용합니다. 최신 브리지 또는 투표 방법을 사용하기 전에 imsg status --json에서 rpc_methods를 확인합니다.

안전 규칙

  • 사용자 요청에 정확한 값이 포함되어 있지 않은 한 모든 전송 전에 수신자, 채팅 및 내용을 확인합니다.
  • 읽음 확인, 입력 표시기, 편집, 보내지 않음, 삭제, 투표, 탭백, 그룹 멤버십, 그룹 이름/사진, 채팅 나가기/삭제와 같은 표시 상태 변경을 확인합니다.
  • 승인 없이 알 수 없는 번호나 모호한 연락처 이름 일치로 전송하지 마세요.
  • 첨부 파일이 존재하고 의도한 파일인지 확인합니다.
  • E.164 전화번호를 선호합니다. 로컬 형식에 필요한 경우에만 --region US 또는 다른 지역을 사용하세요.
  • 단지 사용 가능하다고 해서 브리지 작업을 사용하지 마세요. 요청된 동작에 필요한 경우에만 사용합니다.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Grok Build, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

add-model-provider

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras and local webcams, including USB pan/tilt/zoom control.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills when explicitly requested; install, verify, update, uninstall, publish, or sync skills.

관련 스킬