yuanflow-cli 0.1.10 → 0.1.11

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 (18) hide show
  1. package/README.md +9 -0
  2. package/package.json +1 -1
  3. package/skills/yuanflow-skill/HTML/346/212/245/345/221/212/347/224/237/346/210/220/SKILL.md +91 -0
  4. package/skills/yuanflow-skill/HTML/346/212/245/345/221/212/347/224/237/346/210/220/_preview-html-report-styles/index.html +214 -0
  5. package/skills/yuanflow-skill/HTML/346/212/245/345/221/212/347/224/237/346/210/220/references/report-shapes.md +139 -0
  6. package/skills/yuanflow-skill/HTML/346/212/245/345/221/212/347/224/237/346/210/220/references/theme-system.md +74 -0
  7. package/skills/yuanflow-skill/HTML/346/212/245/345/221/212/347/224/237/346/210/220/templates/warm-beige/01-insight-brief.html +98 -0
  8. package/skills/yuanflow-skill/HTML/346/212/245/345/221/212/347/224/237/346/210/220/templates/warm-beige/02-data-dashboard.html +86 -0
  9. package/skills/yuanflow-skill/HTML/346/212/245/345/221/212/347/224/237/346/210/220/templates/warm-beige/03-deep-report.html +87 -0
  10. package/skills/yuanflow-skill/HTML/346/212/245/345/221/212/347/224/237/346/210/220/templates/warm-beige/04-comparison.html +63 -0
  11. package/skills/yuanflow-skill/HTML/346/212/245/345/221/212/347/224/237/346/210/220/templates/warm-beige/05-card-collection.html +54 -0
  12. package/skills/yuanflow-skill/HTML/346/212/245/345/221/212/347/224/237/346/210/220/templates/warm-beige/06-process-steps.html +57 -0
  13. package/skills/yuanflow-skill/HTML/346/212/245/345/221/212/347/224/237/346/210/220/templates/warm-beige/07-timeline.html +55 -0
  14. package/skills/yuanflow-skill/HTML/346/212/245/345/221/212/347/224/237/346/210/220/templates/warm-beige/08-action-board.html +58 -0
  15. package/skills/yuanflow-skill/HTML/346/212/245/345/221/212/347/224/237/346/210/220/templates/warm-beige/09-knowledge-map.html +72 -0
  16. package/skills/yuanflow-skill/HTML/346/212/245/345/221/212/347/224/237/346/210/220/templates/warm-beige/report-warm-beige.css +258 -0
  17. package/skills/yuanflow-skill/README.md +97 -0
  18. package/skills/yuanflow-skill/SKILL.md +14 -1
