@yixiaoermail/cli 3.1.1 → 3.1.2

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.
Files changed (86) hide show
  1. package/bin/ensure-executable.js +25 -0
  2. package/bin/postinstall.js +18 -0
  3. package/bin/resolve-binary.js +36 -0
  4. package/bin/yxer.js +8 -17
  5. package/dist/yxer-darwin-amd64 +0 -0
  6. package/dist/yxer-darwin-arm64 +0 -0
  7. package/dist/yxer-linux-amd64 +0 -0
  8. package/dist/yxer-linux-arm64 +0 -0
  9. package/dist/yxer-windows-amd64.exe +0 -0
  10. package/dist/yxer-windows-arm64.exe +0 -0
  11. package/package.json +7 -1
  12. package/references/cli/command-reference.md +234 -0
  13. package/references/cli/skill-install.md +76 -0
  14. package/references/legacy/capabilities.md +32 -0
  15. package/references/platforms/index.md +20 -0
  16. package/references/workflows/account-selection.md +38 -0
  17. package/references/workflows/common-rules.md +257 -0
  18. package/references/workflows/draft-workflow.md +44 -0
  19. package/references/workflows/local-vs-cloud.md +50 -0
  20. package/references/workflows/material-workflow.md +43 -0
  21. package/references/workflows/payload-sourcing.md +70 -0
  22. package/references/workflows/publish-article.md +66 -0
  23. package/references/workflows/publish-imageText.md +62 -0
  24. package/references/workflows/publish-troubleshooting.md +50 -0
  25. package/references/workflows/publish-video.md +63 -0
  26. package/schemas/account.schema.json +19 -0
  27. package/schemas/platforms/acfun.article.schema.json +117 -0
  28. package/schemas/platforms/acfun.video.schema.json +139 -0
  29. package/schemas/platforms/aiqiyi.article.schema.json +29 -0
  30. package/schemas/platforms/aiqiyi.video.schema.json +154 -0
  31. package/schemas/platforms/baijiahao.article.schema.json +160 -0
  32. package/schemas/platforms/baijiahao.imageText.schema.json +110 -0
  33. package/schemas/platforms/baijiahao.video.schema.json +179 -0
  34. package/schemas/platforms/bilibili.article.schema.json +109 -0
  35. package/schemas/platforms/bilibili.video.schema.json +175 -0
  36. package/schemas/platforms/chejiahao.article.schema.json +108 -0
  37. package/schemas/platforms/chejiahao.video.schema.json +111 -0
  38. package/schemas/platforms/csdn.article.schema.json +106 -0
  39. package/schemas/platforms/dayuhao.article.schema.json +106 -0
  40. package/schemas/platforms/dayuhao.video.schema.json +153 -0
  41. package/schemas/platforms/dewu.video.schema.json +134 -0
  42. package/schemas/platforms/douban.article.schema.json +48 -0
  43. package/schemas/platforms/douyin.article.schema.json +318 -0
  44. package/schemas/platforms/douyin.imageText.schema.json +217 -0
  45. package/schemas/platforms/douyin.video.schema.json +744 -0
  46. package/schemas/platforms/duoduoshipin.video.schema.json +108 -0
  47. package/schemas/platforms/fengwang.video.schema.json +135 -0
  48. package/schemas/platforms/jianshu.article.schema.json +33 -0
  49. package/schemas/platforms/kuaichuanhao.article.schema.json +83 -0
  50. package/schemas/platforms/kuaishou.imageText.schema.json +170 -0
  51. package/schemas/platforms/kuaishou.video.schema.json +240 -0
  52. package/schemas/platforms/meipai.video.schema.json +123 -0
  53. package/schemas/platforms/meiyou.video.schema.json +96 -0
  54. package/schemas/platforms/pipixia.video.schema.json +94 -0
  55. package/schemas/platforms/qiehao.article.schema.json +89 -0
  56. package/schemas/platforms/qiehao.video.schema.json +147 -0
  57. package/schemas/platforms/shipinhao.imageText.schema.json +138 -0
  58. package/schemas/platforms/shipinhao.video.schema.json +236 -0
  59. package/schemas/platforms/souhuhao.article.schema.json +73 -0
  60. package/schemas/platforms/souhuhao.video.schema.json +171 -0
  61. package/schemas/platforms/souhushipin.video.schema.json +115 -0
  62. package/schemas/platforms/tengxunshipin.video.schema.json +114 -0
  63. package/schemas/platforms/toutiaohao.article.schema.json +165 -0
  64. package/schemas/platforms/toutiaohao.imageText.schema.json +83 -0
  65. package/schemas/platforms/toutiaohao.video.schema.json +134 -0
  66. package/schemas/platforms/wangyihao.article.schema.json +85 -0
  67. package/schemas/platforms/wangyihao.video.schema.json +151 -0
  68. package/schemas/platforms/weishi.video.schema.json +101 -0
  69. package/schemas/platforms/weixin.account.article.schema.json +148 -0
  70. package/schemas/platforms/xhs.imageText.schema.json +119 -0
  71. package/schemas/platforms/xiaohongshu.video.schema.json +224 -0
  72. package/schemas/platforms/xiaohongshushop.video.schema.json +141 -0
  73. package/schemas/platforms/xinlang.article.schema.json +69 -0
  74. package/schemas/platforms/xinlang.imageText.schema.json +85 -0
  75. package/schemas/platforms/xinlang.video.schema.json +151 -0
  76. package/schemas/platforms/xueqiuhao.article.schema.json +84 -0
  77. package/schemas/platforms/yichehao.article.schema.json +140 -0
  78. package/schemas/platforms/yichehao.video.schema.json +101 -0
  79. package/schemas/platforms/yidianhao.article.schema.json +77 -0
  80. package/schemas/platforms/yidianhao.video.schema.json +152 -0
  81. package/schemas/platforms/zhihu.article.schema.json +104 -0
  82. package/schemas/platforms/zhihu.imageText.schema.json +61 -0
  83. package/schemas/platforms/zhihu.video.schema.json +144 -0
  84. package/schemas/publish.schema.json +26 -0
  85. package/skills/yixiaoer/SKILL.md +1 -1
  86. package/skills/yixiaoer/plugin.json +1 -1
