Introduction¶
Alerts, approval results, and scheduled task statuses—many teams eventually rely on WeCom (Enterprise WeChat) for these notifications. A common approach is to write separate scripts or set up an internal service layer to manually maintain access_tokens, look up UserIDs, and call sending interfaces. Every time you need to change the copy or switch recipients, you have to touch the code or modify configurations.
Below is an introduction to the community Skill wecome-send-message on SkillHub (installation coordinate: @user_6976792a/wecom-send-message). It encapsulates credential configuration for WeCom self-built applications, contact lookups, and various message types into a SKILL.md workflow, where the Agent calls tools/wecom_client.py according to the documentation to perform operations.
What is this¶
wecome-send-message targets WeCom message pushing and contact directory queries: Sending messages to specified users via WeCom self-built applications, and searching the contact directory by name, phone, email, etc.
- Maintainer: SkillHub community publisher
user_6976792a, source is community, categorybusiness-ops - Current Version: 1.0.0
- SkillHub Page Data (subject to page display): Rating 100000, Downloads 2293, Installs 269; Tags include
requires_api_key=true(actually requires configuring WeCom CorpID, AgentID, Secret, etc.) - Official Entry: SkillHub Skill Page, api.skillhub.cn Coordinate Page
The name field in the package’s SKILL.md is wecom-api, which is inconsistent with the store display name wecome-send-message; refer to the coordinate @user_6976792a/wecom-send-message for installation and reference.
Core Functions¶
The following capabilities are derived from the published SKILL.md and tools/wecom_client.py subcommands, which the Agent executes by calling the Python script via Bash.
- Credentials & Connection:
checkchecks readiness;setupwrites to a private.envin the Skill directory;verifyvalidates API connection. - Contact Directory: Fuzzy search by name, precise lookup by phone or email, get user details, list departments and department members (including recursion).
- Message Pushing: Send text, Markdown, and text cards to single or multiple UserIDs (separated by
|); supports@alland a--preview/--yesconfirmation flow for multi-person scenarios. - Operations Support:
historyviews recent sending audits; common WeCom error codes have corresponding handling instructions in the Skill documentation; tokens are cached in the Skill’s private.cache/by default, and audits are written to.state/message_audit.json.
Prerequisites: Python 3, and pip install requests.
Installation and Activation¶
1. Install SkillHub CLI (if not already installed)¶
command -v skillhub && skillhub --version
If not installed, follow the SkillHub installation documentation (full installation example):
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
2. Install this Skill to the current Agent’s skills directory¶
When installing, you must use --dir to point to the skills directory recognized by the Agent; otherwise, it may default to ./skills/ and fail to load.
skillhub install @user_6976792a/wecom-send-message --dir <skills directory>
Common paths (from SkillHub installation documentation):
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
You can also give the following prompt to an AI to let it complete the installation according to the skillhub installation instructions:
Please install `@user_6976792a/wecom-send-message` according to https://skillhub.cn/install/skillhub.md.
3. Configure WeCom Credentials¶
Before first use, run a check in the Skill directory (replace ${CLAUDE_SKILL_DIR} with the actual installation path, e.g., ~/.cursor/skills/@user_6976792a/wecom-send-message):
python3 ${CLAUDE_SKILL_DIR}/tools/wecom_client.py check
If not ready, it is recommended to use setup to write to the Skill’s private .env:
python3 ${CLAUDE_SKILL_DIR}/tools/wecom_client.py setup \
--corp-id "Your CorpID" \
--agent-id "Your AgentID" \
--secret "Your App Secret" \
--contact-secret "Your Contact Secret"
The CorpID, AgentID, and Secret come from the WeCom admin console’s self-built application; contact-secret is optional and used for contact directory capabilities. If not configured, the documentation states it will fall back to the application Secret. You can also inject them via environment variables WECOM_CORP_ID, WECOM_AGENT_ID, WECOM_SECRET, WECOM_CONTACT_SECRET or via OpenClaw’s openclaw secrets set (see Skill documentation).
Verify after configuration:
python3 ${CLAUDE_SKILL_DIR}/tools/wecom_client.py verify
Typical Usage¶
The Skill declares triggers when users express intentions like “Send a WeCom message to XX”, “WeCom push”, “wecom send”, etc.; you can also use the /wecom-api style entry in the documentation (depending on how the Agent mounts the Skill).
Look up person by name and send text¶
python3 ${CLAUDE_SKILL_DIR}/tools/wecom_client.py search-name --name "Zhang San"
python3 ${CLAUDE_SKILL_DIR}/tools/wecom_client.py send-text \
--to "zhangsan" \
--content "Meeting tomorrow at 10 AM, please attend on time."
Multi-person sending (preview then confirm)¶
python3 ${CLAUDE_SKILL_DIR}/tools/wecom_client.py send-text \
--to "zhangsan|lisi|wangwu" \
--content "Reminder: Submit weekly report before leaving today" \
--preview
python3 ${CLAUDE_SKILL_DIR}/tools/wecom_client.py send-text \
--to "zhangsan|lisi|wangwu" \
--content "Reminder: Submit weekly report before leaving today" \
--yes
Department members and Markdown notifications¶
python3 ${CLAUDE_SKILL_DIR}/tools/wecom_client.py dept-list
python3 ${CLAUDE_SKILL_DIR}/tools/wecom_client.py dept-users --dept-id 1 --recursive
python3 ${CLAUDE_SKILL_DIR}/tools/wecom_client.py send-markdown \
--to "zhangsan" \
--content "## Meeting Notice\n> Time: Tomorrow 10:00\n\nPlease attend on time."
In environments like Cursor, you typically describe the intention in natural language, and the Agent reads SKILL.md to execute the above commands; SKILL.md specifies that allowed tools are Read, Write, Edit, and Bash.
Use Cases and Notes¶
Who it is for: Teams that have enabled self-built applications in WeCom and need to hand over “looking up people + sending messages” to a coding Agent; categorized as business-ops, suitable for operations notifications, collaboration reminders, and lightweight office automation.
Limitations and Notes:
- Recipients must be within the application’s visible range; otherwise, errors like
60020may occur; contact directory queries depend on the corresponding Secret and permissions. - Batch sending and
@allrequire--previewfirst by default; add--yesafter confirmation to avoid accidental sending. - Secrets should not be written into code or logs; the Skill only reads the
.envunder its directory by default, and you can specify other env files viaWECOM_ENV_FILE. - The store name
wecome-send-messagecoexists with the package Skill namewecom-apiand slugwecom-send-message; when troubleshooting, refer to the installation directory and coordinate.
Conclusion¶
wecome-send-message consolidates the messaging and contact directory capabilities of WeCom self-built applications into an installable Agent Skill: localized credentials, reproducible command-line operations, and documentation containing error codes and security conventions. If you are already using SkillHub to manage Skills, you can install it via the coordinate and drive WeCom notifications via conversation after verify passes.
Official URL: https://www.skillhub.cn/skills/user_6976792a/wecom-send-message