yuanflow-cli 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -31,6 +31,10 @@ yuanflow-cli commands list
31
31
  yuanflow-cli schema douyin.video-detail
32
32
  yuanflow-cli schema comments.douyin.comments
33
33
  yuanflow-cli comments collect --platform douyin --target "https://v.douyin.com/xxx/" --format agent-json
34
+ yuanflow-cli works detail --platform douyin --target "https://v.douyin.com/xxx/" --format agent-json
35
+ yuanflow-cli works download --platform douyin --target "https://v.douyin.com/xxx/" --region CN --format agent-json
36
+ yuanflow-cli search content --platform xiaohongshu --keyword "美妆" --format agent-json
37
+ yuanflow-cli search users --platform instagram --keyword "nasa" --format agent-json
34
38
  yuanflow-cli list douyin
35
39
  ```
36
40
 
@@ -63,6 +67,26 @@ yuanflow-cli comments collect --platform youtube --target video_id --action comm
63
67
 
64
68
  Agent 可以先用 `yuanflow-cli commands list` 查看全部命令,再用 `yuanflow-cli schema comments.douyin.comments` 查看某个评论采集命令的参数、接口路径和返回说明。
65
69
 
70
+ ### 综合作品工具
71
+
72
+ 四类综合工具统一走受控命令,适合 Agent 通过自然语言稳定调用:
73
+
74
+ ```bash
75
+ yuanflow-cli works detail --platform douyin --target "https://v.douyin.com/xxx/" --format agent-json
76
+ yuanflow-cli works download --platform youtube --target "dQw4w9WgXcQ" --format agent-json
77
+ yuanflow-cli search content --platform xiaohongshu --keyword "美妆" --format agent-json
78
+ yuanflow-cli search users --platform instagram --keyword "nasa" --format agent-json
79
+ ```
80
+
81
+ 命令 key:
82
+
83
+ - `works.<platform>.detail`:单作品详情。
84
+ - `works.<platform>.download`:播放/下载地址候选或视频流信息。
85
+ - `search.<platform>.content`:内容、作品、笔记、文章、帖子搜索。
86
+ - `search.<platform>.users`:账号、用户、作者、频道搜索。
87
+
88
+ Agent 不确定参数时先执行 `commands list`,再用 `schema works.douyin.detail` 或 `schema search.xiaohongshu.content` 查看参数。`--dry-run` 可预览请求映射,不发起真实接口请求,也不要求 token。
89
+
66
90
  ## Skill 安装器
67
91
 
68
92
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yuanflow-cli",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "YuanFlow API CLI and skill installer for supported AI coding agents.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -14,6 +14,10 @@ description: Use when the user asks about social-media API workflows, platform d
14
14
  - 根目录这一份 `SKILL.md`
15
15
  - `yuanflow-cli/`
16
16
  - `作品评论采集/`
17
+ - `作品详情获取工具/`
18
+ - `作品下载综合工具/`
19
+ - `综合搜索工具/`
20
+ - `综合用户搜索工具/`
17
21
 
18
22
  ## 环境判断
19
23
 
@@ -61,6 +65,54 @@ description: Use when the user asks about social-media API workflows, platform d
61
65
 
62
66
  - `作品评论采集`
63
67
 
68
+ ### 3. 走 `作品详情获取工具`
69
+
70
+ 遇到下面这些需求,优先进入这个子 Skill:
71
+
72
+ - 查询单个作品、视频、笔记、文章、帖子、推文、微博、知乎文章的详情。
73
+ - 解析作品链接,获取标题、正文、作者、发布时间、互动统计、媒体信息。
74
+ - 用户给出单个作品 URL、BV 号、视频 ID、帖子 ID 或文章 ID。
75
+
76
+ 子 Skill 名称:
77
+
78
+ - `作品详情获取工具`
79
+
80
+ ### 4. 走 `作品下载综合工具`
81
+
82
+ 遇到下面这些需求,优先进入这个子 Skill:
83
+
84
+ - 获取作品播放链接、下载地址候选、视频流信息。
85
+ - 用户要求下载、保存、获取媒体地址。
86
+ - 平台包括抖音、B站、YouTube、西瓜视频。
87
+
88
+ 子 Skill 名称:
89
+
90
+ - `作品下载综合工具`
91
+
92
+ ### 5. 走 `综合搜索工具`
93
+
94
+ 遇到下面这些需求,优先进入这个子 Skill:
95
+
96
+ - 按关键词搜索内容、作品、笔记、文章、视频、帖子。
97
+ - 做选题、竞品素材、热点素材、内容检索。
98
+ - 平台包括抖音、小红书、B站、微信视频号、TikTok、Instagram、快手、Reddit、Twitter/X、微博、YouTube、知乎、西瓜视频。
99
+
100
+ 子 Skill 名称:
101
+
102
+ - `综合搜索工具`
103
+
104
+ ### 6. 走 `综合用户搜索工具`
105
+
106
+ 遇到下面这些需求,优先进入这个子 Skill:
107
+
108
+ - 搜索账号、作者、达人、用户、频道。
109
+ - 做账号调研、达人筛选、用户线索查找。
110
+ - 平台包括抖音、小红书、微信视频号、TikTok、Instagram、快手、微博、YouTube、知乎。
111
+
112
+ 子 Skill 名称:
113
+
114
+ - `综合用户搜索工具`
115
+
64
116
  ## 多需求时怎么处理
65
117
 
66
118
  如果用户一次提了多段流程,不要强行塞进一个子 Skill,按阶段拆开:
@@ -72,7 +124,7 @@ description: Use when the user asks about social-media API workflows, platform d
72
124
  例如:
73
125
 
74
126
  - “查抖音作品详情、评论、热榜”:
75
- `yuanflow-cli`
127
+ 作品详情走 `作品详情获取工具`,评论走 `作品评论采集`,热榜或其它原子接口走 `yuanflow-cli`
76
128
 
77
129
  ## 维护规则
78
130
 
@@ -5,7 +5,7 @@ description: Use when the user needs atomic API calls for social-media platforms
5
5
 
6
6
  # YuanFlow CLI
7
7
 
8
- 这个 Skill 用于调用 `yuanflow-cli` 这个 npm 包。它适合做原子级 API 调用:查作品详情、下载地址、作者主页、评论、搜索结果、热榜、公众号文章、视频号内容等。
8
+ 这个 Skill 用于调用 `yuanflow-cli` 这个 npm 包。它适合做原子级 API 调用:查作品详情、下载地址、作者主页、评论、搜索结果、热榜、公众号文章、视频号内容等。常见需求优先使用综合命令:`comments collect`、`works detail`、`works download`、`search content`、`search users`。
9
9
 
10
10
  ## 先判断是否要用
11
11
 
@@ -136,6 +136,10 @@ yuanflow-cli list douyin
136
136
  yuanflow-cli commands describe xiaohongshu.search-notes
137
137
  yuanflow-cli schema xiaohongshu.search-notes
138
138
  yuanflow-cli comments collect --platform douyin --target "https://v.douyin.com/xxx/" --format agent-json
139
+ yuanflow-cli works detail --platform douyin --target "https://v.douyin.com/xxx/" --format agent-json
140
+ yuanflow-cli works download --platform douyin --target "https://v.douyin.com/xxx/" --region CN --format agent-json
141
+ yuanflow-cli search content --platform xiaohongshu --keyword "美妆" --format agent-json
142
+ yuanflow-cli search users --platform instagram --keyword "nasa" --format agent-json
139
143
  ```
