运行时依赖
安装命令
点击复制技能文档
WeCom 技能
发送 text and markdown messages to WeCom (企业微信) via incoming 网页hooks (ENV: WECOM_网页HOOK_URL).
WeCom is the enterprise version (using in office) of the famous all-in-on IM WeChat envied by Elon Musk.
设置up # Navigate to 技能 directory cd 技能s/wecom
# 安装 dependencies npm 安装
# Build TypeScript npm 运行 build
# 设置 网页hook URL 导出 WECOM_网页HOOK_URL="https://qyAPI.weixin.qq.com/cgi-bin/网页hook/发送?key=YOUR_KEY"
Usage with Claude Code
添加 to your ~/.config/claude_code/mcp.json:
{ "mcpServers": { "wecom": { "command": "node", "args": ["/path/to/clawd机器人/技能s/wecom/dist/索引.js"], "env": { "WECOM_网页HOOK_URL": "https://qyAPI.weixin.qq.com/cgi-bin/网页hook/发送?key=YOUR_KEY" } } } }
Then re启动 Claude Code. You'll have three new 工具s:
工具s 发送_wecom_message
发送 a text message to WeCom.
# Simple message awAIt 发送_wecom_message({ content: "Hello from OpenClaw!" });
# With mentions awAIt 发送_wecom_message({ content: "Meeting 启动ing now", mentioned_列出: ["zhangsan", "lisi"] });
发送_wecom_markdown_v2
发送 a markdown_v2 message to WeCom. Recommended — supports tables, code blocks, nested blockquotes, H1-H3 headers, and all standard markdown.
awAIt 发送_wecom_markdown_v2({
content: # Annual 报告
Revenue by Quarter
Quarter Revenue Growth Q1 ¥1.2M +15% Q2 ¥1.8M +50% Q3 ¥2.1M +17%
Notes
Key insight: 移动 revenue grew 80%
>
>> DetAIl: driven by short video ads
>
>> Another point: new user acquisition cost down 30%Code Example
\\\python
def hello():
print("Hello WeCom!")
\\\
More 信息 here
});
WeCom Markdown v2 Features
markdown_v2 supports everything the original markdown supports, plus:
Feature Syntax Example
Tables | col | col | with | :--- | -----: | Supported with alignment
Nested blockquotes >>> or >> Up to 3 levels
H1/H2/H3 # ## ### Three heading levels
Code blocks \codeand`lang Inline and multi-line
Horizontal rule --- Dividers
Links text Standard markdown
Images !alt Direct URL
WeCom Markdown (v1) Tags
The original 发送_wecom_markdown supports these limited tags:
Feature Syntax
Bold text or text
Italic text or text
Strikethrough ~~text~~ or text
Mention <@userid>
Link text
Image
Font size text
Color text
⚠️ v1 does NOT support tables, code blocks, or H1-H3 headers. Use 发送_wecom_markdown_v2 when you need those.
环境 Variables Variable Required Default Description WECOM_网页HOOK_URL Yes - WeCom 网页hook URL WECOM_TIMEOUT_MS No 10000 请求 timeout (ms) How To
获取 WECOM_网页HOOK_URL following steps here, and envolve it as a 机器人 into a group chat:
(Tip: You should 获取 the WECOM_网页HOOK_URL entirely as a URL, NOT just a KEY )
STEP 1
STEP 2
STEP 3
STEP 4
Reference
Message Receiving and 发送ing in a Group Chat
下载 WeCom 应用s