[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75CFG7VXC3XQZXRK7BBWXRG":3,"skill-same:01M75CFG7VXC3XQZXRK7BBWXRG":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":39,"repositoryHtmlUrl":40,"repositoryHomepageUrl":41,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M75CFG7VXC3XQZXRK7BBWXRG","configure-notifications",null,"Configure notification integrations (Telegram, Discord, Slack) via natural language","agisota\u002Fold-one","agisota","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F121413592?v=4","01M75B4BRNT67EC1NDRT8QZEP2","01M75B4BS7QR9VP580MSCPTS3X",3,"MIT","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fconfigure-notifications\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: configure-notifications\ndescription: Configure notification integrations (Telegram, Discord, Slack) via natural language\ntriggers:\n  - \"configure notifications\"\n  - \"setup notifications\"\n  - \"configure telegram\"\n  - \"setup telegram\"\n  - \"telegram bot\"\n  - \"configure discord\"\n  - \"setup discord\"\n  - \"discord webhook\"\n  - \"configure slack\"\n  - \"setup slack\"\n  - \"slack webhook\"\nlevel: 2\n---\n\n# Configure Notifications\n\nSet up OMC notification integrations so you're alerted when sessions end, need input, or complete background tasks.\n\n## Routing\n\nDetect which provider the user wants based on their request or argument:\n- If the trigger or argument contains \"telegram\" → follow the **Telegram** section\n- If the trigger or argument contains \"discord\" → follow the **Discord** section\n- If the trigger or argument contains \"slack\" → follow the **Slack** section\n- If no provider is specified, use AskUserQuestion:\n\n**Question:** \"Which notification service would you like to configure?\"\n\n**Options:**\n1. **Telegram** - Bot token + chat ID. Works on mobile and desktop.\n2. **Discord** - Webhook or bot token + channel ID.\n3. **Slack** - Incoming webhook URL.\n\n---\n\n## Telegram Setup\n\nSet up Telegram notifications so OMC can message you when sessions end, need input, or complete background tasks.\n\n### How This Skill Works\n\nThis is an interactive, natural-language configuration skill. Walk the user through setup by asking questions with AskUserQuestion. Write the result to `${CLAUDE_CONFIG_DIR:-~\u002F.claude}\u002F.omc-config.json`.\n\n### Step 1: Detect Existing Configuration\n\n```bash\nCONFIG_FILE=\"${CLAUDE_CONFIG_DIR:-$HOME\u002F.claude}\u002F.omc-config.json\"\n\nif [ -f \"$CONFIG_FILE\" ]; then\n  HAS_TELEGRAM=$(jq -r '.notifications.telegram.enabled \u002F\u002F false' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n  CHAT_ID=$(jq -r '.notifications.telegram.chatId \u002F\u002F empty' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n  PARSE_MODE=$(jq -r '.notifications.telegram.parseMode \u002F\u002F \"Markdown\"' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n\n  if [ \"$HAS_TELEGRAM\" = \"true\" ]; then\n    echo \"EXISTING_CONFIG=true\"\n    echo \"CHAT_ID=$CHAT_ID\"\n    echo \"PARSE_MODE=$PARSE_MODE\"\n  else\n    echo \"EXISTING_CONFIG=false\"\n  fi\nelse\n  echo \"NO_CONFIG_FILE\"\nfi\n```\n\nIf existing config is found, show the user what's currently configured and ask if they want to update or reconfigure.\n\n### Step 2: Create a Telegram Bot\n\nGuide the user through creating a bot if they don't have one:\n\n```\nTo set up Telegram notifications, you need a Telegram bot token and your chat ID.\n\nCREATE A BOT (if you don't have one):\n1. Open Telegram and search for @BotFather\n2. Send \u002Fnewbot\n3. Choose a name (e.g., \"My OMC Notifier\")\n4. Choose a username (e.g., \"my_omc_bot\")\n5. BotFather will give you a token like: 123456789:ABCdefGHIjklMNOpqrsTUVwxyz\n\nGET YOUR CHAT ID:\n1. Start a chat with your new bot (send \u002Fstart)\n2. Visit: https:\u002F\u002Fapi.telegram.org\u002Fbot\u003CYOUR_TOKEN>\u002FgetUpdates\n3. Look for \"chat\":{\"id\":YOUR_CHAT_ID}\n   - Personal chat IDs are positive numbers (e.g., 123456789)\n   - Group chat IDs are negative numbers (e.g., -1001234567890)\n```\n\n### Step 3: Collect Bot Token\n\nUse AskUserQuestion:\n\n**Question:** \"Paste your Telegram bot token (from @BotFather)\"\n\nThe user will type their token in the \"Other\" field.\n\n**Validate** the token:\n- Must match pattern: `digits:alphanumeric` (e.g., `123456789:ABCdefGHI...`)\n- If invalid, explain the format and ask again\n\n### Step 4: Collect Chat ID\n\nUse AskUserQuestion:\n\n**Question:** \"Paste your Telegram chat ID (the number from getUpdates API)\"\n\nThe user will type their chat ID in the \"Other\" field.\n\n**Validate** the chat ID:\n- Must be a number (positive for personal, negative for groups)\n- If invalid, offer to help them find it:\n\n```bash\n# Help user find their chat ID\nBOT_TOKEN=\"USER_PROVIDED_TOKEN\"\necho \"Fetching recent messages to find your chat ID...\"\ncurl -s \"https:\u002F\u002Fapi.telegram.org\u002Fbot${BOT_TOKEN}\u002FgetUpdates\" | jq '.result[-1].message.chat.id \u002F\u002F .result[-1].message.from.id \u002F\u002F \"No messages found - send \u002Fstart to your bot first\"'\n```\n\n### Step 5: Choose Parse Mode\n\nUse AskUserQuestion:\n\n**Question:** \"Which message format do you prefer?\"\n\n**Options:**\n1. **Markdown (Recommended)** - Bold, italic, code blocks with Markdown syntax\n2. **HTML** - Bold, italic, code with HTML tags\n\n### Step 6: Configure Events\n\nUse AskUserQuestion with multiSelect:\n\n**Question:** \"Which events should trigger Telegram notifications?\"\n\n**Options (multiSelect: true):**\n1. **Session end (Recommended)** - When a Claude session finishes\n2. **Input needed** - When Claude is waiting for your response (great for long-running tasks)\n3. **Session start** - When a new session begins\n4. **Session continuing** - When a persistent mode keeps the session alive\n\nDefault selection: session-end + ask-user-question.\n\n### Step 7: Write Configuration\n\nRead the existing config, merge the new Telegram settings, and write back:\n\n```bash\nCONFIG_FILE=\"${CLAUDE_CONFIG_DIR:-$HOME\u002F.claude}\u002F.omc-config.json\"\nmkdir -p \"$(dirname \"$CONFIG_FILE\")\"\n\nif [ -f \"$CONFIG_FILE\" ]; then\n  EXISTING=$(cat \"$CONFIG_FILE\")\nelse\n  EXISTING='{}'\nfi\n\n# BOT_TOKEN, CHAT_ID, PARSE_MODE are collected from user\necho \"$EXISTING\" | jq \\\n  --arg token \"$BOT_TOKEN\" \\\n  --arg chatId \"$CHAT_ID\" \\\n  --arg parseMode \"$PARSE_MODE\" \\\n  '.notifications = (.notifications \u002F\u002F {enabled: true}) |\n   .notifications.enabled = true |\n   .notifications.telegram = {\n     enabled: true,\n     botToken: $token,\n     chatId: $chatId,\n     parseMode: $parseMode\n   }' > \"$CONFIG_FILE\"\n```\n\n#### Add event-specific config if user didn't select all events:\n\nFor each event NOT selected, disable it:\n\n```bash\n# Example: disable session-start if not selected\necho \"$(cat \"$CONFIG_FILE\")\" | jq \\\n  '.notifications.events = (.notifications.events \u002F\u002F {}) |\n   .notifications.events[\"session-start\"] = {enabled: false}' > \"$CONFIG_FILE\"\n```\n\n### Step 8: Test the Configuration\n\nAfter writing config, offer to send a test notification:\n\nUse AskUserQuestion:\n\n**Question:** \"Send a test notification to verify the setup?\"\n\n**Options:**\n1. **Yes, test now (Recommended)** - Send a test message to your Telegram chat\n2. **No, I'll test later** - Skip testing\n\n#### If testing:\n\n```bash\nBOT_TOKEN=\"USER_PROVIDED_TOKEN\"\nCHAT_ID=\"USER_PROVIDED_CHAT_ID\"\nPARSE_MODE=\"Markdown\"\n\nRESPONSE=$(curl -s -w \"\\n%{http_code}\" \\\n  \"https:\u002F\u002Fapi.telegram.org\u002Fbot${BOT_TOKEN}\u002FsendMessage\" \\\n  -d \"chat_id=${CHAT_ID}\" \\\n  -d \"parse_mode=${PARSE_MODE}\" \\\n  -d \"text=OMC test notification - Telegram is configured!\")\n\nHTTP_CODE=$(echo \"$RESPONSE\" | tail -1)\nBODY=$(echo \"$RESPONSE\" | head -1)\n\nif [ \"$HTTP_CODE\" = \"200\" ]; then\n  echo \"Test notification sent successfully!\"\nelse\n  echo \"Failed (HTTP $HTTP_CODE):\"\n  echo \"$BODY\" | jq -r '.description \u002F\u002F \"Unknown error\"' 2>\u002Fdev\u002Fnull || echo \"$BODY\"\nfi\n```\n\nReport success or failure. Common issues:\n- **401 Unauthorized**: Bot token is invalid\n- **400 Bad Request: chat not found**: Chat ID is wrong, or user hasn't sent `\u002Fstart` to the bot\n- **Network error**: Check connectivity to api.telegram.org\n\n### Step 9: Confirm\n\nDisplay the final configuration summary:\n\n```\nTelegram Notifications Configured!\n\n  Bot:        @your_bot_username\n  Chat ID:    123456789\n  Format:     Markdown\n  Events:     session-end, ask-user-question\n\nConfig saved to: ~\u002F.claude\u002F.omc-config.json\n\nYou can also set these via environment variables:\n  OMC_TELEGRAM_BOT_TOKEN=123456789:ABCdefGHI...\n  OMC_TELEGRAM_CHAT_ID=123456789\n\nTo reconfigure: \u002Foh-my-claudecode:configure-notifications telegram\nTo configure Discord: \u002Foh-my-claudecode:configure-notifications discord\nTo configure Slack: \u002Foh-my-claudecode:configure-notifications slack\n```\n\n### Environment Variable Alternative\n\nUsers can skip this wizard entirely by setting env vars in their shell profile:\n\n```bash\nexport OMC_TELEGRAM_BOT_TOKEN=\"123456789:ABCdefGHIjklMNOpqrsTUVwxyz\"\nexport OMC_TELEGRAM_CHAT_ID=\"123456789\"\n```\n\nEnv vars are auto-detected by the notification system without needing `.omc-config.json`.\n\n---\n\n## Discord Setup\n\nSet up Discord notifications so OMC can ping you when sessions end, need input, or complete background tasks.\n\n### How This Skill Works\n\nThis is an interactive, natural-language configuration skill. Walk the user through setup by asking questions with AskUserQuestion. Write the result to `${CLAUDE_CONFIG_DIR:-~\u002F.claude}\u002F.omc-config.json`.\n\n### Step 1: Detect Existing Configuration\n\n```bash\nCONFIG_FILE=\"${CLAUDE_CONFIG_DIR:-$HOME\u002F.claude}\u002F.omc-config.json\"\n\nif [ -f \"$CONFIG_FILE\" ]; then\n  # Check for existing discord config\n  HAS_DISCORD=$(jq -r '.notifications.discord.enabled \u002F\u002F false' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n  HAS_DISCORD_BOT=$(jq -r '.notifications[\"discord-bot\"].enabled \u002F\u002F false' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n  WEBHOOK_URL=$(jq -r '.notifications.discord.webhookUrl \u002F\u002F empty' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n  MENTION=$(jq -r '.notifications.discord.mention \u002F\u002F empty' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n\n  if [ \"$HAS_DISCORD\" = \"true\" ] || [ \"$HAS_DISCORD_BOT\" = \"true\" ]; then\n    echo \"EXISTING_CONFIG=true\"\n    echo \"WEBHOOK_CONFIGURED=$HAS_DISCORD\"\n    echo \"BOT_CONFIGURED=$HAS_DISCORD_BOT\"\n    [ -n \"$WEBHOOK_URL\" ] && echo \"WEBHOOK_URL=$WEBHOOK_URL\"\n    [ -n \"$MENTION\" ] && echo \"MENTION=$MENTION\"\n  else\n    echo \"EXISTING_CONFIG=false\"\n  fi\nelse\n  echo \"NO_CONFIG_FILE\"\nfi\n```\n\nIf existing config is found, show the user what's currently configured and ask if they want to update or reconfigure.\n\n### Step 2: Choose Discord Method\n\nUse AskUserQuestion:\n\n**Question:** \"How would you like to send Discord notifications?\"\n\n**Options:**\n1. **Webhook (Recommended)** - Create a webhook in your Discord channel. Simple, no bot needed. Just paste the URL.\n2. **Bot API** - Use a Discord bot token + channel ID. More flexible, requires a bot application.\n\n### Step 3A: Webhook Setup\n\nIf user chose Webhook:\n\nUse AskUserQuestion:\n\n**Question:** \"Paste your Discord webhook URL. To create one: Server Settings > Integrations > Webhooks > New Webhook > Copy URL\"\n\nThe user will type their webhook URL in the \"Other\" field.\n\n**Validate** the URL:\n- Must start with `https:\u002F\u002Fdiscord.com\u002Fapi\u002Fwebhooks\u002F` or `https:\u002F\u002Fdiscordapp.com\u002Fapi\u002Fwebhooks\u002F`\n- If invalid, explain the format and ask again\n\n### Step 3B: Bot API Setup\n\nIf user chose Bot API:\n\nAsk two questions:\n\n1. **\"Paste your Discord bot token\"** - From discord.com\u002Fdevelopers > Your App > Bot > Token\n2. **\"Paste the channel ID\"** - Right-click channel > Copy Channel ID (requires Developer Mode)\n\n### Step 4: Configure Mention (User Ping)\n\nUse AskUserQuestion:\n\n**Question:** \"Would you like notifications to mention (ping) someone?\"\n\n**Options:**\n1. **Yes, mention a user** - Tag a specific user by their Discord user ID\n2. **Yes, mention a role** - Tag a role by its role ID\n3. **No mentions** - Just post the message without pinging anyone\n\n#### If user wants to mention a user:\n\nAsk: \"What is the Discord user ID to mention? (Right-click user > Copy User ID, requires Developer Mode)\"\n\nThe mention format is: `\u003C@USER_ID>` (e.g., `\u003C@1465264645320474637>`)\n\n#### If user wants to mention a role:\n\nAsk: \"What is the Discord role ID to mention? (Server Settings > Roles > right-click role > Copy Role ID)\"\n\nThe mention format is: `\u003C@&ROLE_ID>` (e.g., `\u003C@&123456789>`)\n\n### Step 5: Configure Events\n\nUse AskUserQuestion with multiSelect:\n\n**Question:** \"Which events should trigger Discord notifications?\"\n\n**Options (multiSelect: true):**\n1. **Session end (Recommended)** - When a Claude session finishes\n2. **Input needed** - When Claude is waiting for your response (great for long-running tasks)\n3. **Session start** - When a new session begins\n4. **Session continuing** - When a persistent mode keeps the session alive\n\nDefault selection: session-end + ask-user-question.\n\n### Step 6: Optional Username Override\n\nUse AskUserQuestion:\n\n**Question:** \"Custom bot display name? (Shows as the webhook sender name in Discord)\"\n\n**Options:**\n1. **OMC (default)** - Display as \"OMC\"\n2. **Claude Code** - Display as \"Claude Code\"\n3. **Custom** - Enter a custom name\n\n### Step 7: Write Configuration\n\nRead the existing config, merge the new Discord settings, and write back:\n\n```bash\nCONFIG_FILE=\"${CLAUDE_CONFIG_DIR:-$HOME\u002F.claude}\u002F.omc-config.json\"\nmkdir -p \"$(dirname \"$CONFIG_FILE\")\"\n\nif [ -f \"$CONFIG_FILE\" ]; then\n  EXISTING=$(cat \"$CONFIG_FILE\")\nelse\n  EXISTING='{}'\nfi\n```\n\n#### For Webhook method:\n\nBuild the notifications object with the collected values and merge into `.omc-config.json` using jq:\n\n```bash\n# WEBHOOK_URL, MENTION, USERNAME are collected from user\n# EVENTS is the list of enabled events\n\necho \"$EXISTING\" | jq \\\n  --arg url \"$WEBHOOK_URL\" \\\n  --arg mention \"$MENTION\" \\\n  --arg username \"$USERNAME\" \\\n  '.notifications = (.notifications \u002F\u002F {enabled: true}) |\n   .notifications.enabled = true |\n   .notifications.discord = {\n     enabled: true,\n     webhookUrl: $url,\n     mention: (if $mention == \"\" then null else $mention end),\n     username: (if $username == \"\" then null else $username end)\n   }' > \"$CONFIG_FILE\"\n```\n\n#### For Bot API method:\n\n```bash\necho \"$EXISTING\" | jq \\\n  --arg token \"$BOT_TOKEN\" \\\n  --arg channel \"$CHANNEL_ID\" \\\n  --arg mention \"$MENTION\" \\\n  '.notifications = (.notifications \u002F\u002F {enabled: true}) |\n   .notifications.enabled = true |\n   .notifications[\"discord-bot\"] = {\n     enabled: true,\n     botToken: $token,\n     channelId: $channel,\n     mention: (if $mention == \"\" then null else $mention end)\n   }' > \"$CONFIG_FILE\"\n```\n\n#### Add event-specific config if user didn't select all events:\n\nFor each event NOT selected, disable it:\n\n```bash\n# Example: disable session-start if not selected\necho \"$(cat \"$CONFIG_FILE\")\" | jq \\\n  '.notifications.events = (.notifications.events \u002F\u002F {}) |\n   .notifications.events[\"session-start\"] = {enabled: false}' > \"$CONFIG_FILE\"\n```\n\n### Step 8: Test the Configuration\n\nAfter writing config, offer to send a test notification:\n\nUse AskUserQuestion:\n\n**Question:** \"Send a test notification to verify the setup?\"\n\n**Options:**\n1. **Yes, test now (Recommended)** - Send a test message to your Discord channel\n2. **No, I'll test later** - Skip testing\n\n#### If testing:\n\n```bash\n# For webhook:\ncurl -s -o \u002Fdev\u002Fnull -w \"%{http_code}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d \"{\\\"content\\\": \\\"${MENTION:+$MENTION\\\\n}OMC test notification - Discord is configured!\\\"}\" \\\n  \"$WEBHOOK_URL\"\n```\n\nReport success or failure. If it fails, help the user debug (check URL, permissions, etc.).\n\n### Step 9: Confirm\n\nDisplay the final configuration summary:\n\n```\nDiscord Notifications Configured!\n\n  Method:   Webhook \u002F Bot API\n  Mention:  \u003C@1465264645320474637> (or \"none\")\n  Events:   session-end, ask-user-question\n  Username: OMC\n\nConfig saved to: ~\u002F.claude\u002F.omc-config.json\n\nYou can also set these via environment variables:\n  OMC_DISCORD_WEBHOOK_URL=https:\u002F\u002Fdiscord.com\u002Fapi\u002Fwebhooks\u002F...\n  OMC_DISCORD_MENTION=\u003C@1465264645320474637>\n\nTo reconfigure: \u002Foh-my-claudecode:configure-notifications discord\nTo configure Telegram: \u002Foh-my-claudecode:configure-notifications telegram\nTo configure Slack: \u002Foh-my-claudecode:configure-notifications slack\n```\n\n### Environment Variable Alternative\n\nUsers can skip this wizard entirely by setting env vars in their shell profile:\n\n**Webhook method:**\n```bash\nexport OMC_DISCORD_WEBHOOK_URL=\"https:\u002F\u002Fdiscord.com\u002Fapi\u002Fwebhooks\u002F...\"\nexport OMC_DISCORD_MENTION=\"\u003C@1465264645320474637>\"  # optional\n```\n\n**Bot API method:**\n```bash\nexport OMC_DISCORD_NOTIFIER_BOT_TOKEN=\"your-bot-token\"\nexport OMC_DISCORD_NOTIFIER_CHANNEL=\"your-channel-id\"\nexport OMC_DISCORD_MENTION=\"\u003C@1465264645320474637>\"  # optional\n```\n\nEnv vars are auto-detected by the notification system without needing `.omc-config.json`.\n\n---\n\n## Slack Setup\n\nSet up Slack notifications so OMC can message you when sessions end, need input, or complete background tasks.\n\n### How This Skill Works\n\nThis is an interactive, natural-language configuration skill. Walk the user through setup by asking questions with AskUserQuestion. Write the result to `${CLAUDE_CONFIG_DIR:-~\u002F.claude}\u002F.omc-config.json`.\n\n### Step 1: Detect Existing Configuration\n\n```bash\nCONFIG_FILE=\"${CLAUDE_CONFIG_DIR:-$HOME\u002F.claude}\u002F.omc-config.json\"\n\nif [ -f \"$CONFIG_FILE\" ]; then\n  HAS_SLACK=$(jq -r '.notifications.slack.enabled \u002F\u002F false' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n  WEBHOOK_URL=$(jq -r '.notifications.slack.webhookUrl \u002F\u002F empty' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n  MENTION=$(jq -r '.notifications.slack.mention \u002F\u002F empty' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n  CHANNEL=$(jq -r '.notifications.slack.channel \u002F\u002F empty' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n\n  if [ \"$HAS_SLACK\" = \"true\" ]; then\n    echo \"EXISTING_CONFIG=true\"\n    [ -n \"$WEBHOOK_URL\" ] && echo \"WEBHOOK_URL=$WEBHOOK_URL\"\n    [ -n \"$MENTION\" ] && echo \"MENTION=$MENTION\"\n    [ -n \"$CHANNEL\" ] && echo \"CHANNEL=$CHANNEL\"\n  else\n    echo \"EXISTING_CONFIG=false\"\n  fi\nelse\n  echo \"NO_CONFIG_FILE\"\nfi\n```\n\nIf existing config is found, show the user what's currently configured and ask if they want to update or reconfigure.\n\n### Step 2: Create a Slack Incoming Webhook\n\nGuide the user through creating a webhook if they don't have one:\n\n```\nTo set up Slack notifications, you need a Slack incoming webhook URL.\n\nCREATE A WEBHOOK:\n1. Go to https:\u002F\u002Fapi.slack.com\u002Fapps\n2. Click \"Create New App\" > \"From scratch\"\n3. Name your app (e.g., \"OMC Notifier\") and select your workspace\n4. Go to \"Incoming Webhooks\" in the left sidebar\n5. Toggle \"Activate Incoming Webhooks\" to ON\n6. Click \"Add New Webhook to Workspace\"\n7. Select the channel where notifications should be posted\n8. Copy the webhook URL (starts with https:\u002F\u002Fhooks.slack.com\u002Fservices\u002F...)\n```\n\n### Step 3: Collect Webhook URL\n\nUse AskUserQuestion:\n\n**Question:** \"Paste your Slack incoming webhook URL (starts with https:\u002F\u002Fhooks.slack.com\u002Fservices\u002F...)\"\n\nThe user will type their webhook URL in the \"Other\" field.\n\n**Validate** the URL:\n- Must start with `https:\u002F\u002Fhooks.slack.com\u002Fservices\u002F`\n- If invalid, explain the format and ask again\n\n### Step 4: Configure Mention (User\u002FGroup Ping)\n\nUse AskUserQuestion:\n\n**Question:** \"Would you like notifications to mention (ping) someone?\"\n\n**Options:**\n1. **Yes, mention a user** - Tag a specific user by their Slack member ID\n2. **Yes, mention a channel** - Use @channel to notify everyone in the channel\n3. **Yes, mention @here** - Notify only active members in the channel\n4. **No mentions** - Just post the message without pinging anyone\n\n#### If user wants to mention a user:\n\nAsk: \"What is the Slack member ID to mention? (Click on a user's profile > More (⋯) > Copy member ID)\"\n\nThe mention format is: `\u003C@MEMBER_ID>` (e.g., `\u003C@U1234567890>`)\n\n#### If user wants @channel:\n\nThe mention format is: `\u003C!channel>`\n\n#### If user wants @here:\n\nThe mention format is: `\u003C!here>`\n\n### Step 5: Configure Events\n\nUse AskUserQuestion with multiSelect:\n\n**Question:** \"Which events should trigger Slack notifications?\"\n\n**Options (multiSelect: true):**\n1. **Session end (Recommended)** - When a Claude session finishes\n2. **Input needed** - When Claude is waiting for your response (great for long-running tasks)\n3. **Session start** - When a new session begins\n4. **Session continuing** - When a persistent mode keeps the session alive\n\nDefault selection: session-end + ask-user-question.\n\n### Step 6: Optional Channel Override\n\nUse AskUserQuestion:\n\n**Question:** \"Override the default notification channel? (The webhook already has a default channel)\"\n\n**Options:**\n1. **Use webhook default (Recommended)** - Post to the channel selected during webhook setup\n2. **Override channel** - Specify a different channel (e.g., #alerts)\n\nIf override, ask for the channel name (e.g., `#alerts`).\n\n### Step 7: Optional Username Override\n\nUse AskUserQuestion:\n\n**Question:** \"Custom bot display name? (Shows as the webhook sender name in Slack)\"\n\n**Options:**\n1. **OMC (default)** - Display as \"OMC\"\n2. **Claude Code** - Display as \"Claude Code\"\n3. **Custom** - Enter a custom name\n\n### Step 8: Write Configuration\n\nRead the existing config, merge the new Slack settings, and write back:\n\n```bash\nCONFIG_FILE=\"${CLAUDE_CONFIG_DIR:-$HOME\u002F.claude}\u002F.omc-config.json\"\nmkdir -p \"$(dirname \"$CONFIG_FILE\")\"\n\nif [ -f \"$CONFIG_FILE\" ]; then\n  EXISTING=$(cat \"$CONFIG_FILE\")\nelse\n  EXISTING='{}'\nfi\n\n# WEBHOOK_URL, MENTION, USERNAME, CHANNEL are collected from user\necho \"$EXISTING\" | jq \\\n  --arg url \"$WEBHOOK_URL\" \\\n  --arg mention \"$MENTION\" \\\n  --arg username \"$USERNAME\" \\\n  --arg channel \"$CHANNEL\" \\\n  '.notifications = (.notifications \u002F\u002F {enabled: true}) |\n   .notifications.enabled = true |\n   .notifications.slack = {\n     enabled: true,\n     webhookUrl: $url,\n     mention: (if $mention == \"\" then null else $mention end),\n     username: (if $username == \"\" then null else $username end),\n     channel: (if $channel == \"\" then null else $channel end)\n   }' > \"$CONFIG_FILE\"\n```\n\n#### Add event-specific config if user didn't select all events:\n\nFor each event NOT selected, disable it:\n\n```bash\n# Example: disable session-start if not selected\necho \"$(cat \"$CONFIG_FILE\")\" | jq \\\n  '.notifications.events = (.notifications.events \u002F\u002F {}) |\n   .notifications.events[\"session-start\"] = {enabled: false}' > \"$CONFIG_FILE\"\n```\n\n### Step 9: Test the Configuration\n\nAfter writing config, offer to send a test notification:\n\nUse AskUserQuestion:\n\n**Question:** \"Send a test notification to verify the setup?\"\n\n**Options:**\n1. **Yes, test now (Recommended)** - Send a test message to your Slack channel\n2. **No, I'll test later** - Skip testing\n\n#### If testing:\n\n```bash\n# For webhook:\nMENTION_PREFIX=\"\"\nif [ -n \"$MENTION\" ]; then\n  MENTION_PREFIX=\"${MENTION}\\n\"\nfi\n\ncurl -s -o \u002Fdev\u002Fnull -w \"%{http_code}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d \"{\\\"text\\\": \\\"${MENTION_PREFIX}OMC test notification - Slack is configured!\\\"}\" \\\n  \"$WEBHOOK_URL\"\n```\n\nReport success or failure. Common issues:\n- **403 Forbidden**: Webhook URL is invalid or revoked\n- **404 Not Found**: Webhook URL is incorrect\n- **channel_not_found**: Channel override is invalid\n- **Network error**: Check connectivity to hooks.slack.com\n\n### Step 10: Confirm\n\nDisplay the final configuration summary:\n\n```\nSlack Notifications Configured!\n\n  Webhook:  https:\u002F\u002Fhooks.slack.com\u002Fservices\u002FT00\u002FB00\u002Fxxx...\n  Mention:  \u003C@U1234567890> (or \"none\")\n  Channel:  #alerts (or \"webhook default\")\n  Events:   session-end, ask-user-question\n  Username: OMC\n\nConfig saved to: ~\u002F.claude\u002F.omc-config.json\n\nYou can also set these via environment variables:\n  OMC_SLACK_WEBHOOK_URL=https:\u002F\u002Fhooks.slack.com\u002Fservices\u002F...\n  OMC_SLACK_MENTION=\u003C@U1234567890>\n\nTo reconfigure: \u002Foh-my-claudecode:configure-notifications slack\nTo configure Discord: \u002Foh-my-claudecode:configure-notifications discord\nTo configure Telegram: \u002Foh-my-claudecode:configure-notifications telegram\n```\n\n### Environment Variable Alternative\n\nUsers can skip this wizard entirely by setting env vars in their shell profile:\n\n```bash\nexport OMC_SLACK_WEBHOOK_URL=\"https:\u002F\u002Fhooks.slack.com\u002Fservices\u002FT00\u002FB00\u002Fxxx\"\nexport OMC_SLACK_MENTION=\"\u003C@U1234567890>\"  # optional\n```\n\nEnv vars are auto-detected by the notification system without needing `.omc-config.json`.\n\n### Slack Mention Formats\n\n| Type | Format | Example |\n|------|--------|---------|\n| User | `\u003C@MEMBER_ID>` | `\u003C@U1234567890>` |\n| Channel | `\u003C!channel>` | `\u003C!channel>` |\n| Here | `\u003C!here>` | `\u003C!here>` |\n| Everyone | `\u003C!everyone>` | `\u003C!everyone>` |\n| User Group | `\u003C!subteam^GROUP_ID>` | `\u003C!subteam^S1234567890>` |\n\n---\n\n## Platform Activation Flags\n\nAll notification platforms require activation via CLI flags per session:\n\n- `omc --telegram` — Activates Telegram notifications (sets `OMC_TELEGRAM=1`)\n- `omc --discord` — Activates Discord notifications (sets `OMC_DISCORD=1`)\n- `omc --slack` — Activates Slack notifications (sets `OMC_SLACK=1`)\n- `omc --webhook` — Activates webhook notifications (sets `OMC_WEBHOOK=1`)\n- `omc --openclaw` — Activates OpenClaw gateway integration (sets `OMC_OPENCLAW=1`)\n\nWithout these flags, configured platforms remain dormant. This prevents unwanted notifications during development while keeping configuration persistent.\n\n**Examples:**\n- `omc --telegram --discord` — Telegram + Discord active\n- `omc --telegram --slack --webhook` — Telegram + Slack + Webhook active\n- `omc --telegram --openclaw` — Telegram + OpenClaw active\n- `omc` — No notifications sent (all platforms require explicit activation)\n\n---\n\n## Hook Event Templates\n\nCustomize notification messages per event and per platform using `omc_config.hook.json`.\n\n### Routing\n\nIf the trigger or argument contains \"hook\", \"template\", or \"customize messages\" → follow this section.\n\n### Step 1: Detect Existing Hook Config\n\nCheck if `${CLAUDE_CONFIG_DIR:-~\u002F.claude}\u002Fomc_config.hook.json` exists. If it does, show the current configuration. If not, explain what it does.\n\n```\nHook event templates let you customize the notification messages sent to each platform.\nYou can set different messages for Discord vs Telegram vs Slack, and control which\nevents fire on which platform.\n\nConfig file: ~\u002F.claude\u002Fomc_config.hook.json\n```\n\n### Step 2: Choose Event to Configure\n\nUse AskUserQuestion:\n\n**Question:** \"Which event would you like to configure templates for?\"\n\n**Options:**\n1. **session-end** - When a Claude session finishes (most common)\n2. **ask-user-question** - When Claude is waiting for input\n3. **session-idle** - When Claude finishes and waits for input\n4. **session-start** - When a new session begins\n\n### Step 3: Show Available Variables\n\nDisplay the template variables available for the chosen event:\n\n```\nAvailable template variables:\n\nRAW FIELDS:\n  {{sessionId}}      - Session identifier\n  {{timestamp}}      - ISO timestamp\n  {{tmuxSession}}    - tmux session name\n  {{projectPath}}    - Full project directory path\n  {{projectName}}    - Project directory basename\n  {{reason}}         - Stop\u002Fend reason\n  {{activeMode}}     - Active OMC mode name\n  {{question}}       - Question text (ask-user-question only)\n  {{agentName}}      - Agent name (agent-call only)\n  {{agentType}}      - Agent type (agent-call only)\n\nCOMPUTED (smart formatting):\n  {{duration}}       - Human-readable duration (e.g., \"5m 23s\")\n  {{time}}           - Locale time string\n  {{modesDisplay}}   - Comma-separated modes or empty\n  {{iterationDisplay}} - \"3\u002F10\" format or empty\n  {{agentDisplay}}   - \"2\u002F5 completed\" or empty\n  {{projectDisplay}} - Project name with fallbacks\n  {{footer}}         - tmux + project info line\n  {{tmuxTailBlock}}  - Recent output in code fence or empty\n  {{reasonDisplay}}  - Reason with \"unknown\" fallback\n\nCONDITIONALS:\n  {{#if variableName}}content shown when truthy{{\u002Fif}}\n```\n\n### Step 4: Collect Template\n\nUse AskUserQuestion:\n\n**Question:** \"Enter the message template for this event (use {{variables}} for dynamic content)\"\n\n**Options:**\n1. **Use default template** - Keep the built-in message format\n2. **Simple summary** - Short one-line format\n3. **Custom** - Enter your own template\n\nIf \"Simple summary\", use a pre-built compact template:\n- session-end: `{{projectDisplay}} session ended ({{duration}}) — {{reasonDisplay}}`\n- ask-user-question: `Input needed on {{projectDisplay}}: {{question}}`\n- session-idle: `{{projectDisplay}} is idle. {{#if reason}}Reason: {{reason}}{{\u002Fif}}`\n- session-start: `Session started: {{projectDisplay}} at {{time}}`\n\n### Step 5: Per-Platform Overrides\n\nUse AskUserQuestion:\n\n**Question:** \"Do you want different messages for specific platforms?\"\n\n**Options:**\n1. **No, same for all (Recommended)** - Use the same template everywhere\n2. **Yes, customize per platform** - Set different templates for Discord, Telegram, Slack\n\nIf per-platform: ask for each enabled platform's template separately.\n\n### Step 6: Write Configuration\n\nRead or create `${CLAUDE_CONFIG_DIR:-~\u002F.claude}\u002Fomc_config.hook.json` and merge the new settings:\n\n```json\n{\n  \"version\": 1,\n  \"enabled\": true,\n  \"events\": {\n    \"\u003Cevent-name>\": {\n      \"enabled\": true,\n      \"template\": \"\u003Cuser-provided-template>\",\n      \"platforms\": {\n        \"discord\": { \"template\": \"\u003Cdiscord-specific>\" },\n        \"telegram\": { \"template\": \"\u003Ctelegram-specific>\" }\n      }\n    }\n  }\n}\n```\n\n### Step 7: Validate and Test\n\nValidate the template using `validateTemplate()` to check for unknown variables. If any are found, warn the user and offer to correct.\n\nOffer to send a test notification with the new template.\n\n### Example Config\n\n```json\n{\n  \"version\": 1,\n  \"enabled\": true,\n  \"events\": {\n    \"session-end\": {\n      \"enabled\": true,\n      \"template\": \"Session {{sessionId}} ended after {{duration}}. Reason: {{reasonDisplay}}\",\n      \"platforms\": {\n        \"discord\": {\n          \"template\": \"**Session Complete** | `{{projectDisplay}}` | {{duration}} | {{reasonDisplay}}\"\n        },\n        \"telegram\": {\n          \"template\": \"Done: {{projectDisplay}} ({{duration}})\\n{{#if contextSummary}}Summary: {{contextSummary}}{{\u002Fif}}\"\n        }\n      }\n    },\n    \"ask-user-question\": {\n      \"enabled\": true,\n      \"template\": \"{{#if question}}{{question}}{{\u002Fif}}\\nWaiting for input on {{projectDisplay}}\"\n    }\n  }\n}\n```\n\n---\n\n## Related\n\n- `\u002Foh-my-claudecode:configure-openclaw` — Configure OpenClaw gateway integration\n\n---\n\n## Custom Integration (OpenClaw, n8n, CLI, etc.)\n\nConfigure custom webhooks and CLI commands for services beyond the native Discord\u002FTelegram\u002FSlack integrations.\n\n### Routing\n\nIf the user says \"custom integration\", \"openclaw\", \"n8n\", \"webhook\", \"cli command\", or similar → follow this section.\n\n### Migration from OpenClaw\n\nIf `~\u002F.claude\u002Fomc_config.openclaw.json` exists, detect and offer migration:\n\n**Step 1: Detect Legacy Config**\n```bash\nLEGACY_CONFIG=\"${CLAUDE_CONFIG_DIR:-$HOME\u002F.claude}\u002Fomc_config.openclaw.json\"\nif [ -f \"$LEGACY_CONFIG\" ]; then\n  echo \"LEGACY_FOUND=true\"\n  # Check if already migrated\n  if jq -e '.customIntegrations.integrations[] | select(.preset == \"openclaw\")' \"$CONFIG_FILE\" >\u002Fdev\u002Fnull 2>&1; then\n    echo \"ALREADY_MIGRATED=true\"\n  else\n    echo \"ALREADY_MIGRATED=false\"\n  fi\nelse\n  echo \"LEGACY_FOUND=false\"\nfi\n```\n\n**Step 2: Offer Migration**\nIf legacy found and not migrated:\n\n**Question:** \"Existing OpenClaw configuration detected. Would you like to migrate it to the new format?\"\n\n**Options:**\n1. **Yes, migrate now** - Convert legacy config to custom integration\n2. **No, configure fresh** - Skip migration and start new\n3. **Show me the legacy config first** - Display current OpenClaw settings\n\nIf migrate:\n- Read `omc_config.openclaw.json`\n- Transform to custom integration format\n- Save to `.omc-config.json`\n- Backup legacy to `omc_config.openclaw.json.bak`\n- Show success message\n\n### Custom Integration Wizard\n\n**Step 1: Select Integration Type**\n\n**Question:** \"Which type of custom integration would you like to configure?\"\n\n**Options:**\n1. **OpenClaw Gateway** - Wake external automations and AI agents\n2. **n8n Webhook** - Trigger n8n workflows\n3. **ClawdBot** - Send notifications to ClawdBot\n4. **Generic Webhook** - Custom HTTPS webhook\n5. **Generic CLI Command** - Execute shell command on events\n\n### OpenClaw\u002Fn8n\u002FClawdBot Preset Flow\n\n**Step 2: Gateway URL**\n\n**Question:** \"What is your gateway\u002Fwebhook URL?\"\n\n**Validation:**\n- Must be HTTPS (except localhost for development)\n- Must be valid URL format\n\n**Step 3: Authentication (Optional)**\n\n**Question:** \"Does your gateway require authentication?\"\n\n**Options:**\n1. **Bearer token** - Authorization: Bearer \u003Ctoken>\n2. **Custom header** - Name and value\n3. **No authentication**\n\nIf Bearer: ask for token\nIf Custom: ask for header name and value\n\n**Step 4: Events**\n\nUse AskUserQuestion with multiSelect:\n\n**Question:** \"Which events should trigger this integration?\"\n\n**Options (with defaults from preset):**\n- session-start\n- session-end\n- session-stop\n- session-idle\n- ask-user-question\n\nDefault for OpenClaw: session-start, session-end, stop\nDefault for n8n: session-end, ask-user-question\n\n**Step 5: Test**\n\n**Question:** \"Send a test notification to verify the configuration?\"\n\n**Options:**\n1. **Yes, test now** - Send test webhook\n2. **No, skip test**\n\nIf test:\n```bash\n# For webhook integrations\ncurl -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  ${AUTH_HEADER:+\"-H \\\"$AUTH_HEADER\\\"\"} \\\n  -d '{\"event\":\"test\",\"instruction\":\"OMC test notification\",\"timestamp\":\"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'\"}' \\\n  \"$WEBHOOK_URL\"\n```\n\nShow result (HTTP status, any error).\n\n**Step 6: Write Configuration**\n\nMerge into `.omc-config.json`:\n\n```json\n{\n  \"notifications\": { \u002F* existing native configs *\u002F },\n  \"customIntegrations\": {\n    \"enabled\": true,\n    \"integrations\": [\n      {\n        \"id\": \"my-openclaw\",\n        \"type\": \"webhook\",\n        \"preset\": \"openclaw\",\n        \"enabled\": true,\n        \"config\": {\n          \"url\": \"https:\u002F\u002Fmy-gateway.example.com\u002Fwake\",\n          \"method\": \"POST\",\n          \"headers\": {\n            \"Content-Type\": \"application\u002Fjson\",\n            \"Authorization\": \"Bearer ...\"\n          },\n          \"bodyTemplate\": \"{\\\\\"event\\\\\":\\\\\"{{event}}\\\\\",\\\\\"instruction\\\\\":\\\\\"Session {{sessionId}} {{event}}\\\\\",\\\\\"timestamp\\\\\":\\\\\"{{timestamp}}\\\\\"}\",\n          \"timeout\": 10000\n        },\n        \"events\": [\"session-start\", \"session-end\"]\n      }\n    ]\n  }\n}\n```\n\n### Generic Webhook Flow\n\n**Step 2: URL**\nAsk for webhook URL (HTTPS required).\n\n**Step 3: Method**\nAsk for HTTP method (GET, POST, PUT, PATCH, DELETE). Default: POST.\n\n**Step 4: Headers**\nAsk for headers in \"Name: Value\" format, one per line. Default: Content-Type: application\u002Fjson\n\n**Step 5: Body Template**\nShow available template variables and ask for body template (JSON or other format).\n\nDefault:\n```json\n{\n  \"event\": \"{{event}}\",\n  \"sessionId\": \"{{sessionId}}\",\n  \"projectName\": \"{{projectName}}\",\n  \"timestamp\": \"{{timestamp}}\"\n}\n```\n\n**Step 6: Timeout**\nAsk for timeout in milliseconds (1000-60000). Default: 10000.\n\n**Step 7: Events**\nMulti-select events.\n\n**Step 8: Test and Save**\nSame as preset flow.\n\n### Generic CLI Command Flow\n\n**Step 2: Command**\n\n**Question:** \"What command should be executed? (single executable, no arguments)\"\n\n**Example:** `curl`, `\u002Fusr\u002Flocal\u002Fbin\u002Fmy-script`, `notify-send`\n\n**Validation:**\n- No spaces\n- No shell metacharacters\n\n**Step 3: Arguments**\n\n**Question:** \"Command arguments (use {{variable}} for dynamic values). Enter one per line.\"\n\n**Example:**\n```\n-X\nPOST\n-d\n{\"event\":\"{{event}}\",\"session\":\"{{sessionId}}\"}\nhttps:\u002F\u002Fmy-api.com\u002Fnotify\n```\n\nShow available template variables reference.\n\n**Step 4: Timeout**\nAsk for timeout (1000-60000ms). Default: 5000.\n\n**Step 5: Events**\nMulti-select events.\n\n**Step 6: Test and Save**\n\nFor test, execute command with test values:\n```bash\n$COMMAND \"${ARGS[@]\u002F\u002F{{event}}\u002Ftest}\"\n```\n\nShow stdout\u002Fstderr and exit code.\n\n### Managing Custom Integrations\n\n**List existing:**\n```bash\njq '.customIntegrations.integrations[] | {id, type, preset, enabled, events}' \"$CONFIG_FILE\"\n```\n\n**Disable\u002FEnable:**\n```bash\n# Disable\njq '.customIntegrations.integrations = [.customIntegrations.integrations[] | if .id == \"my-integration\" then .enabled = false else . end]' \"$CONFIG_FILE\"\n\n# Enable\njq '.customIntegrations.integrations = [.customIntegrations.integrations[] | if .id == \"my-integration\" then .enabled = true else . end]' \"$CONFIG_FILE\"\n```\n\n**Remove:**\n```bash\njq '.customIntegrations.integrations = [.customIntegrations.integrations[] | select(.id != \"my-integration\")]' \"$CONFIG_FILE\"\n```\n\n### Template Variables Reference\n\nAll custom integrations support these template variables:\n\n| Variable | Description | Example |\n|----------|-------------|---------|\n| `{{sessionId}}` | Unique session ID | `sess_abc123` |\n| `{{projectPath}}` | Full project path | `\u002Fhome\u002Fuser\u002Fmy-project` |\n| `{{projectName}}` | Project directory name | `my-project` |\n| `{{timestamp}}` | ISO 8601 timestamp | `2026-03-05T14:30:00Z` |\n| `{{event}}` | Event name | `session-end` |\n| `{{duration}}` | Human-readable duration | `45s` |\n| `{{durationMs}}` | Duration in milliseconds | `45000` |\n| `{{reason}}` | Stop\u002Fend reason | `completed` |\n| `{{tmuxSession}}` | tmux session name | `claude:my-project` |\n\nSession-end only:\n- `{{agentsSpawned}}`, `{{agentsCompleted}}`, `{{modesUsed}}`, `{{contextSummary}}`\n\nAsk-user-question only:\n- `{{question}}`\n\n---\n\n## Related\n\n- Template variables: `src\u002Fnotifications\u002Ftemplate-variables.ts`\n- Validation: `src\u002Fnotifications\u002Fvalidation.ts`\n- Presets: `src\u002Fnotifications\u002Fpresets.ts`\n","# Configure Notifications\n\nSet up OMC notification integrations so you're alerted when sessions end, need input, or complete background tasks.\n\n## Routing\n\nDetect which provider the user wants based on their request or argument:\n- If the trigger or argument contains \"telegram\" → follow the **Telegram** section\n- If the trigger or argument contains \"discord\" → follow the **Discord** section\n- If the trigger or argument contains \"slack\" → follow the **Slack** section\n- If no provider is specified, use AskUserQuestion:\n\n**Question:** \"Which notification service would you like to configure?\"\n\n**Options:**\n1. **Telegram** - Bot token + chat ID. Works on mobile and desktop.\n2. **Discord** - Webhook or bot token + channel ID.\n3. **Slack** - Incoming webhook URL.\n\n---\n\n## Telegram Setup\n\nSet up Telegram notifications so OMC can message you when sessions end, need input, or complete background tasks.\n\n### How This Skill Works\n\nThis is an interactive, natural-language configuration skill. Walk the user through setup by asking questions with AskUserQuestion. Write the result to `${CLAUDE_CONFIG_DIR:-~\u002F.claude}\u002F.omc-config.json`.\n\n### Step 1: Detect Existing Configuration\n\n```bash\nCONFIG_FILE=\"${CLAUDE_CONFIG_DIR:-$HOME\u002F.claude}\u002F.omc-config.json\"\n\nif [ -f \"$CONFIG_FILE\" ]; then\n  HAS_TELEGRAM=$(jq -r '.notifications.telegram.enabled \u002F\u002F false' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n  CHAT_ID=$(jq -r '.notifications.telegram.chatId \u002F\u002F empty' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n  PARSE_MODE=$(jq -r '.notifications.telegram.parseMode \u002F\u002F \"Markdown\"' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n\n  if [ \"$HAS_TELEGRAM\" = \"true\" ]; then\n    echo \"EXISTING_CONFIG=true\"\n    echo \"CHAT_ID=$CHAT_ID\"\n    echo \"PARSE_MODE=$PARSE_MODE\"\n  else\n    echo \"EXISTING_CONFIG=false\"\n  fi\nelse\n  echo \"NO_CONFIG_FILE\"\nfi\n```\n\nIf existing config is found, show the user what's currently configured and ask if they want to update or reconfigure.\n\n### Step 2: Create a Telegram Bot\n\nGuide the user through creating a bot if they don't have one:\n\n```\nTo set up Telegram notifications, you need a Telegram bot token and your chat ID.\n\nCREATE A BOT (if you don't have one):\n1. Open Telegram and search for @BotFather\n2. Send \u002Fnewbot\n3. Choose a name (e.g., \"My OMC Notifier\")\n4. Choose a username (e.g., \"my_omc_bot\")\n5. BotFather will give you a token like: 123456789:ABCdefGHIjklMNOpqrsTUVwxyz\n\nGET YOUR CHAT ID:\n1. Start a chat with your new bot (send \u002Fstart)\n2. Visit: https:\u002F\u002Fapi.telegram.org\u002Fbot\u003CYOUR_TOKEN>\u002FgetUpdates\n3. Look for \"chat\":{\"id\":YOUR_CHAT_ID}\n   - Personal chat IDs are positive numbers (e.g., 123456789)\n   - Group chat IDs are negative numbers (e.g., -1001234567890)\n```\n\n### Step 3: Collect Bot Token\n\nUse AskUserQuestion:\n\n**Question:** \"Paste your Telegram bot token (from @BotFather)\"\n\nThe user will type their token in the \"Other\" field.\n\n**Validate** the token:\n- Must match pattern: `digits:alphanumeric` (e.g., `123456789:ABCdefGHI...`)\n- If invalid, explain the format and ask again\n\n### Step 4: Collect Chat ID\n\nUse AskUserQuestion:\n\n**Question:** \"Paste your Telegram chat ID (the number from getUpdates API)\"\n\nThe user will type their chat ID in the \"Other\" field.\n\n**Validate** the chat ID:\n- Must be a number (positive for personal, negative for groups)\n- If invalid, offer to help them find it:\n\n```bash\n# Help user find their chat ID\nBOT_TOKEN=\"USER_PROVIDED_TOKEN\"\necho \"Fetching recent messages to find your chat ID...\"\ncurl -s \"https:\u002F\u002Fapi.telegram.org\u002Fbot${BOT_TOKEN}\u002FgetUpdates\" | jq '.result[-1].message.chat.id \u002F\u002F .result[-1].message.from.id \u002F\u002F \"No messages found - send \u002Fstart to your bot first\"'\n```\n\n### Step 5: Choose Parse Mode\n\nUse AskUserQuestion:\n\n**Question:** \"Which message format do you prefer?\"\n\n**Options:**\n1. **Markdown (Recommended)** - Bold, italic, code blocks with Markdown syntax\n2. **HTML** - Bold, italic, code with HTML tags\n\n### Step 6: Configure Events\n\nUse AskUserQuestion with multiSelect:\n\n**Question:** \"Which events should trigger Telegram notifications?\"\n\n**Options (multiSelect: true):**\n1. **Session end (Recommended)** - When a Claude session finishes\n2. **Input needed** - When Claude is waiting for your response (great for long-running tasks)\n3. **Session start** - When a new session begins\n4. **Session continuing** - When a persistent mode keeps the session alive\n\nDefault selection: session-end + ask-user-question.\n\n### Step 7: Write Configuration\n\nRead the existing config, merge the new Telegram settings, and write back:\n\n```bash\nCONFIG_FILE=\"${CLAUDE_CONFIG_DIR:-$HOME\u002F.claude}\u002F.omc-config.json\"\nmkdir -p \"$(dirname \"$CONFIG_FILE\")\"\n\nif [ -f \"$CONFIG_FILE\" ]; then\n  EXISTING=$(cat \"$CONFIG_FILE\")\nelse\n  EXISTING='{}'\nfi\n\n# BOT_TOKEN, CHAT_ID, PARSE_MODE are collected from user\necho \"$EXISTING\" | jq \\\n  --arg token \"$BOT_TOKEN\" \\\n  --arg chatId \"$CHAT_ID\" \\\n  --arg parseMode \"$PARSE_MODE\" \\\n  '.notifications = (.notifications \u002F\u002F {enabled: true}) |\n   .notifications.enabled = true |\n   .notifications.telegram = {\n     enabled: true,\n     botToken: $token,\n     chatId: $chatId,\n     parseMode: $parseMode\n   }' > \"$CONFIG_FILE\"\n```\n\n#### Add event-specific config if user didn't select all events:\n\nFor each event NOT selected, disable it:\n\n```bash\n# Example: disable session-start if not selected\necho \"$(cat \"$CONFIG_FILE\")\" | jq \\\n  '.notifications.events = (.notifications.events \u002F\u002F {}) |\n   .notifications.events[\"session-start\"] = {enabled: false}' > \"$CONFIG_FILE\"\n```\n\n### Step 8: Test the Configuration\n\nAfter writing config, offer to send a test notification:\n\nUse AskUserQuestion:\n\n**Question:** \"Send a test notification to verify the setup?\"\n\n**Options:**\n1. **Yes, test now (Recommended)** - Send a test message to your Telegram chat\n2. **No, I'll test later** - Skip testing\n\n#### If testing:\n\n```bash\nBOT_TOKEN=\"USER_PROVIDED_TOKEN\"\nCHAT_ID=\"USER_PROVIDED_CHAT_ID\"\nPARSE_MODE=\"Markdown\"\n\nRESPONSE=$(curl -s -w \"\\n%{http_code}\" \\\n  \"https:\u002F\u002Fapi.telegram.org\u002Fbot${BOT_TOKEN}\u002FsendMessage\" \\\n  -d \"chat_id=${CHAT_ID}\" \\\n  -d \"parse_mode=${PARSE_MODE}\" \\\n  -d \"text=OMC test notification - Telegram is configured!\")\n\nHTTP_CODE=$(echo \"$RESPONSE\" | tail -1)\nBODY=$(echo \"$RESPONSE\" | head -1)\n\nif [ \"$HTTP_CODE\" = \"200\" ]; then\n  echo \"Test notification sent successfully!\"\nelse\n  echo \"Failed (HTTP $HTTP_CODE):\"\n  echo \"$BODY\" | jq -r '.description \u002F\u002F \"Unknown error\"' 2>\u002Fdev\u002Fnull || echo \"$BODY\"\nfi\n```\n\nReport success or failure. Common issues:\n- **401 Unauthorized**: Bot token is invalid\n- **400 Bad Request: chat not found**: Chat ID is wrong, or user hasn't sent `\u002Fstart` to the bot\n- **Network error**: Check connectivity to api.telegram.org\n\n### Step 9: Confirm\n\nDisplay the final configuration summary:\n\n```\nTelegram Notifications Configured!\n\n  Bot:        @your_bot_username\n  Chat ID:    123456789\n  Format:     Markdown\n  Events:     session-end, ask-user-question\n\nConfig saved to: ~\u002F.claude\u002F.omc-config.json\n\nYou can also set these via environment variables:\n  OMC_TELEGRAM_BOT_TOKEN=123456789:ABCdefGHI...\n  OMC_TELEGRAM_CHAT_ID=123456789\n\nTo reconfigure: \u002Foh-my-claudecode:configure-notifications telegram\nTo configure Discord: \u002Foh-my-claudecode:configure-notifications discord\nTo configure Slack: \u002Foh-my-claudecode:configure-notifications slack\n```\n\n### Environment Variable Alternative\n\nUsers can skip this wizard entirely by setting env vars in their shell profile:\n\n```bash\nexport OMC_TELEGRAM_BOT_TOKEN=\"123456789:ABCdefGHIjklMNOpqrsTUVwxyz\"\nexport OMC_TELEGRAM_CHAT_ID=\"123456789\"\n```\n\nEnv vars are auto-detected by the notification system without needing `.omc-config.json`.\n\n---\n\n## Discord Setup\n\nSet up Discord notifications so OMC can ping you when sessions end, need input, or complete background tasks.\n\n### How This Skill Works\n\nThis is an interactive, natural-language configuration skill. Walk the user through setup by asking questions with AskUserQuestion. Write the result to `${CLAUDE_CONFIG_DIR:-~\u002F.claude}\u002F.omc-config.json`.\n\n### Step 1: Detect Existing Configuration\n\n```bash\nCONFIG_FILE=\"${CLAUDE_CONFIG_DIR:-$HOME\u002F.claude}\u002F.omc-config.json\"\n\nif [ -f \"$CONFIG_FILE\" ]; then\n  # Check for existing discord config\n  HAS_DISCORD=$(jq -r '.notifications.discord.enabled \u002F\u002F false' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n  HAS_DISCORD_BOT=$(jq -r '.notifications[\"discord-bot\"].enabled \u002F\u002F false' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n  WEBHOOK_URL=$(jq -r '.notifications.discord.webhookUrl \u002F\u002F empty' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n  MENTION=$(jq -r '.notifications.discord.mention \u002F\u002F empty' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n\n  if [ \"$HAS_DISCORD\" = \"true\" ] || [ \"$HAS_DISCORD_BOT\" = \"true\" ]; then\n    echo \"EXISTING_CONFIG=true\"\n    echo \"WEBHOOK_CONFIGURED=$HAS_DISCORD\"\n    echo \"BOT_CONFIGURED=$HAS_DISCORD_BOT\"\n    [ -n \"$WEBHOOK_URL\" ] && echo \"WEBHOOK_URL=$WEBHOOK_URL\"\n    [ -n \"$MENTION\" ] && echo \"MENTION=$MENTION\"\n  else\n    echo \"EXISTING_CONFIG=false\"\n  fi\nelse\n  echo \"NO_CONFIG_FILE\"\nfi\n```\n\nIf existing config is found, show the user what's currently configured and ask if they want to update or reconfigure.\n\n### Step 2: Choose Discord Method\n\nUse AskUserQuestion:\n\n**Question:** \"How would you like to send Discord notifications?\"\n\n**Options:**\n1. **Webhook (Recommended)** - Create a webhook in your Discord channel. Simple, no bot needed. Just paste the URL.\n2. **Bot API** - Use a Discord bot token + channel ID. More flexible, requires a bot application.\n\n### Step 3A: Webhook Setup\n\nIf user chose Webhook:\n\nUse AskUserQuestion:\n\n**Question:** \"Paste your Discord webhook URL. To create one: Server Settings > Integrations > Webhooks > New Webhook > Copy URL\"\n\nThe user will type their webhook URL in the \"Other\" field.\n\n**Validate** the URL:\n- Must start with `https:\u002F\u002Fdiscord.com\u002Fapi\u002Fwebhooks\u002F` or `https:\u002F\u002Fdiscordapp.com\u002Fapi\u002Fwebhooks\u002F`\n- If invalid, explain the format and ask again\n\n### Step 3B: Bot API Setup\n\nIf user chose Bot API:\n\nAsk two questions:\n\n1. **\"Paste your Discord bot token\"** - From discord.com\u002Fdevelopers > Your App > Bot > Token\n2. **\"Paste the channel ID\"** - Right-click channel > Copy Channel ID (requires Developer Mode)\n\n### Step 4: Configure Mention (User Ping)\n\nUse AskUserQuestion:\n\n**Question:** \"Would you like notifications to mention (ping) someone?\"\n\n**Options:**\n1. **Yes, mention a user** - Tag a specific user by their Discord user ID\n2. **Yes, mention a role** - Tag a role by its role ID\n3. **No mentions** - Just post the message without pinging anyone\n\n#### If user wants to mention a user:\n\nAsk: \"What is the Discord user ID to mention? (Right-click user > Copy User ID, requires Developer Mode)\"\n\nThe mention format is: `\u003C@USER_ID>` (e.g., `\u003C@1465264645320474637>`)\n\n#### If user wants to mention a role:\n\nAsk: \"What is the Discord role ID to mention? (Server Settings > Roles > right-click role > Copy Role ID)\"\n\nThe mention format is: `\u003C@&ROLE_ID>` (e.g., `\u003C@&123456789>`)\n\n### Step 5: Configure Events\n\nUse AskUserQuestion with multiSelect:\n\n**Question:** \"Which events should trigger Discord notifications?\"\n\n**Options (multiSelect: true):**\n1. **Session end (Recommended)** - When a Claude session finishes\n2. **Input needed** - When Claude is waiting for your response (great for long-running tasks)\n3. **Session start** - When a new session begins\n4. **Session continuing** - When a persistent mode keeps the session alive\n\nDefault selection: session-end + ask-user-question.\n\n### Step 6: Optional Username Override\n\nUse AskUserQuestion:\n\n**Question:** \"Custom bot display name? (Shows as the webhook sender name in Discord)\"\n\n**Options:**\n1. **OMC (default)** - Display as \"OMC\"\n2. **Claude Code** - Display as \"Claude Code\"\n3. **Custom** - Enter a custom name\n\n### Step 7: Write Configuration\n\nRead the existing config, merge the new Discord settings, and write back:\n\n```bash\nCONFIG_FILE=\"${CLAUDE_CONFIG_DIR:-$HOME\u002F.claude}\u002F.omc-config.json\"\nmkdir -p \"$(dirname \"$CONFIG_FILE\")\"\n\nif [ -f \"$CONFIG_FILE\" ]; then\n  EXISTING=$(cat \"$CONFIG_FILE\")\nelse\n  EXISTING='{}'\nfi\n```\n\n#### For Webhook method:\n\nBuild the notifications object with the collected values and merge into `.omc-config.json` using jq:\n\n```bash\n# WEBHOOK_URL, MENTION, USERNAME are collected from user\n# EVENTS is the list of enabled events\n\necho \"$EXISTING\" | jq \\\n  --arg url \"$WEBHOOK_URL\" \\\n  --arg mention \"$MENTION\" \\\n  --arg username \"$USERNAME\" \\\n  '.notifications = (.notifications \u002F\u002F {enabled: true}) |\n   .notifications.enabled = true |\n   .notifications.discord = {\n     enabled: true,\n     webhookUrl: $url,\n     mention: (if $mention == \"\" then null else $mention end),\n     username: (if $username == \"\" then null else $username end)\n   }' > \"$CONFIG_FILE\"\n```\n\n#### For Bot API method:\n\n```bash\necho \"$EXISTING\" | jq \\\n  --arg token \"$BOT_TOKEN\" \\\n  --arg channel \"$CHANNEL_ID\" \\\n  --arg mention \"$MENTION\" \\\n  '.notifications = (.notifications \u002F\u002F {enabled: true}) |\n   .notifications.enabled = true |\n   .notifications[\"discord-bot\"] = {\n     enabled: true,\n     botToken: $token,\n     channelId: $channel,\n     mention: (if $mention == \"\" then null else $mention end)\n   }' > \"$CONFIG_FILE\"\n```\n\n#### Add event-specific config if user didn't select all events:\n\nFor each event NOT selected, disable it:\n\n```bash\n# Example: disable session-start if not selected\necho \"$(cat \"$CONFIG_FILE\")\" | jq \\\n  '.notifications.events = (.notifications.events \u002F\u002F {}) |\n   .notifications.events[\"session-start\"] = {enabled: false}' > \"$CONFIG_FILE\"\n```\n\n### Step 8: Test the Configuration\n\nAfter writing config, offer to send a test notification:\n\nUse AskUserQuestion:\n\n**Question:** \"Send a test notification to verify the setup?\"\n\n**Options:**\n1. **Yes, test now (Recommended)** - Send a test message to your Discord channel\n2. **No, I'll test later** - Skip testing\n\n#### If testing:\n\n```bash\n# For webhook:\ncurl -s -o \u002Fdev\u002Fnull -w \"%{http_code}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d \"{\\\"content\\\": \\\"${MENTION:+$MENTION\\\\n}OMC test notification - Discord is configured!\\\"}\" \\\n  \"$WEBHOOK_URL\"\n```\n\nReport success or failure. If it fails, help the user debug (check URL, permissions, etc.).\n\n### Step 9: Confirm\n\nDisplay the final configuration summary:\n\n```\nDiscord Notifications Configured!\n\n  Method:   Webhook \u002F Bot API\n  Mention:  \u003C@1465264645320474637> (or \"none\")\n  Events:   session-end, ask-user-question\n  Username: OMC\n\nConfig saved to: ~\u002F.claude\u002F.omc-config.json\n\nYou can also set these via environment variables:\n  OMC_DISCORD_WEBHOOK_URL=https:\u002F\u002Fdiscord.com\u002Fapi\u002Fwebhooks\u002F...\n  OMC_DISCORD_MENTION=\u003C@1465264645320474637>\n\nTo reconfigure: \u002Foh-my-claudecode:configure-notifications discord\nTo configure Telegram: \u002Foh-my-claudecode:configure-notifications telegram\nTo configure Slack: \u002Foh-my-claudecode:configure-notifications slack\n```\n\n### Environment Variable Alternative\n\nUsers can skip this wizard entirely by setting env vars in their shell profile:\n\n**Webhook method:**\n```bash\nexport OMC_DISCORD_WEBHOOK_URL=\"https:\u002F\u002Fdiscord.com\u002Fapi\u002Fwebhooks\u002F...\"\nexport OMC_DISCORD_MENTION=\"\u003C@1465264645320474637>\"  # optional\n```\n\n**Bot API method:**\n```bash\nexport OMC_DISCORD_NOTIFIER_BOT_TOKEN=\"your-bot-token\"\nexport OMC_DISCORD_NOTIFIER_CHANNEL=\"your-channel-id\"\nexport OMC_DISCORD_MENTION=\"\u003C@1465264645320474637>\"  # optional\n```\n\nEnv vars are auto-detected by the notification system without needing `.omc-config.json`.\n\n---\n\n## Slack Setup\n\nSet up Slack notifications so OMC can message you when sessions end, need input, or complete background tasks.\n\n### How This Skill Works\n\nThis is an interactive, natural-language configuration skill. Walk the user through setup by asking questions with AskUserQuestion. Write the result to `${CLAUDE_CONFIG_DIR:-~\u002F.claude}\u002F.omc-config.json`.\n\n### Step 1: Detect Existing Configuration\n\n```bash\nCONFIG_FILE=\"${CLAUDE_CONFIG_DIR:-$HOME\u002F.claude}\u002F.omc-config.json\"\n\nif [ -f \"$CONFIG_FILE\" ]; then\n  HAS_SLACK=$(jq -r '.notifications.slack.enabled \u002F\u002F false' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n  WEBHOOK_URL=$(jq -r '.notifications.slack.webhookUrl \u002F\u002F empty' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n  MENTION=$(jq -r '.notifications.slack.mention \u002F\u002F empty' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n  CHANNEL=$(jq -r '.notifications.slack.channel \u002F\u002F empty' \"$CONFIG_FILE\" 2>\u002Fdev\u002Fnull)\n\n  if [ \"$HAS_SLACK\" = \"true\" ]; then\n    echo \"EXISTING_CONFIG=true\"\n    [ -n \"$WEBHOOK_URL\" ] && echo \"WEBHOOK_URL=$WEBHOOK_URL\"\n    [ -n \"$MENTION\" ] && echo \"MENTION=$MENTION\"\n    [ -n \"$CHANNEL\" ] && echo \"CHANNEL=$CHANNEL\"\n  else\n    echo \"EXISTING_CONFIG=false\"\n  fi\nelse\n  echo \"NO_CONFIG_FILE\"\nfi\n```\n\nIf existing config is found, show the user what's currently configured and ask if they want to update or reconfigure.\n\n### Step 2: Create a Slack Incoming Webhook\n\nGuide the user through creating a webhook if they don't have one:\n\n```\nTo set up Slack notifications, you need a Slack incoming webhook URL.\n\nCREATE A WEBHOOK:\n1. Go to https:\u002F\u002Fapi.slack.com\u002Fapps\n2. Click \"Create New App\" > \"From scratch\"\n3. Name your app (e.g., \"OMC Notifier\") and select your workspace\n4. Go to \"Incoming Webhooks\" in the left sidebar\n5. Toggle \"Activate Incoming Webhooks\" to ON\n6. Click \"Add New Webhook to Workspace\"\n7. Select the channel where notifications should be posted\n8. Copy the webhook URL (starts with https:\u002F\u002Fhooks.slack.com\u002Fservices\u002F...)\n```\n\n### Step 3: Collect Webhook URL\n\nUse AskUserQuestion:\n\n**Question:** \"Paste your Slack incoming webhook URL (starts with https:\u002F\u002Fhooks.slack.com\u002Fservices\u002F...)\"\n\nThe user will type their webhook URL in the \"Other\" field.\n\n**Validate** the URL:\n- Must start with `https:\u002F\u002Fhooks.slack.com\u002Fservices\u002F`\n- If invalid, explain the format and ask again\n\n### Step 4: Configure Mention (User\u002FGroup Ping)\n\nUse AskUserQuestion:\n\n**Question:** \"Would you like notifications to mention (ping) someone?\"\n\n**Options:**\n1. **Yes, mention a user** - Tag a specific user by their Slack member ID\n2. **Yes, mention a channel** - Use @channel to notify everyone in the channel\n3. **Yes, mention @here** - Notify only active members in the channel\n4. **No mentions** - Just post the message without pinging anyone\n\n#### If user wants to mention a user:\n\nAsk: \"What is the Slack member ID to mention? (Click on a user's profile > More (⋯) > Copy member ID)\"\n\nThe mention format is: `\u003C@MEMBER_ID>` (e.g., `\u003C@U1234567890>`)\n\n#### If user wants @channel:\n\nThe mention format is: `\u003C!channel>`\n\n#### If user wants @here:\n\nThe mention format is: `\u003C!here>`\n\n### Step 5: Configure Events\n\nUse AskUserQuestion with multiSelect:\n\n**Question:** \"Which events should trigger Slack notifications?\"\n\n**Options (multiSelect: true):**\n1. **Session end (Recommended)** - When a Claude session finishes\n2. **Input needed** - When Claude is waiting for your response (great for long-running tasks)\n3. **Session start** - When a new session begins\n4. **Session continuing** - When a persistent mode keeps the session alive\n\nDefault selection: session-end + ask-user-question.\n\n### Step 6: Optional Channel Override\n\nUse AskUserQuestion:\n\n**Question:** \"Override the default notification channel? (The webhook already has a default channel)\"\n\n**Options:**\n1. **Use webhook default (Recommended)** - Post to the channel selected during webhook setup\n2. **Override channel** - Specify a different channel (e.g., #alerts)\n\nIf override, ask for the channel name (e.g., `#alerts`).\n\n### Step 7: Optional Username Override\n\nUse AskUserQuestion:\n\n**Question:** \"Custom bot display name? (Shows as the webhook sender name in Slack)\"\n\n**Options:**\n1. **OMC (default)** - Display as \"OMC\"\n2. **Claude Code** - Display as \"Claude Code\"\n3. **Custom** - Enter a custom name\n\n### Step 8: Write Configuration\n\nRead the existing config, merge the new Slack settings, and write back:\n\n```bash\nCONFIG_FILE=\"${CLAUDE_CONFIG_DIR:-$HOME\u002F.claude}\u002F.omc-config.json\"\nmkdir -p \"$(dirname \"$CONFIG_FILE\")\"\n\nif [ -f \"$CONFIG_FILE\" ]; then\n  EXISTING=$(cat \"$CONFIG_FILE\")\nelse\n  EXISTING='{}'\nfi\n\n# WEBHOOK_URL, MENTION, USERNAME, CHANNEL are collected from user\necho \"$EXISTING\" | jq \\\n  --arg url \"$WEBHOOK_URL\" \\\n  --arg mention \"$MENTION\" \\\n  --arg username \"$USERNAME\" \\\n  --arg channel \"$CHANNEL\" \\\n  '.notifications = (.notifications \u002F\u002F {enabled: true}) |\n   .notifications.enabled = true |\n   .notifications.slack = {\n     enabled: true,\n     webhookUrl: $url,\n     mention: (if $mention == \"\" then null else $mention end),\n     username: (if $username == \"\" then null else $username end),\n     channel: (if $channel == \"\" then null else $channel end)\n   }' > \"$CONFIG_FILE\"\n```\n\n#### Add event-specific config if user didn't select all events:\n\nFor each event NOT selected, disable it:\n\n```bash\n# Example: disable session-start if not selected\necho \"$(cat \"$CONFIG_FILE\")\" | jq \\\n  '.notifications.events = (.notifications.events \u002F\u002F {}) |\n   .notifications.events[\"session-start\"] = {enabled: false}' > \"$CONFIG_FILE\"\n```\n\n### Step 9: Test the Configuration\n\nAfter writing config, offer to send a test notification:\n\nUse AskUserQuestion:\n\n**Question:** \"Send a test notification to verify the setup?\"\n\n**Options:**\n1. **Yes, test now (Recommended)** - Send a test message to your Slack channel\n2. **No, I'll test later** - Skip testing\n\n#### If testing:\n\n```bash\n# For webhook:\nMENTION_PREFIX=\"\"\nif [ -n \"$MENTION\" ]; then\n  MENTION_PREFIX=\"${MENTION}\\n\"\nfi\n\ncurl -s -o \u002Fdev\u002Fnull -w \"%{http_code}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d \"{\\\"text\\\": \\\"${MENTION_PREFIX}OMC test notification - Slack is configured!\\\"}\" \\\n  \"$WEBHOOK_URL\"\n```\n\nReport success or failure. Common issues:\n- **403 Forbidden**: Webhook URL is invalid or revoked\n- **404 Not Found**: Webhook URL is incorrect\n- **channel_not_found**: Channel override is invalid\n- **Network error**: Check connectivity to hooks.slack.com\n\n### Step 10: Confirm\n\nDisplay the final configuration summary:\n\n```\nSlack Notifications Configured!\n\n  Webhook:  https:\u002F\u002Fhooks.slack.com\u002Fservices\u002FT00\u002FB00\u002Fxxx...\n  Mention:  \u003C@U1234567890> (or \"none\")\n  Channel:  #alerts (or \"webhook default\")\n  Events:   session-end, ask-user-question\n  Username: OMC\n\nConfig saved to: ~\u002F.claude\u002F.omc-config.json\n\nYou can also set these via environment variables:\n  OMC_SLACK_WEBHOOK_URL=https:\u002F\u002Fhooks.slack.com\u002Fservices\u002F...\n  OMC_SLACK_MENTION=\u003C@U1234567890>\n\nTo reconfigure: \u002Foh-my-claudecode:configure-notifications slack\nTo configure Discord: \u002Foh-my-claudecode:configure-notifications discord\nTo configure Telegram: \u002Foh-my-claudecode:configure-notifications telegram\n```\n\n### Environment Variable Alternative\n\nUsers can skip this wizard entirely by setting env vars in their shell profile:\n\n```bash\nexport OMC_SLACK_WEBHOOK_URL=\"https:\u002F\u002Fhooks.slack.com\u002Fservices\u002FT00\u002FB00\u002Fxxx\"\nexport OMC_SLACK_MENTION=\"\u003C@U1234567890>\"  # optional\n```\n\nEnv vars are auto-detected by the notification system without needing `.omc-config.json`.\n\n### Slack Mention Formats\n\n| Type | Format | Example |\n|------|--------|---------|\n| User | `\u003C@MEMBER_ID>` | `\u003C@U1234567890>` |\n| Channel | `\u003C!channel>` | `\u003C!channel>` |\n| Here | `\u003C!here>` | `\u003C!here>` |\n| Everyone | `\u003C!everyone>` | `\u003C!everyone>` |\n| User Group | `\u003C!subteam^GROUP_ID>` | `\u003C!subteam^S1234567890>` |\n\n---\n\n## Platform Activation Flags\n\nAll notification platforms require activation via CLI flags per session:\n\n- `omc --telegram` — Activates Telegram notifications (sets `OMC_TELEGRAM=1`)\n- `omc --discord` — Activates Discord notifications (sets `OMC_DISCORD=1`)\n- `omc --slack` — Activates Slack notifications (sets `OMC_SLACK=1`)\n- `omc --webhook` — Activates webhook notifications (sets `OMC_WEBHOOK=1`)\n- `omc --openclaw` — Activates OpenClaw gateway integration (sets `OMC_OPENCLAW=1`)\n\nWithout these flags, configured platforms remain dormant. This prevents unwanted notifications during development while keeping configuration persistent.\n\n**Examples:**\n- `omc --telegram --discord` — Telegram + Discord active\n- `omc --telegram --slack --webhook` — Telegram + Slack + Webhook active\n- `omc --telegram --openclaw` — Telegram + OpenClaw active\n- `omc` — No notifications sent (all platforms require explicit activation)\n\n---\n\n## Hook Event Templates\n\nCustomize notification messages per event and per platform using `omc_config.hook.json`.\n\n### Routing\n\nIf the trigger or argument contains \"hook\", \"template\", or \"customize messages\" → follow this section.\n\n### Step 1: Detect Existing Hook Config\n\nCheck if `${CLAUDE_CONFIG_DIR:-~\u002F.claude}\u002Fomc_config.hook.json` exists. If it does, show the current configuration. If not, explain what it does.\n\n```\nHook event templates let you customize the notification messages sent to each platform.\nYou can set different messages for Discord vs Telegram vs Slack, and control which\nevents fire on which platform.\n\nConfig file: ~\u002F.claude\u002Fomc_config.hook.json\n```\n\n### Step 2: Choose Event to Configure\n\nUse AskUserQuestion:\n\n**Question:** \"Which event would you like to configure templates for?\"\n\n**Options:**\n1. **session-end** - When a Claude session finishes (most common)\n2. **ask-user-question** - When Claude is waiting for input\n3. **session-idle** - When Claude finishes and waits for input\n4. **session-start** - When a new session begins\n\n### Step 3: Show Available Variables\n\nDisplay the template variables available for the chosen event:\n\n```\nAvailable template variables:\n\nRAW FIELDS:\n  {{sessionId}}      - Session identifier\n  {{timestamp}}      - ISO timestamp\n  {{tmuxSession}}    - tmux session name\n  {{projectPath}}    - Full project directory path\n  {{projectName}}    - Project directory basename\n  {{reason}}         - Stop\u002Fend reason\n  {{activeMode}}     - Active OMC mode name\n  {{question}}       - Question text (ask-user-question only)\n  {{agentName}}      - Agent name (agent-call only)\n  {{agentType}}      - Agent type (agent-call only)\n\nCOMPUTED (smart formatting):\n  {{duration}}       - Human-readable duration (e.g., \"5m 23s\")\n  {{time}}           - Locale time string\n  {{modesDisplay}}   - Comma-separated modes or empty\n  {{iterationDisplay}} - \"3\u002F10\" format or empty\n  {{agentDisplay}}   - \"2\u002F5 completed\" or empty\n  {{projectDisplay}} - Project name with fallbacks\n  {{footer}}         - tmux + project info line\n  {{tmuxTailBlock}}  - Recent output in code fence or empty\n  {{reasonDisplay}}  - Reason with \"unknown\" fallback\n\nCONDITIONALS:\n  {{#if variableName}}content shown when truthy{{\u002Fif}}\n```\n\n### Step 4: Collect Template\n\nUse AskUserQuestion:\n\n**Question:** \"Enter the message template for this event (use {{variables}} for dynamic content)\"\n\n**Options:**\n1. **Use default template** - Keep the built-in message format\n2. **Simple summary** - Short one-line format\n3. **Custom** - Enter your own template\n\nIf \"Simple summary\", use a pre-built compact template:\n- session-end: `{{projectDisplay}} session ended ({{duration}}) — {{reasonDisplay}}`\n- ask-user-question: `Input needed on {{projectDisplay}}: {{question}}`\n- session-idle: `{{projectDisplay}} is idle. {{#if reason}}Reason: {{reason}}{{\u002Fif}}`\n- session-start: `Session started: {{projectDisplay}} at {{time}}`\n\n### Step 5: Per-Platform Overrides\n\nUse AskUserQuestion:\n\n**Question:** \"Do you want different messages for specific platforms?\"\n\n**Options:**\n1. **No, same for all (Recommended)** - Use the same template everywhere\n2. **Yes, customize per platform** - Set different templates for Discord, Telegram, Slack\n\nIf per-platform: ask for each enabled platform's template separately.\n\n### Step 6: Write Configuration\n\nRead or create `${CLAUDE_CONFIG_DIR:-~\u002F.claude}\u002Fomc_config.hook.json` and merge the new settings:\n\n```json\n{\n  \"version\": 1,\n  \"enabled\": true,\n  \"events\": {\n    \"\u003Cevent-name>\": {\n      \"enabled\": true,\n      \"template\": \"\u003Cuser-provided-template>\",\n      \"platforms\": {\n        \"discord\": { \"template\": \"\u003Cdiscord-specific>\" },\n        \"telegram\": { \"template\": \"\u003Ctelegram-specific>\" }\n      }\n    }\n  }\n}\n```\n\n### Step 7: Validate and Test\n\nValidate the template using `validateTemplate()` to check for unknown variables. If any are found, warn the user and offer to correct.\n\nOffer to send a test notification with the new template.\n\n### Example Config\n\n```json\n{\n  \"version\": 1,\n  \"enabled\": true,\n  \"events\": {\n    \"session-end\": {\n      \"enabled\": true,\n      \"template\": \"Session {{sessionId}} ended after {{duration}}. Reason: {{reasonDisplay}}\",\n      \"platforms\": {\n        \"discord\": {\n          \"template\": \"**Session Complete** | `{{projectDisplay}}` | {{duration}} | {{reasonDisplay}}\"\n        },\n        \"telegram\": {\n          \"template\": \"Done: {{projectDisplay}} ({{duration}})\\n{{#if contextSummary}}Summary: {{contextSummary}}{{\u002Fif}}\"\n        }\n      }\n    },\n    \"ask-user-question\": {\n      \"enabled\": true,\n      \"template\": \"{{#if question}}{{question}}{{\u002Fif}}\\nWaiting for input on {{projectDisplay}}\"\n    }\n  }\n}\n```\n\n---\n\n## Related\n\n- `\u002Foh-my-claudecode:configure-openclaw` — Configure OpenClaw gateway integration\n\n---\n\n## Custom Integration (OpenClaw, n8n, CLI, etc.)\n\nConfigure custom webhooks and CLI commands for services beyond the native Discord\u002FTelegram\u002FSlack integrations.\n\n### Routing\n\nIf the user says \"custom integration\", \"openclaw\", \"n8n\", \"webhook\", \"cli command\", or similar → follow this section.\n\n### Migration from OpenClaw\n\nIf `~\u002F.claude\u002Fomc_config.openclaw.json` exists, detect and offer migration:\n\n**Step 1: Detect Legacy Config**\n```bash\nLEGACY_CONFIG=\"${CLAUDE_CONFIG_DIR:-$HOME\u002F.claude}\u002Fomc_config.openclaw.json\"\nif [ -f \"$LEGACY_CONFIG\" ]; then\n  echo \"LEGACY_FOUND=true\"\n  # Check if already migrated\n  if jq -e '.customIntegrations.integrations[] | select(.preset == \"openclaw\")' \"$CONFIG_FILE\" >\u002Fdev\u002Fnull 2>&1; then\n    echo \"ALREADY_MIGRATED=true\"\n  else\n    echo \"ALREADY_MIGRATED=false\"\n  fi\nelse\n  echo \"LEGACY_FOUND=false\"\nfi\n```\n\n**Step 2: Offer Migration**\nIf legacy found and not migrated:\n\n**Question:** \"Existing OpenClaw configuration detected. Would you like to migrate it to the new format?\"\n\n**Options:**\n1. **Yes, migrate now** - Convert legacy config to custom integration\n2. **No, configure fresh** - Skip migration and start new\n3. **Show me the legacy config first** - Display current OpenClaw settings\n\nIf migrate:\n- Read `omc_config.openclaw.json`\n- Transform to custom integration format\n- Save to `.omc-config.json`\n- Backup legacy to `omc_config.openclaw.json.bak`\n- Show success message\n\n### Custom Integration Wizard\n\n**Step 1: Select Integration Type**\n\n**Question:** \"Which type of custom integration would you like to configure?\"\n\n**Options:**\n1. **OpenClaw Gateway** - Wake external automations and AI agents\n2. **n8n Webhook** - Trigger n8n workflows\n3. **ClawdBot** - Send notifications to ClawdBot\n4. **Generic Webhook** - Custom HTTPS webhook\n5. **Generic CLI Command** - Execute shell command on events\n\n### OpenClaw\u002Fn8n\u002FClawdBot Preset Flow\n\n**Step 2: Gateway URL**\n\n**Question:** \"What is your gateway\u002Fwebhook URL?\"\n\n**Validation:**\n- Must be HTTPS (except localhost for development)\n- Must be valid URL format\n\n**Step 3: Authentication (Optional)**\n\n**Question:** \"Does your gateway require authentication?\"\n\n**Options:**\n1. **Bearer token** - Authorization: Bearer \u003Ctoken>\n2. **Custom header** - Name and value\n3. **No authentication**\n\nIf Bearer: ask for token\nIf Custom: ask for header name and value\n\n**Step 4: Events**\n\nUse AskUserQuestion with multiSelect:\n\n**Question:** \"Which events should trigger this integration?\"\n\n**Options (with defaults from preset):**\n- session-start\n- session-end\n- session-stop\n- session-idle\n- ask-user-question\n\nDefault for OpenClaw: session-start, session-end, stop\nDefault for n8n: session-end, ask-user-question\n\n**Step 5: Test**\n\n**Question:** \"Send a test notification to verify the configuration?\"\n\n**Options:**\n1. **Yes, test now** - Send test webhook\n2. **No, skip test**\n\nIf test:\n```bash\n# For webhook integrations\ncurl -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  ${AUTH_HEADER:+\"-H \\\"$AUTH_HEADER\\\"\"} \\\n  -d '{\"event\":\"test\",\"instruction\":\"OMC test notification\",\"timestamp\":\"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'\"}' \\\n  \"$WEBHOOK_URL\"\n```\n\nShow result (HTTP status, any error).\n\n**Step 6: Write Configuration**\n\nMerge into `.omc-config.json`:\n\n```json\n{\n  \"notifications\": { \u002F* existing native configs *\u002F },\n  \"customIntegrations\": {\n    \"enabled\": true,\n    \"integrations\": [\n      {\n        \"id\": \"my-openclaw\",\n        \"type\": \"webhook\",\n        \"preset\": \"openclaw\",\n        \"enabled\": true,\n        \"config\": {\n          \"url\": \"https:\u002F\u002Fmy-gateway.example.com\u002Fwake\",\n          \"method\": \"POST\",\n          \"headers\": {\n            \"Content-Type\": \"application\u002Fjson\",\n            \"Authorization\": \"Bearer ...\"\n          },\n          \"bodyTemplate\": \"{\\\\\"event\\\\\":\\\\\"{{event}}\\\\\",\\\\\"instruction\\\\\":\\\\\"Session {{sessionId}} {{event}}\\\\\",\\\\\"timestamp\\\\\":\\\\\"{{timestamp}}\\\\\"}\",\n          \"timeout\": 10000\n        },\n        \"events\": [\"session-start\", \"session-end\"]\n      }\n    ]\n  }\n}\n```\n\n### Generic Webhook Flow\n\n**Step 2: URL**\nAsk for webhook URL (HTTPS required).\n\n**Step 3: Method**\nAsk for HTTP method (GET, POST, PUT, PATCH, DELETE). Default: POST.\n\n**Step 4: Headers**\nAsk for headers in \"Name: Value\" format, one per line. Default: Content-Type: application\u002Fjson\n\n**Step 5: Body Template**\nShow available template variables and ask for body template (JSON or other format).\n\nDefault:\n```json\n{\n  \"event\": \"{{event}}\",\n  \"sessionId\": \"{{sessionId}}\",\n  \"projectName\": \"{{projectName}}\",\n  \"timestamp\": \"{{timestamp}}\"\n}\n```\n\n**Step 6: Timeout**\nAsk for timeout in milliseconds (1000-60000). Default: 10000.\n\n**Step 7: Events**\nMulti-select events.\n\n**Step 8: Test and Save**\nSame as preset flow.\n\n### Generic CLI Command Flow\n\n**Step 2: Command**\n\n**Question:** \"What command should be executed? (single executable, no arguments)\"\n\n**Example:** `curl`, `\u002Fusr\u002Flocal\u002Fbin\u002Fmy-script`, `notify-send`\n\n**Validation:**\n- No spaces\n- No shell metacharacters\n\n**Step 3: Arguments**\n\n**Question:** \"Command arguments (use {{variable}} for dynamic values). Enter one per line.\"\n\n**Example:**\n```\n-X\nPOST\n-d\n{\"event\":\"{{event}}\",\"session\":\"{{sessionId}}\"}\nhttps:\u002F\u002Fmy-api.com\u002Fnotify\n```\n\nShow available template variables reference.\n\n**Step 4: Timeout**\nAsk for timeout (1000-60000ms). Default: 5000.\n\n**Step 5: Events**\nMulti-select events.\n\n**Step 6: Test and Save**\n\nFor test, execute command with test values:\n```bash\n$COMMAND \"${ARGS[@]\u002F\u002F{{event}}\u002Ftest}\"\n```\n\nShow stdout\u002Fstderr and exit code.\n\n### Managing Custom Integrations\n\n**List existing:**\n```bash\njq '.customIntegrations.integrations[] | {id, type, preset, enabled, events}' \"$CONFIG_FILE\"\n```\n\n**Disable\u002FEnable:**\n```bash\n# Disable\njq '.customIntegrations.integrations = [.customIntegrations.integrations[] | if .id == \"my-integration\" then .enabled = false else . end]' \"$CONFIG_FILE\"\n\n# Enable\njq '.customIntegrations.integrations = [.customIntegrations.integrations[] | if .id == \"my-integration\" then .enabled = true else . end]' \"$CONFIG_FILE\"\n```\n\n**Remove:**\n```bash\njq '.customIntegrations.integrations = [.customIntegrations.integrations[] | select(.id != \"my-integration\")]' \"$CONFIG_FILE\"\n```\n\n### Template Variables Reference\n\nAll custom integrations support these template variables:\n\n| Variable | Description | Example |\n|----------|-------------|---------|\n| `{{sessionId}}` | Unique session ID | `sess_abc123` |\n| `{{projectPath}}` | Full project path | `\u002Fhome\u002Fuser\u002Fmy-project` |\n| `{{projectName}}` | Project directory name | `my-project` |\n| `{{timestamp}}` | ISO 8601 timestamp | `2026-03-05T14:30:00Z` |\n| `{{event}}` | Event name | `session-end` |\n| `{{duration}}` | Human-readable duration | `45s` |\n| `{{durationMs}}` | Duration in milliseconds | `45000` |\n| `{{reason}}` | Stop\u002Fend reason | `completed` |\n| `{{tmuxSession}}` | tmux session name | `claude:my-project` |\n\nSession-end only:\n- `{{agentsSpawned}}`, `{{agentsCompleted}}`, `{{modesUsed}}`, `{{contextSummary}}`\n\nAsk-user-question only:\n- `{{question}}`\n\n---\n\n## Related\n\n- Template variables: `src\u002Fnotifications\u002Ftemplate-variables.ts`\n- Validation: `src\u002Fnotifications\u002Fvalidation.ts`\n- Presets: `src\u002Fnotifications\u002Fpresets.ts`\n",{"name":5,"level":23,"triggers":24,"description":7},2,[25,26,27,28,29,30,31,32,33,34,35],"configure notifications","setup notifications","configure telegram","setup telegram","telegram bot","configure discord","setup discord","discord webhook","configure slack","setup slack","slack webhook","main","f37de8f681f0c0ca0e0ebab6e5fddf764ca7553d","skills\u002Fconfigure-notifications",1,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one","https:\u002F\u002Fagisota.github.io\u002Fold-one\u002F","https:\u002F\u002Fgithub.com\u002Fagisota","pzd.world","2026-07-04 22:32:06",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add agisota\u002Fold-one --skill configure-notifications",{"tool":51,"command":52},"bunx","bunx skills add agisota\u002Fold-one --skill configure-notifications",{"tool":54,"command":55},"pnpm","pnpm dlx skills add agisota\u002Fold-one --skill configure-notifications","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fconfigure-notifications\u002FSKILL.md",true,[],[60,67,74,83,90,97],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M75KRGZWQWE9JDBS6RX42NWV","zoom-out","Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzoom-out\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M75KRCZHKE0ZYAQFFYHS0YNP","zeroize-audit","Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C\u002FC++\u002FRust code handling secrets, keys, passwords, or other sensitive data.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzeroize-audit\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":78,"licenseFileUrl":79,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":18},"01M75KR94KYQ30DTE1P9WNDAE0","yeet","Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":18},"01M75KR3H13YJ9QHMD49818FA1","yara-rule-authoring","Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules. Covers naming conventions, string selection, performance optimization, migration from legacy YARA, and false positive reduction. Triggers on: YARA, YARA-X, malware detection, threat hunting, IOC, signature, crx module, dex module.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyara-rule-authoring\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":18},"01M75KQMPY8A4Y8XTDD2DT0M9T","x-twitter-growth","X\u002FTwitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X\u002FTwitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-twitter-growth\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":18},"01M75KQHNZ0ANZNJGZY6M8MDAK","x-api","X\u002FTwitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-api\u002FSKILL.md",[],[]]