mcpField
A
agent-notifier

agent-notifier

github.com/crossoverjieAgent workflows19109 installsUpdated 17w ago
Repository

About agent-notifier

agent-notifier is a hook-driven notification skill for people using AI coding agents. It supports several agent platforms and can send alerts to multiple enabled channels when input is needed or work finishes.

Key features

  1. 01Trigger notifications through hooks
  2. 02Support multiple AI agent platforms
  3. 03Offer sound and macOS alerts
  4. 04Support Telegram, email, and webhooks
  5. 05Send to enabled channels concurrently

Use cases

  1. 01Get alerted when an agent needs input
  2. 02Know when an agent session ends
  3. 03Send alerts to Slack or Discord

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/crossoverjie/skills --skill agent-notifier

After installing, type/agent-notifierin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

notify-config.json
notify.py
opencode-plugin.js
README.md
requirements.txt
setup.py
test_notify.py

Details

From the project README

Agent Notifier Skill

Deterministic, hook-driven notifications for AI code agents. Never miss when your agent needs input or finishes a task.

Why

LLM-based "play a sound when done" prompts are unreliable — context compression drops them, and the model's judgement of "done" is inconsistent. This skill uses each platform's Hooks system for guaranteed triggering.

Prerequisites

  • Python 3 (standard library only, no external dependencies)
  • At least one supported AI agent platform

Supported Platforms

PlatformHook Event
Claude CodeNotification (idle_prompt, permission_prompt)
GitHub Copilot CLIsessionEnd, postToolUse
Cursorstop, afterFileEdit
Codexagent-turn-complete
Aider--notifications-command
OpenCodesession.idle (plugin)

Quick Start

# Interactive setup — detects platforms, configures channels, installs hooks
python3 skills/agent-notifier/setup.py
Copilot CLI Users

Copilot CLI loads hooks from the project's .github/hooks/ directory (no global hook support). Create the hook file in each project where you want notifications:

mkdir -p .github/hooks
cat > .github/hooks/agent-notifier.json << 'EOF'
{
  "version": 1,
  "hooks": {
    "sessionEnd": [
      {"type": "command", "bash": "python3 $HOME/.claude/skills/agent-notifier/notify.py"}
    ],
    "postToolUse": [
      {"type": "command", "bash": "python3 $HOME/.claude/skills/agent-notifier/notify.py"}
    ]
  }
}
EOF
OpenCode Users

OpenCode uses a JavaScript plugin system. Copy the plugin to your plugins directory:

mkdir -p ~/.config/opencode/plugins
cp skills/agent-notifier/opencode-plugin.js ~/.config/opencode/plugins/agent-notifier.js

Manual Usage

# Test with simulated Claude Code event
echo '{"notification_type":"idle_prompt","message":"Waiting for input"}' | python3 skills/agent-notifier/notify.py

# Test with simulated OpenCode event
echo '{"platform":"opencode","event_type":"session.idle","message":"Session completed"}' | python3 skills/agent-notifier/notify.py

# Test with command-line args (Aider style)
python3 skills/agent-notifier/notify.py "Task completed"

Notification Channels

ChannelDefaultRequirements
SoundEnabledmacOS (afplay) or Linux (paplay/aplay)
macOS NotificationEnabledmacOS only
TelegramDisabledBot token + Chat ID
EmailDisabledSMTP credentials
SlackDisabledIncoming Webhook URL
DiscordDisabledWebhook URL
DingTalkDisabledWebhook URL + optional Secret

Configuration

Config file is searched in order:

  1. ~/.claude/notify-config.json
  2. skills/agent-notifier/notify-config.json (template)

Run python3 skills/agent-notifier/setup.py to configure interactively, or edit the JSON directly.

Output

Notifications are sent concurrently to all enabled channels. Individual channel failures are logged to stderr without affecting other channels.

Comments

Markdown supported