configure-notifications

Configure notification integrations (Telegram, Discord, Slack) via natural language

By yeachan-heo · 615 installs

npx skills add yeachan-heo/oh-my-claudecode --skill configure-notifications

Source repository · Upstream listing

Configure Notifications Set up OMC notification integrations so you're alerted when sessions end, need input, or complete background tasks. Routing Detect which provider the user wants based on their request or argument: If the trigger or argument contains "telegram" → follow the Telegram section If the trigger or argument contains "discord" → follow the Discord section If the trigger or argument contains "slack" → follow the Slack section If no provider is specified, use AskUserQuestion: Question: "Which notification service would you like to configure?" Options: 1. Telegram Bot token + chat ID. Works on mobile and desktop. 2. Discord Webhook or bot token + channel ID. 3. Slack Incoming webhook URL. Telegram Setup Set up Telegram notifications so OMC can message you when sessions end, need input, or complete background tasks. How This Skill Works This is an interactive, natural language configuration skill. Walk the user through setup by asking questions with AskUserQuestion. Write the result to ${CLAUDE CONFIG DIR: ~/.claude}/.omc config.json . Step 1: Detect Existing Configuration If existing config is found, show the user what's currently configured and ask if they want to update or reconfigure. Step 2: Create a Telegram Bot Guide the user through creating a bot if they don't have one: Step 3: Collect Bot Token Use AskUserQuestion: Question: "Paste your Telegram bot token (from @BotFather)" The user will type their token in the "Other" field. Validate the token: Must match pattern: digits:alphanumeric (e.g., 123456789:ABCdefGHI... ) If invalid, explain the format and ask again Step 4: Collect Chat ID Use AskUserQuestion: Question: "Paste your Telegram chat ID (the number from getUpdates API)" The user will type their chat ID in the "Other" field. Validate the chat ID: Must be a number (positive for personal, negative for groups) If invalid, offer to help them find it: Step 5: Choose Parse Mode Use AskUserQuestion: Question: "Which message format do you prefer?" Options: 1. Markdown (Recommended) Bold, italic, code blocks with Markdown syntax 2. HTML Bold, italic, code with HTML tags Step 6: Configure Events Use AskUserQuestion with multiSelect: Question: "Which events should trigger Telegram notifications?" Options (multiSelect: true): 1. Session end (Recommended) When a Claude session finishes 2. Input needed When Claude is waiting for your response (great for long running tasks) 3. Session start When a new session begins 4. Session continuing When a persistent mode keeps the session alive Default selection: session end + ask user question. Step 7: Write Configuration Read the existing config, merge the new Telegram settings, and write back: Add event specific config if user didn't select all events: For each event NOT selected, disable it: Step 8: Test the Configuration After writing config, offer to send a test notification: Use AskUserQuestion: Question: "Send a test notification to verify the setup?" Options: 1. Yes, test now (Recommended) Send a test message to your Telegram chat 2. No, I'll test later Skip testing If testing: Report success or failure. Common issues: 401 Unauthorized : Bot token is invalid 400 Bad Request: chat not found : Chat ID is wrong, or user hasn't sent /start to the bot Network error : Check connectivity to api.telegram.org Step 9: Confirm Display the final configuration summary: Environment Variable Alternative Users can skip this wizard entirely by setting env vars in their shell profile: Env vars are auto detected by the notification system without needing .omc config.json . Discord Setup Set up Discord notifications so OMC can ping you when sessions end, need input, or complete background tasks. How This Skill Works This is an interactive, natural language configuration skill. Walk the user through setup by asking questions with AskUserQuestion. Write the result to ${CLAUDE CONFIG DIR: ~/.claude}/.omc config.json . Step 1: Detect Existing Configuration If existing config is found, show the user what's currently configured and ask if they want to update or reconfigure. Step 2: Choose Discord Method Use AskUserQuestion: Question: "How would you like to send Discord notifications?" Options: 1. Webhook (Recommended) Create a webhook in your Discord channel. Simple, no bot needed. Just paste the URL. 2. Bot API Use a Discord bot token + channel ID. More flexible, requires a bot application. Step 3A: Webhook Setup If user chose Webhook: Use AskUserQuestion: Question: "Paste your Discord webhook URL. To create one: Server Settings Integrations Webhooks New Webhook Copy URL" The user will type their webhook URL in the "Other" field. Validate the URL: Must start with https://discord.com/api/webhooks/ or https://discordapp.com/api/webhooks/ If invalid, explain the format and ask again Step 3B: Bot API Setup If user chose Bot API: Ask two questions: 1. "Paste your Discord bot token" From discord.com/developers Your App Bot Token 2. "Paste the channel ID" Right click channel Copy Channel ID (requires Developer Mode) Step 4: Configure Mention (User Ping) Use AskUserQuestion: Question: "Would you like notifications to mention (ping) someone?" Options: 1. Yes, mention a user Tag a specific user by their Discord user ID 2. Yes, mention a role Tag a role by its role ID 3. No mentions Just post the message without pinging anyone If user wants to mention a user: Ask: "What is the Discord user ID to mention? (Right click user Copy User ID, requires Developer Mode)" The mention format is: <@USER ID (e.g., <@1465264645320474637 ) If user wants to mention a role: Ask: "What is the Discord role ID to mention? (Server Settings Roles right click role Copy Role ID)" The mention format is: <@&ROLE ID (e.g., <@&123456789 ) Step 5: Configure Events Use AskUserQuestion with multiSelect: Question: "Which events should trigger Discord notifications?" Options (multiSelect: true): 1. Session end (Recommended) When a Claude session finishes 2. Input needed When Claude is waiting for your response (great for long running tasks) 3. Session start When a new session begins 4. Session continuing When a persistent mode keeps the session alive Default selection: session end + ask user question. Step 6: Optional Username Override Use AskUserQuestion: Question: "Custom bot display name? (Shows as the webhook sender name in Discord)" Options: 1. OMC (default) Display as "OMC" 2. Claude Code Display as "Claude Code" 3. Custom Enter a custom name Step 7: Write Configuration Read the existing config, merge the new Discord settings, and write back: For Webhook method: Build the notifications object with the collected values and merge into .omc config.json using jq: For Bot API method: Add event specific config if user didn't select all events: For each event NOT selected, disable it: Step 8: Test the Configuration After writing config, offer to send a test notification: Use AskUserQuestion: Question: "Send a test notification to verify the setup?" Options: 1. Yes, test now (Recommended) Send a test message to your Discord channel 2. No, I'll test later Skip testing If testing: Report success or failure. If it fails, help the user debug (check URL, permissions, etc.). Step 9: Confirm Display the final configuration summary: Environment Variable Alternative Users can skip this wizard entirely by setting env vars in their shell profile: Webhook method: Bot API method: Env vars are auto detected by the notification system without needing .omc config.json . Slack Setup Set up Slack notifications so OMC can message you when sessions end, need input, or complete background tasks. How This Skill Works This is an interactive, natural language configuration skill. Walk the user through setup by asking questions with AskUserQuestion. Write the result to ${CLAUDE CONFIG DIR: ~/.claude}/.omc config.json . Step 1: Detect Existing Configuration If existing config is found, show the user what's currently configured and ask if they want to update or reconfigure. Step 2: Create a Slack Incoming Webhook Guide the user through creating a webhook if they don't have one: Step 3: Collect Webhook URL Use AskUserQuestion: Question: "Paste your Slack incoming webhook URL (starts with https://hooks.slack.com/services/...)" The user will type their webhook URL in the "Other" field. Validate the URL: Must start with https://hooks.slack.com/services/ If invalid, explain the format and ask again Step 4: Configure Mention (User/Group Ping) Use AskUserQuestion: Question: "Would you like notifications to mention (ping) someone?" Options: 1. Yes, mention a user Tag a specific user by their Slack member ID 2. Yes, mention a channel Use @channel to notify everyone in the channel 3. Yes, mention @here Notify only active members in the channel 4. No mentions Just post the message without pinging anyone If user wants to mention a user: Ask: "What is the Slack member ID to mention? (Click on a user's profile More (⋯) Copy member ID)" The mention format is: <@MEMBER ID (e.g., <@U1234567890 ) If user wants @channel: The mention format is: <!channel If user wants @here: The mention format is: <!here Step 5: Configure Events Use AskUserQuestion with multiSelect: Question: "Which events should trigger Slack notifications?" Options (multiSelect: true): 1. Session end (Recommended) When a Claude session finishes 2. Input needed When Claude is waiting for your response (great for long running tasks) 3. Session start When a new session begins 4. Session continuing When a persistent mode keeps the session alive Default selection: session end + ask user question. Step 6: Optional Channel Override Use AskUserQuestion: Question: "Override the default notification channel? (The webhook already has a default channel)" Options: 1. Use webhook default (Recommended) Post to the channel selected during webhook setup 2. Override channel Specify a different channel (e.g., alerts) If override, ask for the channel name (e.g., alerts ). Step 7: Optional Username Override Use AskUserQuestion: Question: "Custom bot display name? (Shows as the webhook sender name in Slack)" Options: 1. OMC (default) Display as "OMC" 2. Claude Code Display as "Claude Code" 3. Custom Enter a custom name Step 8: Write Configuration Read the existing config, merge the new Slack settings, and write back: Add event specific config if user didn't select all events: For each event NOT selected, disable it: Step 9: Test the Configuration After writing config, offer to send a test notification: Use AskUserQuestion: Question: "Send a test notification to verify the setup?" Options: 1. Yes, test now (Recommended) Send a test message to your Slack channel 2. No, I'll test later Skip testing If testing: Report success or failure. Common issues: 403 Forbidden : Webhook URL is invalid or revoked 404 Not Found : Webhook URL is incorrect channel not found : Channel override is invalid Network error : Check connectivity to hooks.slack.com Step 10: Confirm Display the final configuration summary: Environment Variable Alternative Users can skip this wizard entirely by setting env vars in their shell profile: Env vars are auto detected by the notification system without needing .omc config.json . Slack Mention Formats Type Format Example User <@MEMBER ID <@U1234567890