@@ -0,0 +1,258 @@
1
+ :root {
2
+ --bg: #e9e5dc;
3
+ --page: #fbfaf6;
4
+ --ink: #1b1814;
5
+ --muted: #6b6459;
6
+ --primary: #1d1b18;
7
+ --primary-2: #9b6a3a;
8
+ --line: #d8cfc1;
9
+ --soft: #f3efe6;
10
+ --soft-2: #eee6d7;
11
+ --success: #12805c;
12
+ --warning: #b56b00;
13
+ --danger: #d92d20;
14
+ }
15
+
16
+ * { box-sizing: border-box; }
17
+
18
+ body {
19
+ margin: 0;
20
+ background: var(--bg);
21
+ color: var(--ink);
22
+ font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
23
+ line-height: 1.68;
24
+ }
25
+
26
+ .report-page {
27
+ width: min(1120px, calc(100% - 40px));
28
+ margin: 28px auto;
29
+ padding: 40px 42px 26px;
30
+ background: var(--page);
31
+ border: 1px solid var(--line);
32
+ box-shadow: 0 18px 48px rgba(47, 40, 31, 0.08);
33
+ }
34
+
35
+ .report-topline {
36
+ display: flex;
37
+ justify-content: space-between;
38
+ gap: 24px;
39
+ color: var(--muted);
40
+ font-size: 13px;
41
+ border-bottom: 1px solid var(--line);
42
+ padding-bottom: 14px;
43
+ }
44
+
45
+ .report-header {
46
+ padding: 24px 0 22px;
47
+ }
48
+
49
+ .eyebrow {
50
+ color: var(--primary-2);
51
+ font-size: 14px;
52
+ font-weight: 700;
53
+ margin: 0 0 8px;
54
+ }
55
+
56
+ h1 {
57
+ margin: 0;
58
+ color: var(--primary);
59
+ font-size: 32px;
60
+ line-height: 1.22;
61
+ letter-spacing: 0;
62
+ }
63
+
64
+ .subtitle {
65
+ margin: 10px 0 0;
66
+ color: var(--muted);
67
+ font-size: 15px;
68
+ }
69
+
70
+ .tags {
71
+ display: flex;
72
+ flex-wrap: wrap;
73
+ gap: 8px;
74
+ margin-top: 16px;
75
+ }
76
+
77
+ .tag {
78
+ padding: 6px 10px;
79
+ border: 1px solid var(--line);
80
+ background: var(--soft);
81
+ color: var(--primary);
82
+ font-size: 12px;
83
+ font-weight: 700;
84
+ }
85
+
86
+ .summary {
87
+ display: grid;
88
+ gap: 12px;
89
+ padding: 18px;
90
+ background: linear-gradient(180deg, #f6f1e8, #fbfaf6);
91
+ border: 1px solid var(--line);
92
+ }
93
+
94
+ .summary-strong {
95
+ margin: 0;
96
+ color: var(--primary);
97
+ font-size: 20px;
98
+ font-weight: 800;
99
+ }
100
+
101
+ .section {
102
+ margin-top: 22px;
103
+ }
104
+
105
+ .section-title {
106
+ display: flex;
107
+ align-items: center;
108
+ gap: 10px;
109
+ margin: 0 0 12px;
110
+ color: var(--primary);
111
+ font-size: 18px;
112
+ }
113
+
114
+ .section-title::before {
115
+ content: "";
116
+ width: 4px;
117
+ height: 18px;
118
+ background: var(--primary);
119
+ }
120
+
121
+ .grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
122
+ .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
123
+ .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
124
+
125
+ .card {
126
+ border: 1px solid var(--line);
127
+ background: #fffdf8;
128
+ padding: 15px;
129
+ }
130
+
131
+ .card.soft { background: var(--soft); }
132
+
133
+ .metric-value {
134
+ color: var(--primary);
135
+ font-size: 28px;
136
+ line-height: 1;
137
+ font-weight: 900;
138
+ }
139
+
140
+ .metric-label, .muted {
141
+ color: var(--muted);
142
+ font-size: 13px;
143
+ }
144
+
145
+ .number {
146
+ display: inline-grid;
147
+ place-items: center;
148
+ width: 28px;
149
+ height: 28px;
150
+ background: var(--primary);
151
+ color: #fff;
152
+ font-size: 13px;
153
+ font-weight: 800;
154
+ }
155
+
156
+ .list {
157
+ margin: 0;
158
+ padding-left: 18px;
159
+ }
160
+
161
+ .list li { margin: 6px 0; }
162
+
163
+ .table {
164
+ width: 100%;
165
+ border-collapse: collapse;
166
+ overflow: hidden;
167
+ }
168
+
169
+ .table th, .table td {
170
+ border: 1px solid var(--line);
171
+ padding: 12px;
172
+ text-align: left;
173
+ vertical-align: top;
174
+ }
175
+
176
+ .table th {
177
+ background: var(--soft);
178
+ color: var(--primary);
179
+ }
180
+
181
+ .bar-chart {
182
+ display: grid;
183
+ grid-template-columns: repeat(7, 1fr);
184
+ align-items: end;
185
+ gap: 12px;
186
+ height: 170px;
187
+ padding: 16px;
188
+ border: 1px solid var(--line);
189
+ background: repeating-linear-gradient(0deg, #fffdf8, #fffdf8 33px, #e8dfd1 34px);
190
+ }
191
+
192
+ .bar {
193
+ background: linear-gradient(180deg, #b8894f, var(--primary));
194
+ min-height: 24px;
195
+ }
196
+
197
+ .timeline {
198
+ display: grid;
199
+ gap: 14px;
200
+ border-left: 3px solid var(--primary);
201
+ padding-left: 18px;
202
+ }
203
+
204
+ .timeline-item {
205
+ position: relative;
206
+ border: 1px solid var(--line);
207
+ padding: 14px;
208
+ background: #fffdf8;
209
+ }
210
+
211
+ .timeline-item::before {
212
+ content: "";
213
+ position: absolute;
214
+ left: -27px;
215
+ top: 20px;
216
+ width: 12px;
217
+ height: 12px;
218
+ background: var(--primary);
219
+ border: 3px solid #fff;
220
+ }
221
+
222
+ .flow-row {
223
+ display: grid;
224
+ grid-template-columns: repeat(5, 1fr);
225
+ gap: 8px;
226
+ align-items: stretch;
227
+ }
228
+
229
+ .flow-step {
230
+ position: relative;
231
+ padding: 12px;
232
+ background: var(--soft);
233
+ border: 1px solid var(--line);
234
+ color: var(--primary);
235
+ font-weight: 800;
236
+ text-align: center;
237
+ }
238
+
239
+ .priority-high { border-top: 6px solid var(--danger); }
240
+ .priority-medium { border-top: 6px solid #b8894f; }
241
+ .priority-low { border-top: 6px solid #12b76a; }
242
+
243
+ .footer {
244
+ display: flex;
245
+ justify-content: space-between;
246
+ gap: 20px;
247
+ margin-top: 30px;
248
+ padding-top: 14px;
249
+ border-top: 1px solid var(--line);
250
+ color: var(--muted);
251
+ font-size: 12px;
252
+ }
253
+
254
+ @media (max-width: 820px) {
255
+ .report-page { width: calc(100% - 20px); padding: 28px 20px; }
256
+ .grid-2, .grid-3, .grid-4, .flow-row { grid-template-columns: 1fr; }
257
+ .report-topline, .footer { flex-direction: column; }
258
+ }
@@ -0,0 +1,97 @@
1
+ # yuanflow-skill
2
+
3
+ YuanFlow Skill 是 `yuanflow-cli` 的 Agent Skill 仓库,用于把社媒平台 API 调用能力安装到支持 Skill 的本地 AI Agent 中。
4
+
5
+ ## 包含内容
6
+
7
+ - `SKILL.md`:总入口,负责分流和索引。
8
+ - `yuanflow-cli/`:API CLI 子 Skill,说明 `yuanflow-cli` 的安装、配置、命令发现、schema 查询、dry-run 和 agent-json 调用方式。
9
+ - `自媒体知识库/`:自媒体知识库渐进查询 Skill,走 `yuanflow-cli knowledge`。
10
+ - `OSS文件中转工具/`:OSS 临时上传、签名链接、对象复制 Skill,走 `yuanflow-cli oss`。
11
+ - `生图技能/`:图片生成与编辑 Skill,优先走 YuanFlow 内置 `yuanflow_image_request`。
12
+ - `HTML报告生成/`:单页 HTML 报告生成 Skill,内置 9 种米色留白报告模板。
13
+
14
+ ## 适用场景
15
+
16
+ - 查询抖音、小红书、Bilibili、微信视频号、微信公众号等平台数据。
17
+ - 查看可用 API 命令、快捷命令和 schema。
18
+ - 让本地 Agent 稳定调用 `yuanflow-cli` 并解析 JSON 输出。
19
+ - 查询自媒体知识库公开方向、方法包和规则摘要。
20
+ - 上传文件到临时 OSS、生成签名链接或复制 OSS 对象。
21
+ - 生成图片、编辑图片,并缓存返回 URL 或 base64 图片。生成图片必填 `prompt`,可选 `size / quality / style / n / response_format`;编辑图片必须通过 multipart 上传本地图片。
22
+ - 把自媒体分析、数据复盘、文案方案、账号监控、知识梳理和执行计划生成可直接打开的单页 HTML 报告。
23
+
24
+ ## 双环境使用方式
25
+
26
+ 这套 Skill 同时支持两种环境:
27
+
28
+ - YuanFlow 主程序内:优先使用内置工具 `yuanflow_cli_call`、`yuanflow_gateway_request` 或 `yuanflow_image_request`,token 由主程序认证系统注入,不要求用户安装 npm 或配置 token。
29
+ - 外部 Agent 内:优先使用本地 `yuanflow-cli`;如果本地没有,再通过 npm 安装。
30
+
31
+ 外部 Agent 独立使用时,推荐环境变量:
32
+
33
+ ```bash
34
+ YUANCHUANG_API_TOKEN=<你的令牌>
35
+ ```
36
+
37
+ 也可以通过 `yuanflow-cli config set-token <你的令牌>` 保存到本地配置。
38
+
39
+ ## 配合 npm 包使用
40
+
41
+ 安装 `yuanflow-cli`:
42
+
43
+ ```bash
44
+ npm install -g yuanflow-cli
45
+ ```
46
+
47
+ 安装 Skill 到本地 Agent:
48
+
49
+ ```bash
50
+ yuanflow-skill install
51
+ ```
52
+
53
+ 指定安装目标:
54
+
55
+ ```bash
56
+ yuanflow-skill install --agent codex,cursor
57
+ ```
58
+
59
+ 项目级安装:
60
+
61
+ ```bash
62
+ yuanflow-skill install --project
63
+ ```
64
+
65
+ 查看可发现的 Skill:
66
+
67
+ ```bash
68
+ yuanflow-skill list-skills
69
+ ```
70
+
71
+ ## 目录规范
72
+
73
+ 每个子 Skill 使用独立目录,并在目录内提供 `SKILL.md`。
74
+
75
+ ```text
76
+ .
77
+ ├─ SKILL.md
78
+ ├─ yuanflow-cli
79
+ │ └─ SKILL.md
80
+ ├─ 自媒体知识库
81
+ │ └─ SKILL.md
82
+ ├─ 生图技能
83
+ │ └─ SKILL.md
84
+ ├─ HTML报告生成
85
+ │ ├─ SKILL.md
86
+ │ ├─ templates/
87
+ │ └─ references/
88
+ └─ OSS文件中转工具
89
+ └─ SKILL.md
90
+ ```
91
+
92
+ ## 维护说明
93
+
94
+ - 根目录 `SKILL.md` 只维护分流逻辑。
95
+ - 子 Skill 的具体说明和工作流放在各自目录中。
96
+ - 新增子 Skill 时,在根目录 `SKILL.md` 中补充分流规则。
97
+ - 保持 Skill 名称、目录名和 npm 命令名一致,统一使用小写 `yuanflow-*`。
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: yuanflow-skill
3
- description: Use when the user asks about social-media API workflows, platform data queries, command discovery, or choosing among yuanflow-cli sub-skills for atomic access to Douyin, Xiaohongshu, Bilibili, WeChat, TikTok, YouTube, Weibo, Zhihu and related platforms.
3
+ description: Use when the user asks about social-media API workflows, platform data queries, command discovery, image generation, OSS transfer, knowledge-base workflows, HTML report generation, or choosing among yuanflow-cli sub-skills for atomic access to Douyin, Xiaohongshu, Bilibili, WeChat, TikTok, YouTube, Weibo, Zhihu and related platforms.
4
4
  ---
5
5
 
6
6
  # YuanFlow Skill
@@ -21,6 +21,7 @@ description: Use when the user asks about social-media API workflows, platform d
21
21
  - `自媒体知识库/`
22
22
  - `OSS文件中转工具/`
23
23
  - `生图技能/`
24
+ - `HTML报告生成/`
24
25
 
25
26
  ## 环境判断
26
27
 
@@ -152,6 +153,18 @@ description: Use when the user asks about social-media API workflows, platform d
152
153
 
153
154
  - `生图技能`
154
155
 
156
+ ### 10. 走 `HTML报告生成`
157
+
158
+ 遇到下面这些需求,优先进入这个子 Skill:
159
+
160
+ - 生成 HTML 报告、单页报告、可视化长文报告。
161
+ - 把自媒体分析、数据复盘、文案方案、账号监控、知识梳理、执行计划整理成可直接打开的 HTML 文件。
162
+ - 用户要求套用报告模板、生成报告页面、做一份可以离线查看的 HTML 总结页。
163
+
164
+ 子 Skill 名称:
165
+
166
+ - `HTML报告生成`
167
+
155
168
  ## 多需求时怎么处理
156
169
 
157
170
  如果用户一次提了多段流程,不要强行塞进一个子 Skill,按阶段拆开: