automating-messages — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited automating-messages (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
chat.db reads.automating-mac-apps for common setup (permissions, osascript invocation, UI scripting basics).1) [ ] Resolve transport: pick serviceType (iMessage or SMS) before targeting a buddy. 2) [ ] Identify recipient: filter buddies by handle (phone/email). Avoid ambiguous names. 3) [ ] Send via app-level send: pass Buddy object to Messages.send(). 4) [ ] Verify window context: activate Messages when mixing with UI steps. 5) [ ] Fallbacks: if send/attachments fail, use UI scripting; for history, use SQL.
const Messages = Application('Messages');
Messages.includeStandardAdditions = true;
function safeSend(text, handle, svcType = 'iMessage') {
const svc = Messages.services.whose({ serviceType: svcType })[0];
if (!svc) throw new Error(`Service ${svcType} missing`);
const buddy = svc.buddies.whose({ handle })[0];
if (!buddy) throw new Error(`Buddy ${handle} missing on ${svcType}`);
Messages.send(text, { to: buddy });
}try/catch and log; add small delays when activating UI.references/ui-scripting-attachments.md for the full flow and ObjC pasteboard snippet.Reading messages limitation: The AppleScript/JXA API for Messages is effectively write-only. While send() works reliably, reading messages via chat.messages() or similar methods is broken/unsupported in modern macOS. The only reliable way to read message history is via direct SQLite access to ~/Library/Messages/chat.db.
Security consideration: Reading chat.db requires Full Disk Access permission, which grants broad filesystem access beyond just Messages. This is a significant security trade-off - granting Full Disk Access to scripts or applications exposes all user data. Consider whether reading message history is truly necessary before enabling this permission.
chat.db for history; JXA chat.messages() is unreliable/non-functional.sqlite3 -json for structured results.references/database-forensics.md for schema notes, typedstream handling, and export tooling.Example read query (requires Full Disk Access):
sqlite3 ~/Library/Messages/chat.db "SELECT
CASE WHEN m.is_from_me = 1 THEN 'Me' ELSE 'Them' END as sender,
m.text,
datetime(m.date/1000000000 + 978307200, 'unixepoch', 'localtime') as date
FROM message m
JOIN handle h ON m.handle_id = h.rowid
WHERE h.id LIKE '%PHONE_NUMBER%'
ORDER BY m.date DESC LIMIT 10;"launchd now that on-receive handlers are gone.rowid, query diffs, dispatch actions, and persist state.references/monitoring-daemons.md for the polling pattern and plist notes.Messages.services.whose({ serviceType: 'iMessage' })[0] returns objectsvc.buddies.whose({ handle })[0] returns targetchat.db readsreferences/control-plane.mdreferences/ui-scripting-attachments.mdreferences/database-forensics.mdreferences/monitoring-daemons.md~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.