← ClaudeAtlas

wechat-messagelisted

此技能用于在 macOS/Windows 上通过脚本自动化发送微信消息。当用户需要"发送微信消息"、"给微信好友发消息"、"微信自动发送"、"微信群里发消息"、或提到"wechat message"、"微信自动化"时使用此技能。macOS 使用 AppleScript + cliclick,Windows 使用 PowerShell,按平台选用对应脚本。
tiancheng91/skills · ★ 2 · AI & Automation · score 57
Install: claude install-skill tiancheng91/skills
# 微信消息发送技能 此技能通过平台脚本实现微信消息的自动化发送:**macOS 使用 AppleScript + cliclick**,**Windows 使用 PowerShell**。按当前操作系统选用对应脚本即可。 ## 功能概述 - 自动激活微信应用 - 搜索指定联系人或群组 - 发送指定消息内容 - 发送本地图片文件(指定路径) - 支持中文和特殊字符 ## 使用方法 ### macOS(AppleScript) ```bash osascript scripts/wechat_automation_script.applescript "<联系人名称>" "<消息内容>" "[图片路径]" ``` ### Windows(PowerShell) ```powershell powershell -ExecutionPolicy Bypass -File scripts/wechat_automation_script.ps1 "<联系人名称>" "<消息内容>" "[图片路径]" ``` ### 参数说明 | 参数 | 必填 | 说明 | |------|------|------| | 联系人名称 | 是 | 微信联系人名称或群名称,需完全匹配 | | 消息内容 | 否* | 要发送的消息文本;与图片至少填一项 | | 图片路径/URL | 否* | 本地图片路径或 `http(s)://` 图片地址;与消息至少填一项 | \* 消息与图片可同时提供:先发送文本,再发送图片。 ### 使用示例 **macOS:** ```bash osascript scripts/wechat_automation_script.applescript "张三" "你好,今天有空吗?" osascript scripts/wechat_automation_script.applescript "工作群" "大家好!" osascript scripts/wechat_automation_script.applescript "张三" "" "/Users/me/screenshot.png" osascript scripts/wechat_automation_script.applescript "张三" "请看截图" "/Users/me/screenshot.png" osascript scripts/wechat_automation_script.applescript "张三" "" "https://example.com/image.png" ``` **Windows:** ```powershell powershell -ExecutionPolicy Bypass -File scripts/wechat_automation_script.ps1 "张三" "你好,今天有空吗?" powershell -ExecutionPolicy Bypass -File scripts/wechat_automation_script.ps1 "工作群" "大家好!" powershell -ExecutionPolicy Bypass -File scripts/wechat_automation_script.ps1 "张三" "" "C:\Users\me\screenshot.png" ``` ## 工作流程 两平台流程一致,仅快捷键不同: 1. **激活微信** - 将微信窗口