140
144
 
141
145
  当前 registry 覆盖的平台包括:
@@ -212,6 +216,28 @@ yuanflow-cli comments collect --platform douyin --target "https://v.douyin.com/x
212
216
  }
213
217
  ```
214
218
 
219
+ ### 综合作品与搜索入口
220
+
221
+ 新增综合入口优先给 Agent 使用:
222
+
223
+ | 需求 | 命令 |
224
+ | --- | --- |
225
+ | 单作品详情 | `yuanflow-cli works detail --platform douyin --target "https://v.douyin.com/xxx/" --format agent-json` |
226
+ | 播放/下载地址候选 | `yuanflow-cli works download --platform douyin --target "https://v.douyin.com/xxx/" --region CN --format agent-json` |
227
+ | 内容综合搜索 | `yuanflow-cli search content --platform xiaohongshu --keyword "美妆" --format agent-json` |
228
+ | 用户/账号搜索 | `yuanflow-cli search users --platform instagram --keyword "nasa" --format agent-json` |
229
+
230
+ 对应 schema:
231
+
232
+ ```powershell
233
+ yuanflow-cli schema works.douyin.detail
234
+ yuanflow-cli schema works.youtube.download
235
+ yuanflow-cli schema search.xiaohongshu.content
236
+ yuanflow-cli schema search.instagram.users
237
+ ```
238
+
239
+ YuanFlow 主程序内使用时仍通过 `yuanflow_cli_call` 传参数数组,token 由主程序注入。
240
+
215
241
  ### 小红书
216
242
 
217
243
  | 需求 | 命令 |
@@ -0,0 +1,118 @@
1
+ ---
2
+ name: 作品下载综合工具
3
+ description: Use when the user wants to get playable media streams, download URL candidates, or save-ready media metadata for Douyin, Bilibili, YouTube, or Xigua works through yuanflow-cli.
4
+ builtin_skill_version: 1.0.0
5
+ tags:
6
+ - 自媒体
7
+ - 作品下载
8
+ - 播放链接
9
+ - 抖音
10
+ - B站
11
+ - YouTube
12
+ - 西瓜视频
13
+ emoji: ⬇️
14
+ ---
15
+
16
+ # 作品下载综合工具
17
+
18
+ 本技能把用户的“下载作品、获取播放地址、获取视频流信息”需求稳定映射到 `yuanflow-cli works download`。在 YuanFlow 主程序内,优先调用受控工具 `yuanflow_cli_call`;它会由主程序认证系统注入 `YUANCHUANG_API_TOKEN`,不要让用户粘贴 KEY,不要在回复、日志或文件里暴露 token。
19
+
20
+ ## 什么时候使用
21
+
22
+ 用户出现以下意图时使用:
23
+
24
+ - 下载、保存、获取播放链接、获取视频流、获取媒体地址。
25
+ - 用户给出抖音、B站、YouTube、西瓜视频链接或作品 ID。
26
+ - 用户只想先确认作品是否有可用播放/下载地址。
27
+
28
+ 不要用于批量抓取、绕过平台限制、破解权限、去除平台风控、下载私密或未授权内容。该工具只返回上游接口提供的播放/下载地址候选或视频流信息;真正保存到本地文件如需后续执行,必须先确认用户授权和保存路径。
29
+
30
+ ## 调用优先级
31
+
32
+ 1. YuanFlow 主程序内:调用 `yuanflow_cli_call`,参数数组从 `works download` 开始。
33
+ 2. 外部 Agent 且本机有 CLI:执行 `yuanflow-cli works download ...`。
34
+ 3. 外部 Agent 且没有 CLI:再提示用户安装 `npm install -g yuanflow-cli`。
35
+
36
+ YuanFlow 内置调用示例:
37
+
38
+ ```json
39
+ {
40
+ "args": [
41
+ "works",
42
+ "download",
43
+ "--platform",
44
+ "douyin",
45
+ "--target",
46
+ "https://v.douyin.com/xxx/",
47
+ "--region",
48
+ "CN",
49
+ "--format",
50
+ "agent-json"
51
+ ]
52
+ }
53
+ ```
54
+
55
+ 外部 CLI 示例:
56
+
57
+ ```powershell
58
+ yuanflow-cli works download --platform douyin --target "https://v.douyin.com/xxx/" --region CN --format agent-json
59
+ ```
60
+
61
+ ## 先查命令和 schema
62
+
63
+ 不确定参数时先查,不要猜:
64
+
65
+ ```json
66
+ {"args":["commands","list"]}
67
+ {"args":["schema","works.douyin.download"]}
68
+ {"args":["schema","works.youtube.download"]}
69
+ ```
70
+
71
+ 命令 key 格式是:
72
+
73
+ ```text
74
+ works.<platform>.download
75
+ ```
76
+
77
+ ## 平台识别
78
+
79
+ | 平台参数 | 用户常见说法 | 链接或 ID 标识 | 说明 |
80
+ |---|---|---|---|
81
+ | `douyin` | 抖音、Douyin | `douyin.com`、`iesdouyin.com`、`v.douyin.com`、`aweme_id` | 支持分享链接或 aweme_id,可传 `--region CN` |
82
+ | `bilibili` | B站、哔哩哔哩 | `bilibili.com`、`b23.tv`、`BV` 号 | URL 走播放信息;BV + `--cid` 可取 playurl |
83
+ | `youtube` | YouTube、油管 | `youtube.com/watch?v=`、`youtu.be/`、视频 ID | 默认获取 streams;签名流 URL 需要 `--prefer signed --itag` |
84
+ | `xigua` | 西瓜视频 | 西瓜视频链接、`item_id` | 使用 `item_id` 获取播放链接 |
85
+
86
+ 如果短链文本无法判断平台,先按域名判断;仍无法判断就追问平台。
87
+
88
+ ## 参数规则
89
+
90
+ 通用参数:
91
+
92
+ - `--platform`:平台标识。
93
+ - `--target`:作品链接、分享链接或作品 ID。
94
+ - `--prefer`:默认 `primary`;YouTube 需要签名流时用 `signed`;有备用接口时可用 `fallback`。
95
+ - `--region`:抖音可选,国内用户通常传 `CN`。
96
+ - `--cid`:B站按 BV 号取 playurl 时必填。
97
+ - `--itag`:YouTube 获取签名流 URL 时必填,来自 `get_video_streams` 的返回。
98
+ - `--extra`:JSON 字符串补充参数。
99
+ - `--format agent-json`:Agent 调用时必须加,便于稳定解析。
100
+
101
+ ## 接口映射
102
+
103
+ | 平台 | 首选能力 | 主要参数 | 备用或特殊能力 |
104
+ |---|---|---|---|
105
+ | 抖音 | 最高画质播放/下载地址查询 | `share_url` 或 `aweme_id`、`region` | 支持 web 备用接口 |
106
+ | B站 | 视频播放信息 | `url` | `bv_id` + `cid` 获取视频流地址 |
107
+ | YouTube | 视频流信息 | `video_id` 或 `video_url` | `--prefer signed --itag` 获取签名流 URL |
108
+ | 西瓜视频 | 视频播放链接 | `item_id` | 暂无备用 |
109
+
110
+ ## 输出要求
111
+
112
+ 成功后用中文简短说明:
113
+
114
+ - 调用了哪个平台和下载/播放能力。
115
+ - 返回的是播放信息、下载地址候选还是视频流信息。
116
+ - 如果响应里有多清晰度、itag、签名 URL、下一步保存所需字段,要提示用户。
117
+
118
+ 失败时按 `agent-json` 的 `error.code` 和 `error.message` 解释。不要展示完整 Authorization 请求头、token、cookie 或敏感账号信息。
@@ -0,0 +1,134 @@
1
+ ---
2
+ name: 作品详情获取工具
3
+ description: Use when the user wants to fetch details, metadata, author info, text, stats, or media info for a single post, note, video, article, tweet, Weibo, YouTube post, Zhihu article, or social-media work through yuanflow-cli.
4
+ builtin_skill_version: 1.0.0
5
+ tags:
6
+ - 自媒体
7
+ - 作品详情
8
+ - 单作品解析
9
+ - 数据查询
10
+ emoji: 📄
11
+ ---
12
+
13
+ # 作品详情获取工具
14
+
15
+ 本技能把用户的“查询单个作品详情、解析作品链接、获取作品元数据”需求稳定映射到 `yuanflow-cli works detail`。在 YuanFlow 主程序内,优先调用受控工具 `yuanflow_cli_call`;它会由主程序认证系统注入 `YUANCHUANG_API_TOKEN`,不要让用户粘贴 KEY,不要在回复、日志或文件里暴露 token。
16
+
17
+ ## 什么时候使用
18
+
19
+ 用户出现以下意图时使用:
20
+
21
+ - 查询单个作品、视频、笔记、文章、帖子、推文、微博、知乎文章的详情。
22
+ - 用户给出作品链接、分享链接、BV 号、视频 ID、帖子 ID、文章 ID。
23
+ - 用户要标题、正文、作者、发布时间、互动统计、封面、媒体信息等字段。
24
+
25
+ 不要用于评论采集、批量搜索、账号搜索或下载保存;评论用 `作品评论采集`,内容搜索用 `综合搜索工具`,用户搜索用 `综合用户搜索工具`,播放/下载地址用 `作品下载综合工具`。
26
+
27
+ ## 调用优先级
28
+
29
+ 1. YuanFlow 主程序内:调用 `yuanflow_cli_call`,参数数组从 `works detail` 开始。
30
+ 2. 外部 Agent 且本机有 CLI:执行 `yuanflow-cli works detail ...`。
31
+ 3. 外部 Agent 且没有 CLI:再提示用户安装 `npm install -g yuanflow-cli`。
32
+
33
+ YuanFlow 内置调用示例:
34
+
35
+ ```json
36
+ {
37
+ "args": [
38
+ "works",
39
+ "detail",
40
+ "--platform",
41
+ "douyin",
42
+ "--target",
43
+ "https://v.douyin.com/xxx/",
44
+ "--format",
45
+ "agent-json"
46
+ ]
47
+ }
48
+ ```
49
+
50
+ 外部 CLI 示例:
51
+
52
+ ```powershell
53
+ yuanflow-cli works detail --platform douyin --target "https://v.douyin.com/xxx/" --format agent-json
54
+ ```
55
+
56
+ ## 先查命令和 schema
57
+
58
+ 不确定参数时先查,不要猜:
59
+
60
+ ```json
61
+ {"args":["commands","list"]}
62
+ {"args":["schema","works.douyin.detail"]}
63
+ {"args":["schema","works.xiaohongshu.detail"]}
64
+ ```
65
+
66
+ 命令 key 格式是:
67
+
68
+ ```text
69
+ works.<platform>.detail
70
+ ```
71
+
72
+ ## 平台识别
73
+
74
+ | 平台参数 | 用户常见说法 | 链接或 ID 标识 | 说明 |
75
+ |---|---|---|---|
76
+ | `douyin` | 抖音、Douyin | `douyin.com`、`iesdouyin.com`、`v.douyin.com`、`aweme_id` | 分享链接优先 |
77
+ | `xiaohongshu` | 小红书、XHS | `xiaohongshu.com`、`xhslink.com`、`note_id` | 可传 `--xsec-token` |
78
+ | `bilibili` | B站、哔哩哔哩 | `bilibili.com`、`b23.tv`、`BV` 号 | URL 优先 |
79
+ | `wechat_channels` | 微信视频号、视频号 | 视频号视频 ID、`exportId` | 可传 `--export-id` |
80
+ | `wechat_mp` | 微信公众号、公众号文章 | `mp.weixin.qq.com/s/` | 文章 URL |
81
+ | `tiktok` | TikTok | `tiktok.com`、`vm.tiktok.com`、`itemId` | 分享链接优先 |
82
+ | `instagram` | Instagram、ins | `instagram.com/p/`、`instagram.com/reel/`、shortcode、media_id | URL、code、media_id 均可 |
83
+ | `kuaishou` | 快手 | `kuaishou.com/short-video/`、`photo_id` | URL 优先 |
84
+ | `reddit` | Reddit | `reddit.com/r/.../comments/`、`t3_` 帖子 ID | 帖子详情 |
85
+ | `twitter` | Twitter、X | `twitter.com`、`x.com`、推文数字 ID | 推文详情 |
86
+ | `weibo` | 微博 | `weibo.com`、微博 `id`、`mid` | 可传 `--long-text true` |
87
+ | `youtube` | YouTube、油管 | `youtube.com/watch?v=`、`youtu.be/`、视频 ID、社区帖子 ID | 默认视频详情,帖子用 `--kind post` |
88
+ | `zhihu` | 知乎 | 专栏文章 ID、问题 ID | 文章用 `--kind article`,问题回答入口用 `--kind question` |
89
+ | `xigua` | 西瓜视频 | 西瓜视频链接、`item_id` | 作品详情 |
90
+
91
+ 如果短链文本无法判断平台,先按域名判断;仍无法判断就追问平台。
92
+
93
+ ## 参数规则
94
+
95
+ 通用参数:
96
+
97
+ - `--platform`:平台标识。
98
+ - `--target`:作品链接、分享链接或作品 ID。
99
+ - `--prefer fallback`:主接口失败或用户要求备用接口时使用。
100
+ - `--kind`:区分同平台不同对象,例如 YouTube 的 `video` / `post`,知乎的 `article` / `question`。
101
+ - `--target-kind`:区分 ID 类型,例如 Instagram 的 `code` / `media_id`。
102
+ - `--extra`:JSON 字符串补充参数。
103
+ - `--format agent-json`:Agent 调用时必须加,便于稳定解析。
104
+
105
+ ## 接口映射
106
+
107
+ Agent 不需要直接拼接口地址,只需要选对 `platform`、`target` 和必要参数。
108
+
109
+ | 平台 | 首选能力 | 主要参数 | 备用或特殊能力 |
110
+ |---|---|---|---|
111
+ | 抖音 | 分享链接取作品详情 | `share_url` | aweme_id / app v3 备用 |
112
+ | 小红书 | 笔记详情 | `note_id`、`xsec_token` | 暂无 |
113
+ | B站 | 视频 URL 取详情 | `url` | BV 号详情 |
114
+ | 微信视频号 | 视频详情 | `id`、`exportId` | 暂无 |
115
+ | 微信公众号 | 文章详情 JSON | `url` | 暂无 |
116
+ | TikTok | 分享链接取作品详情 | `share_url` | itemId 详情 |
117
+ | Instagram | URL 取帖子详情 | `post_url` | shortcode / media_id |
118
+ | 快手 | URL 取作品详情 | `url` | photo_id 详情 |
119
+ | Reddit | 帖子详情 | `post_id` | 可传 comment_id |
120
+ | Twitter/X | 推文详情 | `tweet_id` | 暂无 |
121
+ | 微博 | 微博详情 | `id` | post_id 备用 |
122
+ | YouTube | 视频详情 | `video_id` | 帖子详情 `--kind post` |
123
+ | 知乎 | 专栏文章详情 | `article_id` | 问题回答入口 `--kind question` |
124
+ | 西瓜视频 | 作品详情 | `item_id` | 暂无 |
125
+
126
+ ## 输出要求
127
+
128
+ 成功后用中文简短说明:
129
+
130
+ - 调用了哪个平台和详情能力。
131
+ - 提炼标题、作者、发布时间、正文/描述、互动统计、媒体信息等用户需要的字段。
132
+ - 如果响应字段过多,先摘要,再询问是否需要导出完整 JSON。
133
+
134
+ 失败时按 `agent-json` 的 `error.code` 和 `error.message` 解释。不要展示完整 Authorization 请求头、token、cookie 或敏感账号信息。
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: 综合搜索工具
3
+ description: Use when the user wants to search public content, posts, notes, videos, articles, or social-media results across Douyin, Xiaohongshu, Bilibili, WeChat Channels, TikTok, Instagram, Kuaishou, Reddit, Twitter/X, Weibo, YouTube, Zhihu, or Xigua.
4
+ builtin_skill_version: 1.0.0
5
+ tags:
6
+ - 自媒体
7
+ - 综合搜索
8
+ - 内容搜索
9
+ - 关键词搜索
10
+ emoji: 🔎
11
+ ---
12
+
13
+ # 综合搜索工具
14
+
15
+ 本技能把用户的“按关键词搜索内容、视频、笔记、文章、帖子”需求稳定映射到 `yuanflow-cli search content`。在 YuanFlow 主程序内,优先调用受控工具 `yuanflow_cli_call`;它会由主程序认证系统注入 `YUANCHUANG_API_TOKEN`,不要让用户粘贴 KEY,不要在回复、日志或文件里暴露 token。
16
+
17
+ ## 什么时候使用
18
+
19
+ 用户出现以下意图时使用:
20
+
21
+ - 搜索某个平台上的内容、作品、笔记、帖子、文章、视频。
22
+ - 用户给出关键词,并指定抖音、小红书、B站、微信视频号、TikTok、Instagram、快手、Reddit、Twitter/X、微博、YouTube、知乎或西瓜视频。
23
+ - 用户要做选题、竞品素材、热点素材、内容检索。
24
+
25
+ 不要用于用户搜索;用户、作者、账号、频道搜索应使用 `综合用户搜索工具`。不要用于批量抓取、绕过平台限制或未授权数据访问。
26
+
27
+ ## 调用优先级
28
+
29
+ 1. YuanFlow 主程序内:调用 `yuanflow_cli_call`,参数数组从 `search content` 开始。
30
+ 2. 外部 Agent 且本机有 CLI:执行 `yuanflow-cli search content ...`。
31
+ 3. 外部 Agent 且没有 CLI:再提示用户安装 `npm install -g yuanflow-cli`。
32
+
33
+ YuanFlow 内置调用示例:
34
+
35
+ ```json
36
+ {
37
+ "args": [
38
+ "search",
39
+ "content",
40
+ "--platform",
41
+ "xiaohongshu",
42
+ "--keyword",
43
+ "美妆",
44
+ "--page",
45
+ "1",
46
+ "--format",
47
+ "agent-json"
48
+ ]
49
+ }
50
+ ```
51
+
52
+ 外部 CLI 示例:
53
+
54
+ ```powershell
55
+ yuanflow-cli search content --platform xiaohongshu --keyword "美妆" --page 1 --format agent-json
56
+ ```
57
+
58
+ ## 先查命令和 schema
59
+
60
+ 不确定参数时先查,不要猜:
61
+
62
+ ```json
63
+ {"args":["commands","list"]}
64
+ {"args":["schema","search.xiaohongshu.content"]}
65
+ {"args":["schema","search.douyin.content"]}
66
+ ```
67
+
68
+ 命令 key 格式是:
69
+
70
+ ```text
71
+ search.<platform>.content
72
+ ```
73
+
74
+ ## 平台识别
75
+
76
+ | 平台参数 | 用户常见说法 | 主要搜索对象 | 常用补充参数 |
77
+ |---|---|---|---|
78
+ | `douyin` | 抖音、Douyin | 综合内容、视频、图文、文章 | `--cursor`、`--sort-type`、`--publish-time`、`--content-type` |
79
+ | `xiaohongshu` | 小红书、XHS | 笔记 | `--page`、`--sort`、`--note-type` |
80
+ | `bilibili` | B站、哔哩哔哩 | 综合结果、视频 | `--page`、`--page-size`、`--order` |
81
+ | `wechat_channels` | 微信视频号、视频号 | 视频号综合搜索 | 关键词 |
82
+ | `tiktok` | TikTok | 综合结果 | `--offset`、`--count`、`--sort-type` |
83
+ | `instagram` | Instagram、ins | 综合结果 | `--next-max-id`、`--rank-token` |
84
+ | `kuaishou` | 快手 | 综合结果 | `--pcursor`、`--sort-type` |
85
+ | `reddit` | Reddit | 帖子、社区、评论、媒体 | `--search-type`、`--sort`、`--after` |
86
+ | `twitter` | Twitter、X | 推文搜索时间线 | `--search-type`、`--cursor` |
87
+ | `weibo` | 微博 | 微博高级搜索 | `--page`、`--search-type` |
88
+ | `youtube` | YouTube、油管 | 综合结果 | `--continuation-token`、`--type`、`--sort-by` |
89
+ | `zhihu` | 知乎 | 文章搜索 | `--offset`、`--limit`、`--sort` |
90
+ | `xigua` | 西瓜视频 | 视频搜索 | `--offset`、`--order-type` |
91
+
92
+ ## 参数规则
93
+
94
+ 通用参数:
95
+
96
+ - `--platform`:平台标识。
97
+ - `--keyword`:搜索关键词。
98
+ - `--cursor`、`--offset`、`--page`、`--continuation-token`:翻页参数,必须来自上一次响应,不要编造。
99
+ - `--count`、`--limit`、`--page-size`:数量参数,仅平台支持时传。
100
+ - `--sort`、`--sort-type`、`--publish-time`、`--content-type`:筛选参数,按 schema 和平台说明传。
101
+ - `--extra`:JSON 字符串补充参数。
102
+ - `--format agent-json`:Agent 调用时必须加,便于稳定解析。
103
+
104
+ ## 输出要求
105
+
106
+ 成功后用中文简短说明:
107
+
108
+ - 搜索的平台、关键词和筛选条件。
109
+ - 如果响应里有结果数量、下一页游标、continuation token,要提示用户。
110
+ - 用户要求整理时,再转成表格、摘要或文件。
111
+
112
+ 失败时按 `agent-json` 的 `error.code` 和 `error.message` 解释。不要展示完整 Authorization 请求头、token、cookie 或敏感账号信息。
@@ -0,0 +1,107 @@
1
+ ---
2
+ name: 综合用户搜索工具
3
+ description: Use when the user wants to search creators, accounts, users, channels, authors, or profiles across Douyin, Xiaohongshu, WeChat Channels, TikTok, Instagram, Kuaishou, Weibo, YouTube, or Zhihu.
4
+ builtin_skill_version: 1.0.0
5
+ tags:
6
+ - 自媒体
7
+ - 用户搜索
8
+ - 作者搜索
9
+ - 账号搜索
10
+ emoji: 👤
11
+ ---
12
+
13
+ # 综合用户搜索工具
14
+
15
+ 本技能把用户的“搜索账号、作者、用户、频道、达人”需求稳定映射到 `yuanflow-cli search users`。在 YuanFlow 主程序内,优先调用受控工具 `yuanflow_cli_call`;它会由主程序认证系统注入 `YUANCHUANG_API_TOKEN`,不要让用户粘贴 KEY,不要在回复、日志或文件里暴露 token。
16
+
17
+ ## 什么时候使用
18
+
19
+ 用户出现以下意图时使用:
20
+
21
+ - 按关键词搜索某个平台上的账号、作者、达人、用户、频道。
22
+ - 查找某个品牌、昵称、抖音号、小红书号、YouTube 频道等候选账号。
23
+ - 做账号调研、达人筛选、用户线索查找。
24
+
25
+ 不要用于搜索作品、笔记、文章、帖子或视频;内容搜索应使用 `综合搜索工具`。不要用于批量抓取、绕过平台限制或未授权数据访问。
26
+
27
+ ## 调用优先级
28
+
29
+ 1. YuanFlow 主程序内:调用 `yuanflow_cli_call`,参数数组从 `search users` 开始。
30
+ 2. 外部 Agent 且本机有 CLI:执行 `yuanflow-cli search users ...`。
31
+ 3. 外部 Agent 且没有 CLI:再提示用户安装 `npm install -g yuanflow-cli`。
32
+
33
+ YuanFlow 内置调用示例:
34
+
35
+ ```json
36
+ {
37
+ "args": [
38
+ "search",
39
+ "users",
40
+ "--platform",
41
+ "instagram",
42
+ "--keyword",
43
+ "nasa",
44
+ "--format",
45
+ "agent-json"
46
+ ]
47
+ }
48
+ ```
49
+
50
+ 外部 CLI 示例:
51
+
52
+ ```powershell
53
+ yuanflow-cli search users --platform instagram --keyword "nasa" --format agent-json
54
+ ```
55
+
56
+ ## 先查命令和 schema
57
+
58
+ 不确定参数时先查,不要猜:
59
+
60
+ ```json
61
+ {"args":["commands","list"]}
62
+ {"args":["schema","search.instagram.users"]}
63
+ {"args":["schema","search.douyin.users"]}
64
+ ```
65
+
66
+ 命令 key 格式是:
67
+
68
+ ```text
69
+ search.<platform>.users
70
+ ```
71
+
72
+ ## 平台识别
73
+
74
+ | 平台参数 | 用户常见说法 | 搜索对象 | 常用补充参数 |
75
+ |---|---|---|---|
76
+ | `douyin` | 抖音、Douyin | 用户、达人、账号 | `--cursor` |
77
+ | `xiaohongshu` | 小红书、XHS | 用户 | `--page` |
78
+ | `wechat_channels` | 微信视频号、视频号 | 视频号用户 | `--page` |
79
+ | `tiktok` | TikTok | 用户 | `--offset`、`--count` |
80
+ | `instagram` | Instagram、ins | 用户 | `--rank-token` |
81
+ | `kuaishou` | 快手 | 用户 | `--page` |
82
+ | `weibo` | 微博 | 用户 | `--page`、`--region`、`--auth`、`--gender` |
83
+ | `youtube` | YouTube、油管 | 频道 | `--continuation-token` |
84
+ | `zhihu` | 知乎 | 用户 | `--offset`、`--limit` |
85
+
86
+ B站、Reddit、Twitter/X 当前没有单独接入稳定用户搜索综合命令;如果用户指定这些平台,先说明当前工具不支持单独用户搜索,再建议使用 `综合搜索工具` 做内容/综合搜索,或用 `yuanflow-cli commands list` 查找可用原子接口。
87
+
88
+ ## 参数规则
89
+
90
+ 通用参数:
91
+
92
+ - `--platform`:平台标识。
93
+ - `--keyword`:用户、账号、频道或达人关键词。
94
+ - `--cursor`、`--offset`、`--page`、`--continuation-token`:翻页参数,必须来自上一次响应,不要编造。
95
+ - `--count`、`--limit`:数量参数,仅平台支持时传。
96
+ - `--extra`:JSON 字符串补充参数。
97
+ - `--format agent-json`:Agent 调用时必须加,便于稳定解析。
98
+
99
+ ## 输出要求
100
+
101
+ 成功后用中文简短说明:
102
+
103
+ - 搜索的平台和关键词。
104
+ - 返回结果中的昵称、账号 ID、主页标识、粉丝数等常用字段要按用户需求整理。
105
+ - 如果响应里有下一页游标或 continuation token,要提示用户。
106
+
107
+ 失败时按 `agent-json` 的 `error.code` 和 `error.message` 解释。不要展示完整 Authorization 请求头、token、cookie 或敏感账号信息。
@@ -1,6 +1,7 @@
1
1
  import { listEndpoints } from './registry.js';
2
2
  import { listShortcuts } from './shortcuts.js';
3
3
  import { listCommentCommands } from './comment-collector.js';
4
+ import { listSearchCommands, listWorkCommands } from './work-tools.js';
4
5
 
5
6
  const ERROR_MAP = [
6
7
  {
@@ -83,7 +84,9 @@ export function buildCommandRegistry() {
83
84
  const shortcuts = listShortcuts().map((shortcut) => shortcutToCommand(shortcut));
84
85
  const endpoints = listEndpoints().map((endpoint) => endpointToCommand(endpoint));
85
86
  const commentCommands = listCommentCommands();
86
- return [...shortcuts, ...endpoints, ...commentCommands].sort((left, right) =>
87
+ const workCommands = listWorkCommands();
88
+ const searchCommands = listSearchCommands();
89
+ return [...shortcuts, ...endpoints, ...commentCommands, ...workCommands, ...searchCommands].sort((left, right) =>
87
90
  left.key.localeCompare(right.key),
88
91
  );
89
92
  }