/jonhill90-skills:notifyfrom jonhill90-skills
Sends a short, structured message to a human on a configured outbound channel (Telegram first, iMessage as a Mac-only fallback) from the terminal, so a stalled or escalated agent loop can reach someone away from the machine. Dry-run by default; real send requires an explicit flag and failures exit non-zero. User-invoked only.
Ships in jonhill90-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
An autonomous loop that stalls while its operator is away stays stalled until someone happens to look. This skill is the outbound half of that gap: one script that sends a short message on a configured channel and tells the truth about whether it worked.
escalate state, a CI failure gate) — and needs to
actually deliver that decision outside the terminal.notify
that also decided when to fire would make its caller's escalation
logic impossible to reason about separately.Owns: sending a short message on whichever channel is configured, dry-run by default, real send behind an explicit flag, dedup/rate-limit so a loop messaging on every tick doesn't become worse than silence, and a failure path that is loud rather than swallowed.
Does not own: deciding when to notify, what the message should say beyond "short and state-bearing," or wiring this into any particular watchdog or loop. That integration is the caller's job.
Per jonhill90/skills#146, Jon later re-ordered this (2026-08-11) once Telegram proved to be the only channel that actually reached his phone: Telegram works from any machine and does not depend on macOS automation permissions, so it goes first and iMessage becomes the fallback rather than the primary.
references/channels.md for the shape each
would take if a future change needs one. Build only if both Telegram and
iMessage are genuinely blocked for a given setup — one working channel
closes the operational gap; five is not the goal.Everything channel- and credential-related comes from the environment. Nothing is hardcoded and nothing is committed.
| Variable | Required | Default | Meaning |
|---|---|---|---|
NOTIFY_CHANNEL | no | auto | auto tries telegram then imessage, in that order, stopping at the first that accepts the message; telegram or imessage forces exactly one channel with no fallback |
AGENT_NOTIFY_TELEGRAM_TOKEN | yes, for Telegram | — | bot token from @BotFather |
AGENT_NOTIFY_TELEGRAM_CHAT_ID | yes, for Telegram | — | the chat to send to (must have started a chat with the bot at least once) |
AGENT_NOTIFY_IMESSAGE_TO | yes, for iMessage | — | canonical. The phone number or Apple ID email to send to (your own, for a self-notification). Matches the AGENT_NOTIFY_* prefix Telegram already uses and is the name agent-supervisor/scripts/supervisor/notify.sh reads. |
NOTIFY_IMESSAGE_TARGET | no | — | deprecated alias for AGENT_NOTIFY_IMESSAGE_TO, kept working so an existing notify.env or shell profile doesn't break. If both are set, AGENT_NOTIFY_IMESSAGE_TO wins. New config should use the canonical name (jonhill90/skills#152). |
NOTIFY_STATE_DIR | no | ~/.local/state/notify | where the dedup/rate-limit state and local log live |
NOTIFY_DEDUP_WINDOW_SECONDS | no | 300 | suppress an identical message sent again within this window |
NOTIFY_MIN_INTERVAL_SECONDS | no | 60 | suppress any send within this long of the last one |
Credentials must come from the environment — an untracked, 0600 env file
loaded by the caller is the pattern this skill assumes, the same one
agent-supervisor/scripts/supervisor/notify.sh uses. Never put a token
inline in a command, a script, or anything committed to this repository.
There is no config file in this repository to edit; set the environment
where the caller runs.
# Dry run (default) — prints exactly what would be sent, sends nothing, exits 0.
python3 scripts/notify.py --message "watchdog: escalate — 3 restarts/hr, stopped."
# Real send, auto channel selection (Telegram, then iMessage fallback).
AGENT_NOTIFY_TELEGRAM_TOKEN="..." AGENT_NOTIFY_TELEGRAM_CHAT_ID="..." \
AGENT_NOTIFY_IMESSAGE_TO="[email protected]" \
python3 scripts/notify.py --message "watchdog: escalate — check tmux." --send
# Force a single channel — no fallback to the other if it fails.
AGENT_NOTIFY_IMESSAGE_TO="[email protected]" \
python3 scripts/notify.py --message "..." --channel imessage --send
--message (required) — kept under 200 characters by the script; a
message that doesn't fit on a lock screen defeats the point. State
what stopped, what it needs, and where to look — not a transcript
dump.--send — actually deliver. Every other invocation, including every
test, omits this and gets a dry run instead.--force — bypass dedup/rate-limit suppression for one send. Use
sparingly; the suppression exists because a loop that messages on
every tick is worse than silence.--channel — override $NOTIFY_CHANNEL. auto (default) tries
telegram then imessage with no further fallback once one is named
explicitly. discord, teams, and slack exit 2 with a message
pointing at references/channels.md, rather than silently doing
nothing.| Code | Meaning |
|---|---|
0 | dry run printed, message sent, or message intentionally suppressed (deduped / rate-limited) |
1 | a send was attempted and failed on every candidate channel (just --channel imessage itself, when forced explicitly) — always logged to $NOTIFY_STATE_DIR/notify.log first |
2 | usage or configuration error (missing --message, oversized message, unknown or unbuilt channel, no channel configured at all) |
An unreachable channel must never look like "nothing to report" — that is the fail-open shape this comes from (jonhill90/skills#146). Exit 1 plus a local log line is the contract a caller can check.
Sending a message is an outward-facing action — treat it like any other send to a live system.
Always dry-run while iterating. Every invocation above without
--send prints what would happen and touches no state, no network,
no Messages.app.
--self-test exercises the dedup, rate-limit, config-validation,
and logging logic against a scratch state directory with no real send
involved:
python3 scripts/notify.py --self-test
At most one live send, ever, per change. If you need to confirm the real path works, send exactly one message to yourself, clearly marked as a test, and record its exact content in whatever report you're producing. Do not loop, retry, or fan this out to confirm it "really" worked — one send is the check.
If a self-send doesn't produce a notification, report that. Do not start experimenting with dedicated threads, group chats, or other recipients to chase a notification — that's a scope creep this skill explicitly avoids (see Channel priority above; the issue anticipates self-messaging may not notify and treats that as information, not a bug to iterate around).
| Script | Use |
|---|---|
notify.py | dry-run/live sender for the configured channel; owns dedup, rate-limiting, and local failure logging |
$NOTIFY_STATE_DIR
(~/.local/state/notify by default) — local to the machine, never
committed, never read by this repository's validator.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub jonhill90/skills --plugin jonhill90-skills44 skills in this plugin
/adopt-or-buildDecide, per component, whether to adopt an existing name, dependency, library, or tool or build it in-house, weighing blast radius over convenience. Use at the point a name or dependency is about to be chosen or recommended — before it is proposed, not after. Not for finding a technology's capability ceiling (research-the-limit), not the mechanism for genuinely different reviewer lenses (ask-a-council, which this skill may call), and not a substitute for attacking the chosen answer (devils-advocate, which this skill invokes as its final step)./ask-a-councilConvene several harnesses or models against one question, each doing a distinct job it can fail at — different evidence, a different objective, or a withheld conclusion — before an artifact becomes load-bearing and being wrong is expensive. Diversity comes from what each reviewer is given, never from a character it plays. Use when the failure modes genuinely differ in kind — a single reviewer's prompt would only catch what its own lens looks for. Not for a question a cheap deterministic check settles (run the check first); not for one reviewer's prompt (sanity-check owns that); not for dispatch mechanics or isolation boundaries (dispatching-subagents owns those); not for trusting a verdict already returned (verify-the-instrument owns that)./central-hub-mcpOrient on Central Hub through its read-only hub-mcp server — call hub_orient first, then only the targeted tool the answer still needs — and connect an AI harness to hub-mcp. Use when a session needs live Central Hub state (c1 cluster apps, the agent notebook, the bi-temporal fact graph, open PRs and CI), when hub-mcp tools appear in the tool list, or when configuring Claude Code, Codex CLI, Claude Desktop, Copilot, Antigravity, Pi, OpenClaw, Hermes, Paperclip, Rex, or another MCP client to reach hub-mcp./close-the-loopConfirm you have everything needed to finish a change before starting it — what to implement, how it will be tested, and which rules govern it. Use before non-trivial work, when reviewing a plan for completeness, or when preparing a PR that needs planning evidence./create-skillDesign, create, and validate portable Agent Skills with effective triggers, concise instructions, and reusable scripts, references, or assets. Use when adding a new skill, substantially restructuring an existing skill, or validating a skill's structure, frontmatter, links, and bundled scripts./decide-by-variantBuild several genuinely different real artifacts in the real medium with fake data, and let the human pick by looking, instead of asking a taste decision in prose. Use whenever a decision has no objectively right answer — a glyph, a layout, a default, a name, a wording, a sort order — and describing the options in words would cost the human more thought than looking at them would. Run determine-intent first — if the answer is already a known parameter, build nothing. Not for getting different positions from agents on one question (ask-a-council); not for attacking an answer once chosen (devils-advocate runs after a variant is picked, not instead of building one).