foxrun-ai/foxrun / skillwright/skills/imessage
imessage
VerifiedRead, send, or react to iMessage chats with the imsg tool, or stream new ones, with a read-back and a yes-gate before every send. Use when the person says text someone, check my messages, read that thread, send this file by iMessage, or react to that message. Mac-only. imsg is an Add-on.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.3 KB |
| bin/imessage-sendexecutable | script | 2.8 KB |
| replays/read-people-from-rows.json | config | 234 B |
| replays/rehearse-text.json | config | 367 B |
| tests/__init__.py | script | 0 B |
| tests/test_imessage_send.py | script | 2.8 KB |
tests/test_imessage_send.py
View on GitHub"""Rehearsal checks for imessage-send. No test runs the send path."""
import json
import os
from pathlib import Path
import subprocess
import sys
import tempfile
import unittest
BIN = Path(__file__).resolve().parents[1] / "bin" / "imessage-send"
class RehearsalTests(unittest.TestCase):
def rehearse(self, *args: str, path: str) -> subprocess.CompletedProcess[str]:
# PATH holds only a fake imsg that records any call, so a slip can never reach Messages.
return subprocess.run(
[sys.executable, str(BIN), "--rehearsal", *args],
text=True, capture_output=True, stdin=subprocess.DEVNULL, check=False,
env={**os.environ, "PATH": path},
)
def fake_imsg(self, folder: Path) -> Path:
marker = folder / "imsg-called"
fake = folder / "imsg"
fake.write_text(f"#!/bin/sh\ntouch {marker}\n", encoding="utf-8")
fake.chmod(0o755)
return marker
def test_rehearsal_prints_what_would_have_gone_and_never_runs_imsg(self) -> None:
with tempfile.TemporaryDirectory() as folder:
marker = self.fake_imsg(Path(folder))
completed = self.rehearse("--to", "replay@example.com", "--text", "Hi, test.", "--no-sms-fallback", path=folder)
self.assertEqual(completed.returncode, 0, completed.stderr)
result = json.loads(completed.stdout)
self.assertEqual(result["would_send"]["text"], "Hi, test.")
self.assertEqual(result["would_send"]["to"], "replay@example.com")
self.assertFalse(result["sent"])
self.assertEqual(
result["command"],
["imsg", "send", "--to", "replay@example.com", "--text", "Hi, test.", "--service", "auto", "--no-sms-fallback"],
)
self.assertIn("nothing sent", completed.stderr)
self.assertFalse(marker.exists())
def test_rehearsal_checks_the_attachment_and_the_target(self) -> None:
with tempfile.TemporaryDirectory() as folder:
self.fake_imsg(Path(folder))
missing = self.rehearse("--chat-id", "7", "--file", str(Path(folder) / "gone.pdf"), path=folder)
self.assertEqual(missing.returncode, 2)
self.assertIn("attachment not found", missing.stderr)
empty = self.rehearse("--to", "replay@example.com", path=folder)
self.assertEqual(empty.returncode, 2)
both = self.rehearse("--to", "replay@example.com", "--chat-id", "7", "--text", "x", path=folder)
self.assertEqual(both.returncode, 2)
def test_help_answers(self) -> None:
completed = subprocess.run([sys.executable, str(BIN), "--help"], text=True, capture_output=True, check=False)
self.assertEqual(completed.returncode, 0)
self.assertIn("--rehearsal", completed.stdout)
if __name__ == "__main__":
unittest.main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |