{"skill":{"slug":"feishu-new-chat","displayName":"Feishu New Chat","summary":"Create a new topic in a Feishu topic-group, and optionally add the first in-thread reply (with optional @mention) by sending as the user. Use when the user s...","description":"---\nname: feishu-topic-spawn\ndescription: \"Create a new topic in a Feishu topic-group, and optionally add the first in-thread reply (with optional @mention) by sending as the user. Use when the user says things like ‘开话题’, ‘/topic’, ‘开个新话题’, ‘在话题里回一条’, or asks to simulate a ChatGPT-style ‘new chat’ workflow inside a Feishu topic-group. In a Feishu topic-group, a top-level send creates the topic; replying with `reply_in_thread=true` posts inside that topic.\"\n---\n\n# Feishu Topic Spawn\n\nCreate a new Feishu topic in a dedicated **topic-group**, then optionally post the **first thread reply** inside it.\n\nKeep this skill lightweight. Use it for topic creation and first-reply bootstrapping, not for session routing magic.\n\n## Validated behavior\n\nThis workflow has been verified:\n\n1. `feishu_im_user_message.send` to a topic-group `chat_id` creates a **new top-level topic**.\n2. `feishu_im_user_message.reply` with `reply_in_thread=true` posts **inside that topic**.\n3. A reply can `@` a user by placing Feishu text markup directly in the content:\n\n```text\n<at user_id=\"ou_xxx\">Name</at> 你好\n```\n\nThis is the current working path. Prefer it over assumptions about implicit reply routing.\n\n## Preconditions\n\nRequire all of the following:\n\n- The destination is a real **Feishu topic-group**.\n- The user has explicitly asked to send the message.\n- The user has permission to post in that group.\n- User-auth Feishu messaging is available for `feishu_im_user_message`.\n\nIf user auth is unavailable or expired, stop and ask the user to re-authorize.\n\nIf the target group is not a topic-group, explain that the result will only be a normal group message, not a topic.\n\n## Default target group\n\nDefault to the fixed topic-group configured in `TOOLS.md`, if one exists.\n\nDo **not** hardcode a personal/local group name into a public skill.\n\nUse `feishu_chat` with `action=search` to resolve the group.\n\nIf the user explicitly names a target group, use that group.\n\nIf the user does not name a group and no local default is configured:\n- Stop.\n- Ask which Feishu topic-group to use.\n\nIf no matching group is found:\n- Stop.\n- Tell the user the topic-group does not exist yet.\n- Ask them to create it manually first.\n\n## Workflow\n\n### 1. Resolve target group\n\n- If the user explicitly names a group, use that name.\n- Otherwise use the local default topic-group from `TOOLS.md`, if configured.\n- If no local default exists, ask the user which topic-group to use.\n- Resolve the `chat_id` with `feishu_chat.search`.\n\n### 2. Parse requested action\n\nSupport four shapes:\n\n#### A. Open topic only\nExample:\n```text\n开话题：OpenClaw 多线程 SOP\n```\n\nSend one top-level text message only.\n\n#### B. Open topic + first thread reply\nExample:\n```text\n开话题：OpenClaw 多线程 SOP｜先写一个 5 点大纲\n```\n\nInterpret as:\n- title = `OpenClaw 多线程 SOP`\n- first thread reply = `先写一个 5 点大纲`\n\n#### C. Open topic + first thread reply + @mention\nExample:\n```text\n开话题：测试 1｜回一条：@我 测试\n```\n\nInterpret as:\n- top-level topic title/text\n- then a thread reply\n- optionally prepend a Feishu `<at user_id=\"...\">...</at>` mention\n\n#### D. Open topic + carry over prior context + ask a new question\nExample:\n```text\n开个新话题聊这个，把前面几条带过去，然后追问：自由现金流有几个指数？有什么区别？\n```\n\nInterpret as:\n- create a clean new topic\n- carry over only the minimum relevant context\n- put both **context and the new question into the same top-level topic-opening message**\n- make the new question impossible to miss\n- avoid a second seed message unless the user explicitly wants an extra in-thread reply\n\n### 3. Create the topic\n\nUse `feishu_im_user_message.send`:\n- `action=send`\n- `receive_id_type=chat_id`\n- `receive_id=<chat_id>`\n- `msg_type=text`\n- `content={\"text\":\"<top-level text>\"}`\n\nThe returned `message_id` is the topic root.\n\n### 4. Optionally add the first thread reply\n\nIf the user asked for an initial reply, use `feishu_im_user_message.reply`:\n- `action=reply`\n- `message_id=<topic root message_id>`\n- `reply_in_thread=true`\n- `msg_type=text`\n- `content={\"text\":\"<reply text>\"}`\n\nIf an @mention is requested, format it directly in the text:\n\n```text\n<at user_id=\"ou_xxx\">Name</at> 回复内容\n```\n\nUse the current user open_id when the user says `@我`.\n\n### 5. When carrying context into a new topic, keep it simple\n\nFor **context carry-over + new question**, prefer **one single top-level message**.\nDo not add a second seed reply unless the user explicitly wants one, because two user messages may trigger two assistant replies.\n\nUse a simple structure:\n\n```text\n<标题>\n\n问题：...\n\n前情提要：...\n```\n\nOr, when a short summary reads better:\n\n```text\n<标题>\n\n问题：...\n\n前情提要：\n- ...\n- ...\n```\n\nRules:\n- Put the real question first.\n- Keep the summary short.\n- Do not add extra instruction-y wording unless absolutely needed.\n- The goal is not to outsmart the model; the goal is to make the follow-up obvious.\n\nExample:\n\n```text\nHALO：自由现金流指数有什么区别\n\n问题：\nA股里自由现金流目前有几个主流指数？它们分别有什么区别？\n\n前情提要：\n- 刚讨论过 HALO 在 A 股的映射，涉及资源、能源、公用事业、电网、交运、央企红利、现金流。\n- 这次只是在这个基础上继续追问自由现金流指数。\n```\n\n## Parsing guidance\n\nTreat all of the following as likely triggers:\n- `开话题：标题`\n- `开个话题：标题`\n- `开个新话题：标题`\n- `/topic 标题`\n- `/topic 标题｜正文`\n- `新开一个话题，然后在话题里回复一条`\n- `开话题: 标题, 然后在话题里回复 1 条测试并且 at 我`\n\nUseful parsing rules:\n- Split on the first `：` / `:` to isolate the command from the payload.\n- Treat `｜` / `|` as a likely separator between `title` and `first reply`.\n- Phrases like `然后回复一条`, `回一条`, `在话题里回复`, `并且 at 我`, `@我` indicate an in-thread follow-up.\n- Phrases like `把前面几条带过去`, `把刚才聊的内容带过去`, `新开一个话题聊这个`, `继续追问`, `新的追问` indicate a **context-carrying seed reply** rather than a plain freeform reply.\n- If only one segment exists, treat it as topic text only.\n\nDo not overfit parsing. If the message is ambiguous, ask one short clarification question.\n\n## Tool preference\n\nPrefer the validated user-message path for this skill:\n- `feishu_im_user_message.send`\n- `feishu_im_user_message.reply`\n\nReason: this path has been validated end-to-end for:\n- topic creation\n- in-thread reply\n- @mention markup\n\nDo not rely on ordinary assistant reply routing to create a fresh topic.\n\n## Report back\n\nAfter success, tell the user briefly:\n- target group\n- topic text/title used\n- whether a thread reply was added\n- whether an @mention was included\n\nKeep it short.\n\n## Boundaries\n\n- This skill only works as intended in a **Feishu topic-group**.\n- This skill does **not** create Feishu groups.\n- This skill should not silently send as the user unless the user explicitly asked.\n- This skill is for **topic bootstrapping**: create the topic, optionally seed the first thread reply, then let later conversation continue inside that topic.\n- If the user wants a normal group message instead of a topic, do not force this skill.\n\n## Minimal examples\n\n### Example 1: topic only\nUser:\n```text\n开话题：测试 4\n```\n\nAction:\n- resolve the configured default topic-group (or ask the user which group to use)\n- send top-level `测试 4`\n\n### Example 2: topic + thread reply\nUser:\n```text\n开话题：测试 3｜不 @ 的线程回复测试\n```\n\nAction:\n- create top-level `测试 3`\n- reply in thread with `不 @ 的线程回复测试`\n\n### Example 3: topic + thread reply + @me\nUser:\n```text\n开话题：测试 2｜@我 再测一次\n```\n\nAction:\n- create top-level `测试 2`\n- reply in thread with:\n```text\n<at user_id=\"ou_xxx\">Name</at> 再测一次\n```\n\n### Example 4: carry context + ask one new question cleanly\nUser:\n```text\n开个新话题聊这个，把前面几条带过去，然后追问：自由现金流有几个指数？有什么区别？\n```\n\nAction:\n- create a fresh topic title focused on the new question\n- send **one top-level topic-opening message**\n- put `问题：...` first\n- then add a short `前情提要：...`\n- do **not** add a second seed reply unless the user explicitly asks for one\n","tags":{"latest":"0.1.2"},"stats":{"comments":0,"downloads":623,"installsAllTime":24,"installsCurrent":0,"stars":0,"versions":3},"createdAt":1773063035754,"updatedAt":1778491788483},"latestVersion":{"version":"0.1.2","createdAt":1773066542803,"changelog":"Remove the hardcoded local topic-group name from the public skill and make the default target group generic/config-driven.","license":"MIT-0"},"metadata":null,"owner":{"handle":"dxxbb","userId":"s176gxb6y888wd14hpgf6b39gh83g0qv","displayName":"dxxbb","image":"https://avatars.githubusercontent.com/u/2967502?v=4"},"moderation":null}