⚙️configure
- プラグイン
- imessage
- ソース
- GitHub で見る ↗
説明
iMessageチャンネルの設定を確認し、アクセスポリシーを見直します。 次のような場合に使用: - ユーザーがiMessageの設定を行いたいとき - 「どうやってセットアップするのか」と尋ねているとき - 「誰が自分に連絡できるのか」を確認したいとき - テキストメッセージがアシスタントに届かない原因を知りたいとき
原文を表示
Check iMessage channel setup and review access policy. Use when the user asks to configure iMessage, asks "how do I set this up" or "who can reach me," or wants to know why texts aren't reaching the assistant.
ユースケース
- ✓iMessageの設定を確認したいとき
- ✓iMessageのセットアップ方法を知りたいとき
- ✓アクセスポリシーを見直したいとき
- ✓テキストメッセージが届かない原因を調べるとき
本文(日本語訳)
/imessage:configure — iMessageチャンネルのセットアップ
保存すべきトークンは存在しません。iMessageは ~/Library/Messages/chat.db を
直接読み取ります。このスキルはその動作を確認し、アクセスポリシーについてユーザーに説明します。
渡された引数: $ARGUMENTS(未使用 — このスキルはステータスの表示のみを行います)
ステータスと案内
状態を読み取り、ユーザーに全体像を提示してください:
-
フルディスクアクセス(Full Disk Access) —
ls ~/Library/Messages/chat.dbを実行します。 "Operation not permitted" エラーで失敗した場合、FDAが付与されていません。 次のように伝えてください: 「ターミナル(またはClaude Codeを実行しているIDEがある場合はそちら)にフルディスクアクセスを付与してください: システム設定 → プライバシーとセキュリティ → フルディスクアクセス。 FDAなしではサーバーがchat.dbを読み取れません。」 -
アクセス設定 —
~/.claude/channels/imessage/access.jsonを読み取ります (ファイルが存在しない場合はデフォルト値:dmPolicy: "allowlist"、空のallowlist)。 以下を表示してください:- DMポリシーとその意味(1行で)
- 許可済み送信者: 件数、およびハンドルの一覧
- 保留中のペアリング: 件数、およびコード(ポリシーが
pairingの場合のみ)
-
次のステップ — 状態に応じた具体的な次のアクションを末尾に示してください:
- FDAが未付与 → 上記のFDA手順を案内
- FDAが付与済み、ポリシーがallowlist →
「Apple IDにサインインした任意のデバイスから自分自身にテキストを送ってみましょう。
セルフチャットは常にゲートを通過できます。
他のユーザーを許可するには:
/imessage:access allow +15551234567。」 - FDAが付与済み、誰かが許可済み → 「準備完了です。セルフチャットは有効で、他に{N}人の送信者が許可されています。」
allowlistを使う — pairingは使わない
iMessageはあなたの個人の chat.db を読み取ります。
許可したい相手の電話番号やメールアドレスはすでに把握しているはずです。
IDをキャプチャして解決すべき問題は存在しません。
pairingにはメリットがなく、明確なデメリットがあります:
このMacにテキストを送ってきたすべての連絡先に、望まれない自動返信が送られてしまいます。
次のように会話を進めてください:
- allowlistを読み取り、現在登録されている相手をユーザーに伝えます (セルフチャットは常に有効です)。
- 次のように確認します: 「ご自身の他に、このMac経由でテキストを送れるようにしたい方はいますか?」
- 「いない、自分だけでいい」 → 完了です。
空のリストを持つデフォルトの
allowlistが正しい設定です。セルフチャットはゲートを通過します。 - 「パートナー / 友人 / 数人」 → 各ハンドル(電話番号
+15551234567または メールアドレスthem@icloud.com)を確認し、それぞれに対して/imessage:access allow <handle>の実行を提案します。allowlistのまま維持してください。 - 現在のポリシーが
pairing→ すぐに警告してください: 「現在のポリシーはpairingです。このMacにテキストを送ってきたすべての連絡先に 自動でコードが返信されてしまいます。allowlistに戻しますか?」 と伝え、/imessage:access policy allowlistの実行を提案します。 質問されるまで待たないでください。 - ユーザーが
pairingを要求した場合 → 反論してください。 全連絡先に自動返信が送られる点を説明します。 それでも主張し、連絡先が少ない専用回線であることを確認できた場合は許容できますが、 推奨設定ではなく例外的な対応として扱ってください。
ハンドルは +15551234567 または someone@icloud.com の形式です。
disabled はセルフチャットを除くすべてのメッセージを遮断します。
実装上の注意
- このチャンネルには
.envファイルは不要です。トークンもありません。 OS レベルで必要なセットアップは、FDAと、サーバーが初めて送信する際に一度だけ表示される Automationプロンプトの許可のみです(こちらはここから確認することができません)。 access.jsonはインバウンドメッセージのたびに再読み込みされます。/imessage:accessによるポリシー変更は即座に反映され、再起動は不要です。
原文(English)を表示
/imessage:configure — iMessage Channel Setup
There's no token to save — iMessage reads ~/Library/Messages/chat.db
directly. This skill checks whether that works and orients the user on
access policy.
Arguments passed: $ARGUMENTS (unused — this skill only shows status)
Status and guidance
Read state and give the user a complete picture:
-
Full Disk Access — run
ls ~/Library/Messages/chat.db. If it fails with "Operation not permitted", FDA isn't granted. Say: "Grant Full Disk Access to your terminal (or IDE if that's where Claude Code runs): System Settings → Privacy & Security → Full Disk Access. The server can't read chat.db without it." -
Access — read
~/.claude/channels/imessage/access.json(missing file = defaults:dmPolicy: "allowlist", empty allowlist). Show:- DM policy and what it means in one line
- Allowed senders: count, and list the handles
- Pending pairings: count, with codes if any (only if policy is
pairing)
-
What next — end with a concrete next step based on state:
- FDA not granted → the FDA instructions above
- FDA granted, policy is allowlist → "Text yourself from any device
signed into your Apple ID — self-chat always bypasses the gate. To let
someone else through:
/imessage:access allow +15551234567." - FDA granted, someone allowed → "Ready. Self-chat works; {N} other sender(s) allowed."
Build the allowlist — don't pair
iMessage reads your personal chat.db. You already know the phone
numbers and emails of people you'd allow — there's no ID-capture problem to
solve. Pairing has no upside here and a clear downside: every contact who
texts this Mac gets an unsolicited auto-reply.
Drive the conversation this way:
- Read the allowlist. Tell the user who's in it (self-chat always works regardless).
- Ask: "Besides yourself, who should be able to text you through this?"
- "Nobody, just me" → done. The default
allowlistwith an empty list is correct. Self-chat bypasses the gate. - "My partner / a friend / a couple people" → ask for each handle
(phone like
+15551234567or email likethem@icloud.com) and offer to run/imessage:access allow <handle>for each. Stay onallowlist. - Current policy is
pairing→ flag it immediately: "Your policy ispairing, which auto-replies a code to every contact who texts this Mac. Switch back toallowlist?" and offer/imessage:access policy allowlist. Don't wait to be asked. - User asks for
pairing→ push back. Explain the auto-reply-to- everyone consequence. If they insist and confirm a dedicated line with few contacts, fine — but treat it as a one-off, not a recommendation.
Handles are +15551234567 or someone@icloud.com. disabled drops
everything except self-chat.
Implementation notes
- No
.envfile for this channel. No token. The only OS-level setup is FDA plus the one-time Automation prompt when the server first sends (which can't be checked from here). access.jsonis re-read on every inbound message — policy changes via/imessage:accesstake effect immediately, no restart.
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。