@@ -0,0 +1,25 @@
1
+ const fs = require("node:fs");
2
+ const os = require("node:os");
3
+
4
+ function shouldEnsureExecutable(platform) {
5
+ return platform !== "win32";
6
+ }
7
+
8
+ function ensureExecutable(binaryPath) {
9
+ if (!shouldEnsureExecutable(os.platform())) {
10
+ return;
11
+ }
12
+
13
+ const stat = fs.statSync(binaryPath);
14
+ const executeBits = 0o111;
15
+ if ((stat.mode & executeBits) === executeBits) {
16
+ return;
17
+ }
18
+
19
+ fs.chmodSync(binaryPath, stat.mode | 0o755);
20
+ }
21
+
22
+ module.exports = {
23
+ ensureExecutable,
24
+ shouldEnsureExecutable
25
+ };
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { ensureExecutable } = require("./ensure-executable");
4
+ const { resolveBinaryPath } = require("./resolve-binary");
5
+
6
+ try {
7
+ const binaryPath = resolveBinaryPath(__dirname, process.platform, process.arch);
8
+ if (!binaryPath) {
9
+ process.exit(0);
10
+ }
11
+
12
+ ensureExecutable(binaryPath);
13
+ } catch (error) {
14
+ console.error(
15
+ `[yxer] postinstall failed to ensure executable permission: ${error.message}`
16
+ );
17
+ process.exit(0);
18
+ }
@@ -0,0 +1,36 @@
1
+ const fs = require("node:fs");
2
+ const os = require("node:os");
3
+ const path = require("node:path");
4
+
5
+ function getBinaryFilename(platform = os.platform(), arch = os.arch()) {
6
+ const key = `${platform}/${arch}`;
7
+ const binaries = {
8
+ "win32/x64": "yxer-windows-amd64.exe",
9
+ "win32/arm64": "yxer-windows-arm64.exe",
10
+ "darwin/x64": "yxer-darwin-amd64",
11
+ "darwin/arm64": "yxer-darwin-arm64",
12
+ "linux/x64": "yxer-linux-amd64",
13
+ "linux/arm64": "yxer-linux-arm64"
14
+ };
15
+
16
+ return binaries[key] || null;
17
+ }
18
+
19
+ function resolveBinaryPath(baseDir = __dirname, platform = os.platform(), arch = os.arch()) {
20
+ const filename = getBinaryFilename(platform, arch);
21
+ if (!filename) {
22
+ return null;
23
+ }
24
+
25
+ const binaryPath = path.join(baseDir, "..", "dist", filename);
26
+ if (!fs.existsSync(binaryPath)) {
27
+ return null;
28
+ }
29
+
30
+ return binaryPath;
31
+ }
32
+
33
+ module.exports = {
34
+ getBinaryFilename,
35
+ resolveBinaryPath
36
+ };
package/bin/yxer.js CHANGED
@@ -2,24 +2,14 @@
2
2
 
