一键导入
send-group-message
Send a message to a specified group by group_id via customer_service APIs. Use when user asks topoclaw to post content into a group.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Send a message to a specified group by group_id via customer_service APIs. Use when user asks topoclaw to post content into a group.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
A-share (沪深) investment assistance using akshare_stock and akshare_stock_technical — fundamentals, technicals, sector context, and decision framing (not financial advice).
Use the browser to search the web, log into websites, or extract live page content using spawn_browser_interactive_task.
Search and install agent skills from ClawHub, the public skill registry.
Retrieve current user's friends and assistant profiles (friend name/signature/preferences + assistant nickname/intro/baseUrl) from customer_service APIs. Use when user asks to inspect or export social/contact profile data.
Unified group creation skill supporting multiple friends and assistants, with optional first message sending.
Schedule reminders and recurring tasks.
| name | send-group-message |
| description | Send a message to a specified group by group_id via customer_service APIs. Use when user asks topoclaw to post content into a group. |
| metadata | {"topoclaw":{"emoji":"📣","requires":{"bins":["python"]}}} |
Use this skill when the user wants topoclaw to send a message to a specific group.
TOPO_IMEI (required): current logged-in user IMEI
group_id (required): target group IDcontent (required): message text to sendsender (optional, default topoclaw): assistant display name in groupTOPO_GROUP_IDTOPO_GROUP_MESSAGETOPO_GROUP_SENDERCUSTOMER_SERVICE_URL (optional): service base URL overrideVITE_MOBILE_AGENT_CUSTOMER_SERVICE_URL (recommended): default customer_service base URL from TopoDesktop .env.local
TopoDesktop/.env.local127.0.0.1Structured JSON:
successimeigroup_idcontent_previewsenderraw (server response)import os
import json
import requests
imei = os.getenv("TOPO_IMEI", "").strip() or os.getenv("IMEI", "").strip()
base_url = (
os.getenv("TOPO_ACTIVE_CUSTOMER_SERVICE_URL", "").strip()
or
os.getenv("CUSTOMER_SERVICE_URL", "").strip()
or os.getenv("VITE_MOBILE_AGENT_CUSTOMER_SERVICE_URL", "").strip()
).rstrip("/")
# Editable inputs(优先环境变量自动填充,减少首次调用重试)
group_id = os.getenv("TOPO_GROUP_ID", "").strip()
content = os.getenv("TOPO_GROUP_MESSAGE", "").strip()
sender = os.getenv("TOPO_GROUP_SENDER", "").strip() or "topoclaw"
if not imei:
raise RuntimeError("Missing TOPO_IMEI (current caller IMEI)")
if not base_url:
raise RuntimeError("Missing customer_service URL (TOPO_ACTIVE_CUSTOMER_SERVICE_URL / CUSTOMER_SERVICE_URL / VITE_MOBILE_AGENT_CUSTOMER_SERVICE_URL)")
if not group_id:
raise RuntimeError("group_id is required (set TOPO_GROUP_ID)")
if not content:
raise RuntimeError("content is required (set TOPO_GROUP_MESSAGE)")
url = f"{base_url}/api/groups/send-assistant-message"
payload = {
"imei": imei,
"groupId": group_id,
"content": content,
"sender": sender,
}
resp = requests.post(url, json=payload, timeout=20)
resp.raise_for_status()
raw = resp.json()
if not raw.get("success"):
raise RuntimeError(f"send group message failed: {raw}")
result = {
"success": True,
"imei": imei,
"group_id": group_id,
"content_preview": content[:80],
"sender": sender,
"raw": raw,
}
print(json.dumps(result, ensure_ascii=False, indent=2))