[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77KNER6AV4AJKX9FZRZZA7M":3,"skill-same:01M77KNER6AV4AJKX9FZRZZA7M":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M77KNER6AV4AJKX9FZRZZA7M","slack-helper",null,"Slack助手 - 发送消息\u002F搜索历史\u002F管理频道\u002F集成通知，基于Slack API的Python实现，支持Webhook和Socket Mode","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fl\u002Flaosi-slack\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: slack-helper\ndescription: Slack助手 - 发送消息\u002F搜索历史\u002F管理频道\u002F集成通知，基于Slack API的Python实现，支持Webhook和Socket Mode\nmetadata: {\"openclaw\": {\"requires\": {\"python\": [\"slack-sdk\", \"aiohttp\"]}, \"install\": [\"pip install slack-sdk aiohttp\"]}}\ntags: [slack, messaging, notification, team, communication, webhook, bot]\nversion: 1.0.0\nauthor: laosi\nsource: adapted\n---\n\n# Slack Helper - Slack助手\n\n> 激活词: Slack \u002F 消息 \u002F 通知 \u002F 团队\n\n## 安装\n\n```bash\npip install slack-sdk aiohttp\n```\n\n## 获取Token\n\n1. 访问 https:\u002F\u002Fapi.slack.com\u002Fapps\n2. 创建新App → 选择 \"From scratch\"\n3. 添加 Bot Token Scopes: `chat:write`, `channels:read`, `channels:history`\n4. 安装App到工作区，复制 Bot User OAuth Token\n\n## Python实现\n\n### 1. 发送消息到频道\n\n```python\nfrom slack_sdk import WebClient\n\nclass SlackHelper:\n    def __init__(self, token: str):\n        self.client = WebClient(token=token)\n    \n    def post_message(self, channel: str, text: str, blocks: list = None):\n        \"\"\"发送文本或富文本消息\"\"\"\n        params = {\"channel\": channel, \"text\": text}\n        if blocks:\n            params[\"blocks\"] = blocks\n        resp = self.client.chat_postMessage(**params)\n        return resp[\"ts\"]  # 消息时间戳，可用于回复\u002F编辑\n    \n    def post_blocks(self, channel: str, blocks: list, fallback: str = \"\"):\n        \"\"\"发送Block Kit富消息\"\"\"\n        return self.post_message(channel, fallback, blocks=blocks)\n\nslack = SlackHelper(\"xoxb-your-token-here\")\nslack.post_message(\"#general\", \"Hello from AI assistant!\")\n```\n\n### 2. Block Kit 富消息模板\n\n```python\ndef alert_block(title: str, message: str, severity: str = \"warning\"):\n    colors = {\"info\": \"#3498db\", \"warning\": \"#f39c12\", \"error\": \"#e74c3c\", \"success\": \"#2ecc71\"}\n    return [\n        {\n            \"type\": \"header\",\n            \"text\": {\"type\": \"plain_text\", \"text\": f\"⚠️ {title}\"}\n        },\n        {\n            \"type\": \"section\",\n            \"text\": {\"type\": \"mrkdwn\", \"text\": message}\n        },\n        {\n            \"type\": \"context\",\n            \"elements\": [{\"type\": \"mrkdwn\", \"text\": f\"Severity: *{severity}*\"}]\n        }\n    ]\n\nslack.post_blocks(\"#alerts\", alert_block(\"Deploy Failed\", \"Build #42 failed on staging\"))\n```\n\n### 3. 频道列表和管理\n\n```python\ndef list_channels(self, limit: int = 100):\n    \"\"\"列出所有公开频道\"\"\"\n    resp = self.client.conversations_list(limit=limit)\n    return [{\"id\": c[\"id\"], \"name\": c[\"name\"], \"members\": c.get(\"num_members\", 0)}\n            for c in resp[\"channels\"]]\n\ndef create_channel(self, name: str, is_private: bool = False):\n    \"\"\"创建频道\"\"\"\n    resp = self.client.conversations_create(name=name, is_private=is_private)\n    return resp[\"channel\"][\"id\"]\n\ndef invite_to_channel(self, channel_id: str, user_ids: list):\n    \"\"\"邀请用户到频道\"\"\"\n    self.client.conversations_invite(channel=channel_id, users=\",\".join(user_ids))\n```\n\n### 4. 搜索历史消息\n\n```python\ndef search_messages(self, query: str, limit: int = 10):\n    \"\"\"搜索消息历史\"\"\"\n    resp = self.client.search_messages(query=query, count=limit)\n    results = []\n    for msg in resp[\"messages\"][\"matches\"]:\n        results.append({\n            \"channel\": msg[\"channel\"][\"name\"],\n            \"user\": msg.get(\"username\", msg.get(\"user\", \"unknown\")),\n            \"text\": msg[\"text\"][:200],\n            \"ts\": msg[\"ts\"],\n            \"permalink\": msg.get(\"permalink\", \"\")\n        })\n    return results\n\ndef get_channel_history(self, channel_id: str, limit: int = 50):\n    \"\"\"获取频道最近消息\"\"\"\n    resp = self.client.conversations_history(channel=channel_id, limit=limit)\n    return [{\"user\": m.get(\"user\", \"unknown\"), \"text\": m[\"text\"][:200], \"ts\": m[\"ts\"]}\n            for m in resp[\"messages\"]]\n```\n\n### 5. Webhook方式（无需Bot Token）\n\n```python\nimport requests\nimport json\n\ndef send_via_webhook(webhook_url: str, text: str):\n    \"\"\"通过Incoming Webhook发送消息\"\"\"\n    payload = {\"text\": text}\n    resp = requests.post(webhook_url, json=payload)\n    return resp.status_code == 200\n\n# 创建Webhook: Slack API → Incoming Webhooks → Add New Webhook\nsend_via_webhook(\"https:\u002F\u002Fhooks.slack.com\u002Fservices\u002FT00\u002FB00\u002Fxxxxx\",\n                 \"Deployment complete: v2.3.1 is live!\")\n```\n\n### 6. 文件上传\n\n```python\ndef upload_file(self, channel_id: str, filepath: str, title: str = \"\"):\n    \"\"\"上传文件到频道\"\"\"\n    with open(filepath, \"rb\") as f:\n        resp = self.client.files_upload_v2(\n            channel=channel_id,\n            file=f,\n            title=title or os.path.basename(filepath)\n        )\n    return resp[\"file\"][\"permalink\"]\n```\n\n## 使用场景\n\n1. **自动通知**: CI\u002FCD部署状态、监控告警、定时报告推送\n2. **团队协作**: AI助手自动回复常见问题、创建任务频道\n3. **消息存档**: 按关键词搜索历史，追溯决策记录\n4. **告警集成**: 服务宕机、错误率飙升时自动通知值班人员\n5. **文件分发**: 自动分享报表、日志到指定频道\n\n## 配置\n\n```yaml\ntoken: \"xoxb-xxxxxxxxxxxx\"\ndefault_channel: \"#general\"\nwebhook_url: \"https:\u002F\u002Fhooks.slack.com\u002Fservices\u002F...\"\nbot_name: \"AI Assistant\"\nbot_icon: \":robot_face:\"\n```\n\n## 错误处理\n\n```python\ndef safe_post(self, channel: str, text: str) -> bool:\n    try:\n        self.post_message(channel, text)\n        return True\n    except SlackApiError as e:\n        if e.response[\"error\"] == \"not_in_channel\":\n            self.client.conversations_join(channel=channel)\n            return self.safe_post(channel, text)\n        elif e.response[\"error\"] == \"channel_not_found\":\n            print(f\"Channel not found: {channel}\")\n            return False\n        else:\n            print(f\"Slack API error: {e.response['error']}\")\n            return False\n```\n","# Slack Helper - Slack助手\n\n> 激活词: Slack \u002F 消息 \u002F 通知 \u002F 团队\n\n## 安装\n\n```bash\npip install slack-sdk aiohttp\n```\n\n## 获取Token\n\n1. 访问 https:\u002F\u002Fapi.slack.com\u002Fapps\n2. 创建新App → 选择 \"From scratch\"\n3. 添加 Bot Token Scopes: `chat:write`, `channels:read`, `channels:history`\n4. 安装App到工作区，复制 Bot User OAuth Token\n\n## Python实现\n\n### 1. 发送消息到频道\n\n```python\nfrom slack_sdk import WebClient\n\nclass SlackHelper:\n    def __init__(self, token: str):\n        self.client = WebClient(token=token)\n    \n    def post_message(self, channel: str, text: str, blocks: list = None):\n        \"\"\"发送文本或富文本消息\"\"\"\n        params = {\"channel\": channel, \"text\": text}\n        if blocks:\n            params[\"blocks\"] = blocks\n        resp = self.client.chat_postMessage(**params)\n        return resp[\"ts\"]  # 消息时间戳，可用于回复\u002F编辑\n    \n    def post_blocks(self, channel: str, blocks: list, fallback: str = \"\"):\n        \"\"\"发送Block Kit富消息\"\"\"\n        return self.post_message(channel, fallback, blocks=blocks)\n\nslack = SlackHelper(\"xoxb-your-token-here\")\nslack.post_message(\"#general\", \"Hello from AI assistant!\")\n```\n\n### 2. Block Kit 富消息模板\n\n```python\ndef alert_block(title: str, message: str, severity: str = \"warning\"):\n    colors = {\"info\": \"#3498db\", \"warning\": \"#f39c12\", \"error\": \"#e74c3c\", \"success\": \"#2ecc71\"}\n    return [\n        {\n            \"type\": \"header\",\n            \"text\": {\"type\": \"plain_text\", \"text\": f\"⚠️ {title}\"}\n        },\n        {\n            \"type\": \"section\",\n            \"text\": {\"type\": \"mrkdwn\", \"text\": message}\n        },\n        {\n            \"type\": \"context\",\n            \"elements\": [{\"type\": \"mrkdwn\", \"text\": f\"Severity: *{severity}*\"}]\n        }\n    ]\n\nslack.post_blocks(\"#alerts\", alert_block(\"Deploy Failed\", \"Build #42 failed on staging\"))\n```\n\n### 3. 频道列表和管理\n\n```python\ndef list_channels(self, limit: int = 100):\n    \"\"\"列出所有公开频道\"\"\"\n    resp = self.client.conversations_list(limit=limit)\n    return [{\"id\": c[\"id\"], \"name\": c[\"name\"], \"members\": c.get(\"num_members\", 0)}\n            for c in resp[\"channels\"]]\n\ndef create_channel(self, name: str, is_private: bool = False):\n    \"\"\"创建频道\"\"\"\n    resp = self.client.conversations_create(name=name, is_private=is_private)\n    return resp[\"channel\"][\"id\"]\n\ndef invite_to_channel(self, channel_id: str, user_ids: list):\n    \"\"\"邀请用户到频道\"\"\"\n    self.client.conversations_invite(channel=channel_id, users=\",\".join(user_ids))\n```\n\n### 4. 搜索历史消息\n\n```python\ndef search_messages(self, query: str, limit: int = 10):\n    \"\"\"搜索消息历史\"\"\"\n    resp = self.client.search_messages(query=query, count=limit)\n    results = []\n    for msg in resp[\"messages\"][\"matches\"]:\n        results.append({\n            \"channel\": msg[\"channel\"][\"name\"],\n            \"user\": msg.get(\"username\", msg.get(\"user\", \"unknown\")),\n            \"text\": msg[\"text\"][:200],\n            \"ts\": msg[\"ts\"],\n            \"permalink\": msg.get(\"permalink\", \"\")\n        })\n    return results\n\ndef get_channel_history(self, channel_id: str, limit: int = 50):\n    \"\"\"获取频道最近消息\"\"\"\n    resp = self.client.conversations_history(channel=channel_id, limit=limit)\n    return [{\"user\": m.get(\"user\", \"unknown\"), \"text\": m[\"text\"][:200], \"ts\": m[\"ts\"]}\n            for m in resp[\"messages\"]]\n```\n\n### 5. Webhook方式（无需Bot Token）\n\n```python\nimport requests\nimport json\n\ndef send_via_webhook(webhook_url: str, text: str):\n    \"\"\"通过Incoming Webhook发送消息\"\"\"\n    payload = {\"text\": text}\n    resp = requests.post(webhook_url, json=payload)\n    return resp.status_code == 200\n\n# 创建Webhook: Slack API → Incoming Webhooks → Add New Webhook\nsend_via_webhook(\"https:\u002F\u002Fhooks.slack.com\u002Fservices\u002FT00\u002FB00\u002Fxxxxx\",\n                 \"Deployment complete: v2.3.1 is live!\")\n```\n\n### 6. 文件上传\n\n```python\ndef upload_file(self, channel_id: str, filepath: str, title: str = \"\"):\n    \"\"\"上传文件到频道\"\"\"\n    with open(filepath, \"rb\") as f:\n        resp = self.client.files_upload_v2(\n            channel=channel_id,\n            file=f,\n            title=title or os.path.basename(filepath)\n        )\n    return resp[\"file\"][\"permalink\"]\n```\n\n## 使用场景\n\n1. **自动通知**: CI\u002FCD部署状态、监控告警、定时报告推送\n2. **团队协作**: AI助手自动回复常见问题、创建任务频道\n3. **消息存档**: 按关键词搜索历史，追溯决策记录\n4. **告警集成**: 服务宕机、错误率飙升时自动通知值班人员\n5. **文件分发**: 自动分享报表、日志到指定频道\n\n## 配置\n\n```yaml\ntoken: \"xoxb-xxxxxxxxxxxx\"\ndefault_channel: \"#general\"\nwebhook_url: \"https:\u002F\u002Fhooks.slack.com\u002Fservices\u002F...\"\nbot_name: \"AI Assistant\"\nbot_icon: \":robot_face:\"\n```\n\n## 错误处理\n\n```python\ndef safe_post(self, channel: str, text: str) -> bool:\n    try:\n        self.post_message(channel, text)\n        return True\n    except SlackApiError as e:\n        if e.response[\"error\"] == \"not_in_channel\":\n            self.client.conversations_join(channel=channel)\n            return self.safe_post(channel, text)\n        elif e.response[\"error\"] == \"channel_not_found\":\n            print(f\"Channel not found: {channel}\")\n            return False\n        else:\n            print(f\"Slack API error: {e.response['error']}\")\n            return False\n```\n",{"name":5,"tags":24,"author":32,"source":33,"version":34,"metadata":35,"description":7},[25,26,27,28,29,30,31],"slack","messaging","notification","team","communication","webhook","bot","laosi","adapted","1.0.0",{"openclaw":36},{"install":37,"requires":39},[38],"pip install slack-sdk aiohttp",{"python":40},[41,42],"slack-sdk","aiohttp","master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Fl\u002Flaosi-slack",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill slack-helper",{"tool":58,"command":59},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill slack-helper",{"tool":61,"command":62},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill slack-helper","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fl\u002Flaosi-slack\u002FSKILL.md",true,[],[67,74,81,88,95,102],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]