3
3
  const { spawnSync } = require("node:child_process");
4
4
  const fs = require("node:fs");
5
- const os = require("node:os");
6
- const path = require("node:path");
5
+ const { ensureExecutable } = require("./ensure-executable");
6
+ const { getBinaryFilename, resolveBinaryPath } = require("./resolve-binary");
7
7
 
8
8
  function resolveBinary() {
9
- const platform = os.platform();
10
- const arch = os.arch();
9
+ const platform = process.platform;
10
+ const arch = process.arch;
11
11
  const key = `${platform}/${arch}`;
12
-
13
- const binaries = {
14
- "win32/x64": "yxer-windows-amd64.exe",
15
- "win32/arm64": "yxer-windows-arm64.exe",
16
- "darwin/x64": "yxer-darwin-amd64",
17
- "darwin/arm64": "yxer-darwin-arm64",
18
- "linux/x64": "yxer-linux-amd64",
19
- "linux/arm64": "yxer-linux-arm64"
20
- };
21
-
22
- const filename = binaries[key];
12
+ const filename = getBinaryFilename(platform, arch);
23
13
  if (!filename) {
24
14
  console.error(
25
15
  JSON.stringify({
@@ -34,8 +24,8 @@ function resolveBinary() {
34
24
  process.exit(1);
35
25
  }
36
26
 
37
- const binaryPath = path.join(__dirname, "..", "dist", filename);
38
- if (!fs.existsSync(binaryPath)) {
27
+ const binaryPath = resolveBinaryPath(__dirname, platform, arch);
28
+ if (!binaryPath || !fs.existsSync(binaryPath)) {
39
29
  console.error(
40
30
  JSON.stringify({
41
31
  error: {
@@ -54,6 +44,7 @@ function resolveBinary() {
54
44
  }
55
45
 
56
46
  const binary = resolveBinary();
47
+ ensureExecutable(binary);
57
48
  const result = spawnSync(binary, process.argv.slice(2), { stdio: "inherit" });
58
49
 
59
50
  if (result.error) {
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,13 +1,19 @@
1
1
  {
2
2
  "name": "@yixiaoermail/cli",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "description": "Yixiaoer CLI packaged for npm global installation",
5
5
  "bin": {
6
6
  "yxer": "bin/yxer.js"
7
7
  },
8
+ "scripts": {
9
+ "postinstall": "node bin/postinstall.js",
10
+ "test": "node --test test/*.test.js"
11
+ },
8
12
  "files": [
9
13
  "bin",
10
14
  "dist",
15
+ "references",
16
+ "schemas",
11
17
  "skills",
12
18
  "README.md"
13
19
  ],
@@ -0,0 +1,234 @@
1
+ # yxer CLI 命令参考
2
+
3
+ `yxer` 是本技能唯一执行入口。Agent 和用户都应直接使用它。
4
+
5
+ ## 命令分组
6
+
7
+ ### 环境与版本
8
+
9
+ ```bash
10
+ yxer --version
11
+ yxer doctor
12
+ yxer update [--check] [--global]
13
+ ```
14
+
15
+ ### 本地配置
16
+
17
+ ```bash
18
+ yxer config get
19
+ yxer config set-local-client-id <clientId>
20
+ ```
21
+
22
+ ### Skill 安装与同步
23
+
24
+ ```bash
25
+ yxer skill show
26
+ yxer skill sync [--global]
27
+ ```
28
+
29
+ ### 账号与资源
30
+
31
+ ```bash
32
+ yxer accounts list [platform] [--name 关键词] [--status 1] [--page 1] [--size 20] [--all] [--json]
33
+ yxer upload --file <file_path> [--bucket cloud-publish|material-library] [--dry-run]
34
+ yxer upload --url <resource_url> [--bucket cloud-publish|material-library] [--dry-run]
35
+ ```
36
+
37
+ ### 发布与校验
38
+
39
+ ```bash
40
+ yxer validate <platform> <type> <payload.json> [--publish-channel cloud|local] [--client-id <clientId>]
41
+ yxer publish <type> <platform> <payload.json> [clientId] [--dry-run]
42
+ ```
43
+
44
+ ### 草稿与素材库
45
+
46
+ ```bash
47
+ yxer draft save <payload.json> [--dry-run]
48
+ yxer material create <payload.json> [--dry-run]
49
+ yxer material add --file <文件路径或URL> [--thumb <缩略图路径或URL>] [--type image|video|file] [--dry-run]
50
+ ```
51
+
52
+ ### 查询类能力
53
+
54
+ ```bash
55
+ yxer query categories <account_id> [--type video|article]
56
+ yxer query locations <account_id> [--query 关键词] [--type 0|1|2|3] [--next-page TOKEN]
57
+ yxer query music <account_id> [--query 关键词] [--category-id ID] [--category-name 名称] [--next-page TOKEN]
58
+ yxer query music-categories <account_id>
59
+ yxer query goods <account_id> [--query 关键词] [--next-page TOKEN]
60
+ yxer query collections <account_id> [--type video|article]
61
+ yxer query miniapps <account_id> [--query 关键词]
62
+ yxer query syncapps <account_id>
63
+ yxer query games <account_id> [--query 关键词]
64
+ yxer query hot-events <account_id> [--type video|article]
65
+ yxer query groups <account_id>
66
+ yxer query activities <account_id> [--type video|article] [--category-id ID] [--query 关键词]
67
+ yxer query challenges <account_id> [--query 关键词] [--type video] [--next-page TOKEN]
68
+ yxer query records [--platform P] [--limit N] [--status S] [--json]
69
+ yxer query details <task_set_id>
70
+ yxer query account-overviews --platform P [--name 关键词] [--group 分组] [--login-status 1] [--member-id ID] [--page 1] [--size 10]
71
+ yxer query content-overviews [--platform P] [--account-id ID] [--publish-user-id ID] [--type video|article|miniVideo|dynamic] [--title 关键词] [--publish-start-time 毫秒] [--publish-end-time 毫秒] [--page 1] [--size 10]
72
+ yxer query proxies [--size 9999]
73
+ yxer query proxy-areas
74
+ yxer update-account <account_id> [--proxy-id ID] [--kuaidaili-area CODE] [--remark 文本] [--group ID] --dry-run
75
+ yxer update-account <account_id> [--proxy-id ID] [--kuaidaili-area CODE] [--remark 文本] [--group ID]
76
+ yxer prepare <platform> <type>
77
+ yxer schema fields <platform> <type>
78
+ yxer schema get <platform> <type>
79
+ ```
80
+
81
+ 兼容说明:
82
+
83
+ - 推荐新入口:`yxer query ...`
84
+ - 旧入口如 `yxer categories ...`、`yxer records list ...` 仍可用,但后续文档统一以 `query` 入口为准
85
+
86
+ ## 基本约束
87
+
88
+ - 发布类型统一使用:`video`、`imageText`、`article`
89
+ - 单次 `yxer publish` 只处理一个平台
90
+ - `publish` 仅支持 `payload.json` 模式
91
+ - 发布前必须先执行 `yxer prepare <platform> <type>` 和 `yxer schema fields <platform> <type>`;`schema fields` 默认返回扁平路径清单,只有需要完整 payload 骨架时再执行 `yxer schema get <platform> <type>`
92
+ - `payload.json` 只支持标准 `publishArgs` 结构,所有平台统一
93
+ - CLI 会根据 `publishArgs` 自动补齐最外层 `cover`、`coverKey`、`desc`、`isDraft`、`isAppContent`
94
+ - 云发布是默认模式
95
+ - 本机发布时必须提供 `clientId`
96
+ - `yxer validate`、`yxer publish --dry-run`、`yxer publish` 使用同一套发布通道解析逻辑
97
+ - 本机发布可通过三种方式提供 `clientId`:
98
+ - 第四个位置参数:`yxer publish <type> <platform> <payload.json> <clientId>`
99
+ - flags:`yxer publish <type> <platform> <payload.json> --publish-channel local --client-id <clientId>`
100
+ - 预设默认值:`yxer config set-local-client-id <clientId>` 后,再执行 `--publish-channel local`
101
+ - 本机发布校验时,推荐在 `validate` 阶段就显式传入 `--publish-channel local`;若未显式传入但 payload 中已写 `publishChannel=local`,CLI 也会尝试从默认配置读取 `clientId`
102
+ - `yxer draft save` 只处理蚁小二内部草稿,不等同于平台草稿箱
103
+ - `yxer material create` 只做素材登记,前提是资源已经通过 `yxer upload --bucket material-library` 上传
104
+ - 推荐优先使用 `yxer material add --file ...`,由 CLI 自动完成上传和素材登记
105
+ - 查询类操作可以直接执行
106
+ - 发布类操作必须遵守“查账号 -> prepare/schema -> 上传资源 -> 查询复杂对象 -> 填 payload -> validate -> publish”顺序
107
+ - 所有请求字段都必须来自 schema、平台文档或 CLI 返回结果;严禁虚构字段、乱猜枚举、手写 `raw` 对象或编造资源元数据
108
+
109
+ ## 快速示例
110
+
111
+ ### 环境检查
112
+
113
+ ```bash
114
+ yxer doctor
115
+ yxer config get
116
+ ```
117
+
118
+ ### 查询账号
119
+
120
+ ```bash
121
+ yxer accounts list 抖音 --json
122
+ yxer accounts list 抖音 --page 2 --size 20 --json
123
+ yxer accounts list 小红书 --all --status 1 --json
124
+ yxer accounts list 小红书 --status 1
125
+ ```
126
+
127
+ 说明:
128
+
129
+ - `accounts list` 默认查询第 `1` 页、每页 `20` 条
130
+ - 显式传 `--page`、`--size` 可控制单页查询范围
131
+ - 传 `--all` 时,CLI 才会根据远端返回的分页信号继续翻页汇总后续账号
132
+ - 不会用“当前页已满”来猜测下一页是否存在
133
+
134
+ ### 上传资源
135
+
136
+ ```bash
137
+ yxer upload --file .\cover.jpg --dry-run
138
+ yxer upload --file .\video.mp4
139
+ yxer upload --url https://example.com/demo.jpg
140
+ ```
141
+
142
+ ## 推荐发布流程
143
+
144
+ ### 标准 payload 结构
145
+
146
+ ```json
147
+ {
148
+ "action": "publish",
149
+ "publishType": "imageText",
150
+ "platforms": ["小红书"],
151
+ "publishChannel": "cloud",
152
+ "publishArgs": {
153
+ "accountForms": [
154
+ {
155
+ "platformAccountId": "<platformAccountId>",
156
+ "contentPublishForm": {
157
+ "formType": "task"
158
+ }
159
+ }
160
+ ]
161
+ }
162
+ }
163
+ ```
164
+
165
+ 约束:
166
+
167
+ - 顶层必须有 `publishArgs`
168
+ - 账号列表必须放在 `publishArgs.accountForms[]`
169
+ - 平台业务字段必须放在 `publishArgs.accountForms[].contentPublishForm`
170
+ - 不再支持顶层 `accountForms`
171
+ - 不再支持直接提交内层业务表单 JSON
172
+
173
+ ### 获取表单字段与 schema
174
+
175
+ ```bash
176
+ yxer prepare 小红书 imageText
177
+ yxer schema fields 小红书 imageText
178
+ yxer schema get 小红书 imageText
179
+ ```
180
+
181
+ ### 校验与预览发布
182
+
183
+ ```bash
184
+ yxer validate 小红书 imageText .\payload.json
185
+ yxer publish imageText 小红书 .\payload.json --dry-run
186
+ ```
187
+
188
+ ### 本机发布校验
189
+
190
+ ```bash
191
+ yxer validate 抖音 video .\payload.json --publish-channel local --client-id <clientId>
192
+ yxer publish video 抖音 .\payload.json --publish-channel local --client-id <clientId> --dry-run
193
+ ```
194
+
195
+ ### 正式发布
196
+
197
+ ```bash
198
+ yxer publish imageText 小红书 .\payload.json
199
+ ```
200
+
201
+ ### 本机发布
202
+
203
+ ```bash
204
+ yxer publish video 抖音 .\payload.json --publish-channel local --client-id <clientId>
205
+ ```
206
+
207
+ ## 常见工作流入口
208
+
209
+ - 通用规则:`references/workflows/common-rules.md`
210
+ - 图文发布:`references/workflows/publish-imageText.md`
211
+ - 视频发布:`references/workflows/publish-video.md`
212
+ - 文章发布:`references/workflows/publish-article.md`
213
+
214
+ ## 发布通道约定
215
+
216
+ - 用户未指定“本机发布 / 本地发布 / 客户端发布”时,Agent 应默认使用云发布。
217
+ - 用户明确要求本机发布,或说明要走本机客户端/本机网络时,Agent 必须显式传 `--publish-channel local`,不要只在说明文字里表达。
218
+ - 若云发布返回“账号代理不存在”等代理相关错误,可建议切换到本机发布。
219
+ - 若本机发布返回“客户端不在线”或“获取在线设备列表失败”,可建议用户启动蚁小二客户端,或改回云发布。
220
+
221
+ ## 输出约定
222
+
223
+ - 默认输出适合人读
224
+ - 加 `--json` 时输出结构化结果,适合 Agent 二次处理
225
+ - 成功输出格式:`ok/action/version/data`
226
+ - 失败输出格式:`ok/version/error`
227
+ - 错误通过统一错误 envelope 输出
228
+ - `yxer doctor` 可能返回 `_notice.skills`,提示当前 AI skill 与 CLI 版本不同步
229
+ - `yxer update` 当前会同步 AI skill,并给出 CLI 本体更新指引
230
+
231
+ ## 入口约束
232
+
233
+ - 仓库已移除旧 Node 入口,不再提供脚本兼容通道
234
+ - 未完成 CLI 化的能力只保留文档提示,不代表存在其他可执行入口
@@ -0,0 +1,76 @@
1
+ # 技能安装与同步
2
+
3
+ 本项目按“CLI 先安装,Skill 再安装”的方式给 AI agent 提供能力。
4
+
5
+ ## 目标
6
+
7
+ - `yxer` CLI:唯一执行入口,负责真正调用蚁小二 API
8
+ - `skills/yixiaoer/SKILL.md`:给 AI agent 的共享规则、能力索引和命令探索说明
9
+ - `skills/yixiaoer/references/domains/`:给 AI agent 的任务分域入口
10
+ - `README.md`:给仓库维护者的入口说明
11
+
12
+ 也就是说,Skill 不负责执行,它只负责告诉 Agent 何时调用什么 `yxer` 命令。
13
+
14
+ ## 推荐安装流程
15
+
16
+ 1. 安装或编译 `yxer` CLI。
17
+ 2. 运行 `yxer skill show`,拿到当前技能包目录。
18
+ 3. 用 skills 工具安装技能:
19
+
20
+ ```bash
21
+ npx skills add "<repo>/skills/yixiaoer" -y
22
+ ```
23
+
24
+ 如需全局安装:
25
+
26
+ ```bash
27
+ npx skills add "<repo>/skills/yixiaoer" -g -y
28
+ ```
29
+
30
+ 也可以直接让 CLI 代为同步并写入版本戳:
31
+
32
+ ```bash
33
+ yxer skill sync
34
+ yxer skill sync --global
35
+ ```
36
+
37
+ 如需统一执行“检查状态 + 同步 skill + 查看 CLI 更新指引”,可运行:
38
+
39
+ ```bash
40
+ yxer update
41
+ yxer update --check
42
+ ```
43
+
44
+ 如果 CLI 是通过 npm 安装的,推荐优先使用下面的方式升级 CLI 本体,再同步 skill:
45
+
46
+ ```powershell
47
+ npm install -g @yixiaoermail/cli@latest
48
+ yxer --version
49
+ yxer skill sync
50
+ ```
51
+
52
+ 如需全局 skill:
53
+
54
+ ```powershell
55
+ yxer skill sync --global
56
+ ```
57
+
58
+ 本次版本更新内容统一查看仓库根目录的 `CHANGELOG.md`。
59
+
60
+ ## 何时需要重新同步
61
+
62
+ - `yxer --version` 升级后
63
+ - `skills/yixiaoer/SKILL.md` 更新后
64
+ - `skills/yixiaoer/references/domains/` 更新后
65
+ - `references/workflows/` 或 `references/cli/` 中影响 Agent 行为的文档更新后
66
+
67
+ ## 漂移检查
68
+
69
+ - `yxer skill show` 会显示当前 `skills.stamp` 状态
70
+ - `yxer doctor` 会在 `_notice.skills` 中提示是否需要重新同步
71
+
72
+ ## 设计原则
73
+
74
+ - 技能负责“让 Agent 先路由到正确 domain,再正确使用 CLI”
75
+ - CLI 负责“把事情真正做完”
76
+ - 不再保留默认 Node 脚本执行入口
@@ -0,0 +1,32 @@
1
+ # 未 CLI 化能力索引
2
+
3
+ 本页用于标记当前 `yxer` CLI 尚未覆盖、或仅部分覆盖的能力。它不是兼容入口说明,也不代表仓库内存在其他可执行主流程。
4
+
5
+ ## 使用规则
6
+
7
+ 1. 如果能力已经有正式 `yxer` 命令,优先直接调用现有命令。
8
+ 2. 如果能力只有“部分覆盖”,优先使用现有命令完成已支持部分,剩余字段仅把对应文档当参考。
9
+ 3. 如果能力仍“未覆盖”,应优先补成新的 `yxer` 子命令,而不是寻找旧脚本或新增脚本入口。
10
+
11
+ ## 能力状态表
12
+
13
+ | 能力 | 当前状态 | 推荐/现有命令 | 参考文档 |
14
+ | --- | --- | --- | --- |
15
+ | 蚁小二内部草稿保存 | 已覆盖 | `yxer draft save <payload.json>` | `skills/yixiaoer/references/save-draft.md` |
16
+ | 平台草稿发布 | 部分覆盖 | `yxer publish <type> <platform> <payload.json>` | `skills/yixiaoer/references/save-draft.md` |
17
+ | 素材库登记 | 已覆盖 | `yxer material create <payload.json>` | `skills/yixiaoer/references/material-resource.md` |
18
+ | 素材上传并登记一体化 | 已覆盖 | `yxer material add --file <文件路径或URL>` | `skills/yixiaoer/references/material-resource.md` |
19
+ | 账号数据概览 | 已覆盖 | `yxer query account-overviews --platform P [--name 关键词] [--group 分组] [--login-status 1] [--member-id ID]` | `skills/yixiaoer/references/get-account-overviews.md` |
20
+ | 作品数据概览 | 已覆盖 | `yxer query content-overviews [--platform P] [--account-id ID] [--type video|article|miniVideo|dynamic]` | `skills/yixiaoer/references/get-content-overviews.md` |
21
+ | 征文活动 | 已覆盖 | `yxer query activities <account_id> [--type video|article] [--category-id ID] [--query 关键词]` | `skills/yixiaoer/references/get-publish-activities.md` |
22
+ | 小程序列表 | 已覆盖 | `yxer query miniapps <account_id> [--query 关键词]` | `skills/yixiaoer/references/get-miniapps.md` |
23
+ | 同步发布应用 | 已覆盖 | `yxer query syncapps <account_id>` | `skills/yixiaoer/references/get-sync-apps.md` |
24
+ | 热点列表 | 已覆盖 | `yxer query hot-events <account_id>` | `skills/yixiaoer/references/get-hot-events.md` |
25
+ | 群聊列表 | 已覆盖 | `yxer query groups <account_id>` | `skills/yixiaoer/references/get-groups.md` |
26
+ | 音乐分类 | 已覆盖 | `yxer query music-categories <account_id>` | `skills/yixiaoer/references/get-music-categories.md` |
27
+ | 游戏挂载 | 已覆盖 | `yxer query games <account_id> [--query 关键词]` | `skills/yixiaoer/references/get-games.md` |
28
+ | 代理管理 | 已覆盖 | `yxer query proxies` / `yxer query proxy-areas` / `yxer update-account <account_id> ... --dry-run` | `skills/yixiaoer/references/proxy-management.md` |
29
+
30
+ ## 推荐迁移顺序
31
+
32
+ 当前遗留表中的 CLI 化项目均已覆盖;后续若旧 skill 文档新增能力,应继续按本表补充状态。
@@ -0,0 +1,20 @@
1
+ # 平台参考索引
2
+
3
+ 平台字段和差异说明已收敛到 `skills/yixiaoer/references/platforms/`。根目录索引只作为仓库维护入口,避免 Agent 在多套路径之间摇摆。
4
+
5
+ ## 通用索引
6
+
7
+ - 图文:`skills/yixiaoer/references/platforms/imageText/index.md`
8
+ - 视频:`skills/yixiaoer/references/platforms/video/index.md`
9
+ - 文章:`skills/yixiaoer/references/platforms/article/index.md`
10
+
11
+ ## 使用原则
12
+
13
+ 1. 先走工作流和 `yxer` CLI。
14
+ 2. 只有在构造平台特有字段时,才继续查具体平台文档。
15
+ 3. 如果字段来源可以由 `yxer query categories`、`yxer query locations`、`yxer query music` 等命令获得,优先用命令,不要手写对象。
16
+
17
+ ## 维护约束
18
+
19
+ - Agent 运行时应优先读取 skill 包内部的 `skills/yixiaoer/references/platforms/`
20
+ - 根目录文档用于仓库维护和交叉索引,不再作为 skill 主入口
@@ -0,0 +1,38 @@
1
+ # 账号选择工作流
2
+
3
+ > 适用范围:任何需要确定 `platform`、`platformAccountId` 或确认账号状态的任务,包括发布、草稿、素材、排查。
4
+
5
+ ## 何时读取
6
+
7
+ - 用户只说“帮我发”但没给账号
8
+ - 用户给了平台,但没给账号名或账号 ID
9
+ - 用户给了多个候选账号,需要 Agent 选一个
10
+ - 用户要排查“为什么这个账号发不出去”
11
+
12
+ ## 标准步骤
13
+
14
+ 1. 先确定任务平台;平台不明确时,不进入 payload 阶段。
15
+ 2. 执行 `yxer accounts list [platform] [--name 关键词] [--json]`。
16
+ 3. 优先筛出 `status=1` 的账号。
17
+ 4. 结合用户给的账号名、昵称关键词或已有 `platformAccountId` 定位目标账号。
18
+ 5. 将选中的 `platformAccountId` 填入 `publishArgs.accountForms[].platformAccountId`。
19
+
20
+ ## 选择规则
21
+
22
+ - 只有一个 `status=1` 的候选账号:自动选中,并明确告知用户。
23
+ - 有多个 `status=1` 候选账号:列出差异,让用户选择,不要擅自猜测。
24
+ - 没有 `status=1` 账号:停止后续执行,提示用户检查账号登录状态、Cookie 或客户端在线状态。
25
+ - 用户直接给了 `platformAccountId`:仍建议执行 `accounts list` 做存在性确认。
26
+
27
+ ## 推荐命令
28
+
29
+ ```bash
30
+ yxer accounts list 抖音 --json
31
+ yxer accounts list 小红书 --name 关键词 --status 1 --json
32
+ ```
33
+
34
+ ## 严禁行为
35
+
36
+ - 未确认账号有效就填写 `platformAccountId`
37
+ - 多个候选账号时默认取第一个
38
+ - 把账号昵称直接当成 `platformAccountId`