Skip to content

foxrun-ai/foxrun / skillwright/skills/imessage

imessage

Verified

Read, 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.

FileKindSize
SKILL.mdskill md4.3 KB
bin/imessage-sendexecutablescript2.8 KB
replays/read-people-from-rows.jsonconfig234 B
replays/rehearse-text.jsonconfig367 B
tests/__init__.pyscript0 B
tests/test_imessage_send.pyscript2.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()
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
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: 196kUpdated Claude CodeCodexVerifiedInstall