@aiyiran/myclaw 1.1.25 → 1.1.33

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 (103) hide show
  1. package/assets/myclaw-artifacts.js +54 -11
  2. package/package.json +1 -1
  3. package/patches/patch-manifest.json +10 -0
  4. package/skills/yiran-course-template-pipeline/README.md +132 -0
  5. package/skills/yiran-course-template-pipeline/SKILL.md +69 -0
  6. package/skills/yiran-course-template-pipeline/assets/a100-teacher.example.html +66 -0
  7. package/skills/yiran-course-template-pipeline/assets/student-template.html +64 -0
  8. package/skills/yiran-course-template-pipeline/assets/teacher-portrait-demo.html +105 -0
  9. package/skills/yiran-course-template-pipeline/assets/teacher-task-view.html +110 -0
  10. package/skills/yiran-course-template-pipeline/cdn-convention.md +77 -0
  11. package/skills/yiran-course-template-pipeline/prompts//350/257/204/344/273/267/347/202/271/345/255/220.md +107 -0
  12. package/skills/yiran-course-template-pipeline/prompts//351/230/266/346/256/2651-demo/347/224/237/346/210/220.md +128 -0
  13. package/skills/yiran-course-template-pipeline/prompts//351/230/266/346/256/2652-student/347/224/237/346/210/220.md +117 -0
  14. package/skills/yiran-course-template-pipeline/prompts//351/230/266/346/256/2653-teacher/347/224/237/346/210/220.md +133 -0
  15. package/skills/yiran-course-template-pipeline/prompts//351/230/266/346/256/2654-/346/211/223/345/214/205/350/220/275/347/233/230.md +107 -0
  16. package/skills/yiran-course-template-pipeline/references/student-example.json +38 -0
  17. package/skills/yiran-course-template-pipeline/references/student-fields.md +195 -0
  18. package/skills/yiran-course-template-pipeline/references/student-scaffold.json +34 -0
  19. package/skills/yiran-course-template-pipeline/references/teacher-fields.md +265 -0
  20. package/skills/yiran-course-template-pipeline/references/teacher-scaffold.json +25 -0
  21. package/skills/yiran-course-template-pipeline/scripts/build_template_index.py +103 -0
  22. package/skills/yiran-course-template-pipeline/scripts/build_template_views.py +125 -0
  23. package/skills/yiran-course-template-pipeline/scripts/move_template_task.py +58 -0
  24. package/skills/yiran-course-template-pipeline/scripts/publish_template.py +193 -0
  25. package/skills/yiran-course-template-pipeline/scripts/render_student_page.py +52 -0
  26. package/skills/yiran-course-template-pipeline/scripts/render_teacher_view.py +108 -0
  27. package/skills/yiran-course-template-pipeline//344/270/232/345/212/241/350/203/214/346/231/257.md +81 -0
  28. package/skills/yiran-playground-template-use/SKILL.md +105 -0
  29. package/skills/yiran-playground-template-use/prompts/remix-handoff.txt +11 -0
  30. package/skills/yiran-playground-template-use/scripts/build_template_index.py +103 -0
  31. package/skills/yiran-playground-template-use/scripts/deploy_template.py +34 -0
  32. package/skills/yiran-playground-template-use/scripts/deploy_to_workspace.py +211 -0
  33. package/skills/yiran-playground-template-use/scripts/prepare_playgrounds.py +39 -0
  34. package/skills/yiran-playground-template-use/scripts/query_template.py +171 -0
  35. package/skills/yiran-playground-template-use/scripts/run_playgrounds_flow.py +44 -0
  36. package/skills/yiran-playground-template-use/scripts/start_tui_handoff.py +77 -0
  37. package/skills/yiran-playground-template-use/search-agent-prompt.md +39 -0
  38. package/skills/yiran-playground-template-use/template-index.json +136 -0
  39. package/skills/yiran-playground-template-use/template-index.md +38 -0
  40. package/.claude/settings.local.json +0 -49
  41. package/agent-list/workspace-danci/AGENTS.md +0 -13
  42. package/agent-list/workspace-danci/BOOTSTRAP.md +0 -5
  43. package/agent-list/workspace-danci/HEARTBEAT.md +0 -3
  44. package/agent-list/workspace-danci/IDENTITY.md +0 -5
  45. package/agent-list/workspace-danci/SOUL.md +0 -6
  46. package/agent-list/workspace-danci/TOOLS.md +0 -40
  47. package/agent-list/workspace-danci/USER.md +0 -7
  48. package/agent-list/workspace-danci/memory/birthday.md +0 -9
  49. package/agent-list/workspace-danci/memory/english-words-20260401.md +0 -225
  50. package/agent-list/workspace-fashe1/.openclaw/workspace-state.json +0 -4
  51. package/agent-list/workspace-fashe1/AGENTS.md +0 -212
  52. package/agent-list/workspace-fashe1/BOOTSTRAP.md +0 -55
  53. package/agent-list/workspace-fashe1/HEARTBEAT.md +0 -7
  54. package/agent-list/workspace-fashe1/IDENTITY.md +0 -23
  55. package/agent-list/workspace-fashe1/MEMORY.md +0 -5
  56. package/agent-list/workspace-fashe1/SOUL.md +0 -110
  57. package/agent-list/workspace-fashe1/TOOLS.md +0 -40
  58. package/agent-list/workspace-fashe1/USER.md +0 -17
  59. package/agent-list/workspace-fashe1/chaos-button/bg_music.mp3 +0 -0
  60. package/agent-list/workspace-fashe1/chaos-button/index.html +0 -1371
  61. package/agent-list/workspace-fashe1/chaos-button/tmpsz_k5dxa.png +0 -0
  62. package/agent-list/workspace-fashe1/chaos-button//347/202/253/351/205/267/346/234/272/347/224/262_1024x1024_20260416_125127.png +0 -0
  63. package/agent-list/workspace-fashe1/memory/2026-04-16.md +0 -5
  64. package/agent-list/workspace-fashe1//345/212/252/345/212/233/345/255/246/344/271/240/347/232/204/345/260/217/346/234/213/345/217/213.png +0 -0
  65. package/agent-list/workspace-fashe1//345/217/257/347/210/261/346/234/272/347/224/262.png +0 -0
  66. package/agent-list/workspace-fashe1//346/220/236/347/254/221/345/260/217/346/234/213/345/217/213.png +0 -0
  67. package/agent-list/workspace-fashe1//346/220/236/347/254/221/345/260/217/346/234/213/345/217/213_/345/215/263/346/242/246.png +0 -0
  68. package/agent-list/workspace-kakaxi/.openclaw/workspace-state.json +0 -4
  69. package/agent-list/workspace-kakaxi/AGENTS.md +0 -13
  70. package/agent-list/workspace-kakaxi/BOOTSTRAP.md +0 -5
  71. package/agent-list/workspace-kakaxi/HEARTBEAT.md +0 -3
  72. package/agent-list/workspace-kakaxi/IDENTITY.md +0 -7
  73. package/agent-list/workspace-kakaxi/MEMORY.md +0 -24
  74. package/agent-list/workspace-kakaxi/SOUL.md +0 -6
  75. package/agent-list/workspace-kakaxi/TOOLS.md +0 -44
  76. package/agent-list/workspace-kakaxi/USER.md +0 -7
  77. package/agent-list/workspace-kakaxi/cards/README.md +0 -31
  78. package/agent-list/workspace-kakaxi/cards/build.js +0 -210
  79. package/agent-list/workspace-kakaxi/cards/index.html +0 -370
  80. package/agent-list/workspace-kakaxi/cards/workflow-new-card.md +0 -70
  81. package/agent-list/workspace-kakaxi/cards//346/231/272/350/203/275/344/275/223/345/205/245/351/227/250_2026-04-02_/344/275/234/345/223/201/346/233/264/346/234/211/347/224/250_v1.md +0 -163
  82. package/agent-list/workspace-kakaxi/cards//346/231/272/350/203/275/344/275/223/345/205/245/351/227/250_2026-04-02_/345/210/233/345/273/272/347/254/254/344/270/200/344/270/252/346/231/272/350/203/275/344/275/223_v1.md +0 -168
  83. package/agent-list/workspace-kakaxi/cards//346/231/272/350/203/275/344/275/223/345/205/245/351/227/250_2026-04-02_/345/277/253/346/215/267/350/264/246/345/217/267/344/277/241/346/201/257.md +0 -32
  84. package/agent-list/workspace-kakaxi/cards//346/231/272/350/203/275/344/275/223/345/205/245/351/227/250_2026-04-02_/346/210/220/350/257/255/345/212/251/346/211/213_v2.md +0 -145
  85. package/agent-list/workspace-kakaxi/cards//346/231/272/350/203/275/344/275/223/345/205/245/351/227/250_2026-04-02_/346/226/207/344/273/266/344/277/235/345/255/230_v1.md +0 -147
  86. package/agent-list/workspace-kakaxi/cards//346/231/272/350/203/275/344/275/223/345/205/245/351/227/250_2026-04-02_/346/226/207/344/273/266/350/265/204/344/272/247/345/217/230/344/275/234/345/223/201_v1.md +0 -148
  87. package/agent-list/workspace-kakaxi/cards//346/231/272/350/203/275/344/275/223/345/205/245/351/227/250_2026-04-02_/346/230/216/346/227/245/344/273/273/345/212/241_v1.md +0 -50
  88. package/agent-list/workspace-kakaxi/cards//346/231/272/350/203/275/344/275/223/345/205/245/351/227/250_2026-04-02_/346/250/241/345/236/213/350/267/221/350/265/267/346/235/245_v2.md +0 -190
  89. package/agent-list/workspace-kakaxi/teaching-task-standard.md +0 -177
  90. package/skills/yiran-skill-media/scripts/__pycache__/generate.cpython-311.pyc +0 -0
  91. package/skills/yiran-skill-media/scripts/providers/__pycache__/__init__.cpython-311.pyc +0 -0
  92. package/skills/yiran-skill-media/scripts/providers/__pycache__/__init__.cpython-37.pyc +0 -0
  93. package/skills/yiran-skill-media/scripts/providers/__pycache__/jimeng_image.cpython-37.pyc +0 -0
  94. package/skills/yiran-skill-media/scripts/providers/__pycache__/jimeng_video.cpython-311.pyc +0 -0
  95. package/skills/yiran-skill-media/scripts/providers/__pycache__/jimeng_video.cpython-37.pyc +0 -0
  96. package/skills/yiran-skill-media/scripts/providers/__pycache__/minimax_image.cpython-311.pyc +0 -0
  97. package/skills/yiran-skill-media/scripts/providers/__pycache__/minimax_image.cpython-37.pyc +0 -0
  98. package/skills/yiran-skill-media/scripts/providers/__pycache__/minimax_music.cpython-311.pyc +0 -0
  99. package/skills/yiran-skill-media/scripts/providers/__pycache__/minimax_music.cpython-37.pyc +0 -0
  100. package/skills/yiran-skill-media/scripts/providers/__pycache__/minimax_video.cpython-311.pyc +0 -0
  101. package/skills/yiran-skill-media/scripts/providers/__pycache__/minimax_video.cpython-37.pyc +0 -0
  102. package/skills/yiran-skill-media/scripts/providers/__pycache__/vapi_image.cpython-311.pyc +0 -0
  103. package/skills/yiran-skill-media/scripts/providers/__pycache__/vapi_image.cpython-37.pyc +0 -0
@@ -32,6 +32,7 @@
32
32
  var pollTimer = null;
33
33
  var lastKnownClawName = null; // 本地环境下从 API 获取,remote 环境每次从 hostname 实时派生
34
34
  var _preloadCache = {}; // url → Image 对象,防止重复预加载
35
+ var showHiddenArtifacts = false; // 是否显示被过滤掉的系统/模板内部文件
35
36
  var MYCLAW_API_PORT = 18800;
36
37
  // 远程环境(公网域名):nginx 已将 /sync 反代到 127.0.0.1:8080,直接同域访问
37
38
  // 本地环境:直接访问 127.0.0.1:18800
@@ -199,14 +200,47 @@
199
200
  'user-select: none',
200
201
  'flex-shrink: 0',
201
202
  ].join(';');
203
+ var leftGroup = document.createElement('div');
204
+ leftGroup.style.cssText = 'display:flex;align-items:center;gap:6px;';
205
+
202
206
  var titleSpan = document.createElement('span');
203
- titleSpan.textContent = '🎨 学生作品';
204
- titleSpan.style.cssText = 'cursor:pointer;border-radius:3px;padding:1px 4px;transition:background 0.15s;';
207
+ titleSpan.textContent = '⚙️';
208
+ titleSpan.style.cssText = 'cursor:pointer;border-radius:3px;padding:2px 4px;transition:background 0.15s;font-size:14px;';
205
209
  titleSpan.title = '查看统计信息';
206
210
  titleSpan.onmouseenter = function () { titleSpan.style.background = 'rgba(255,255,255,0.1)'; };
207
211
  titleSpan.onmouseleave = function () { titleSpan.style.background = 'none'; };
208
212
  titleSpan.onclick = function () { openStatsModal(); };
209
- header.appendChild(titleSpan);
213
+ leftGroup.appendChild(titleSpan);
214
+
215
+ var eyeBtn = document.createElement('span');
216
+ var updateEyeUI = function() {
217
+ if (showHiddenArtifacts) {
218
+ eyeBtn.textContent = '👁';
219
+ eyeBtn.style.opacity = '1';
220
+ eyeBtn.style.textDecoration = 'none';
221
+ eyeBtn.title = '隐藏内部模板文件';
222
+ } else {
223
+ eyeBtn.textContent = '👁';
224
+ eyeBtn.style.opacity = '0.5';
225
+ eyeBtn.style.textDecoration = 'line-through';
226
+ eyeBtn.title = '显示内部模板文件';
227
+ }
228
+ };
229
+ eyeBtn.style.cssText = 'cursor:pointer;border-radius:3px;padding:2px 4px;transition:all 0.15s;font-size:13px;';
230
+ updateEyeUI();
231
+ eyeBtn.onmouseenter = function() { eyeBtn.style.background = 'rgba(255,255,255,0.1)'; };
232
+ eyeBtn.onmouseleave = function() { eyeBtn.style.background = 'none'; };
233
+ eyeBtn.onclick = function() {
234
+ showHiddenArtifacts = !showHiddenArtifacts;
235
+ updateEyeUI();
236
+ var contentEl = document.querySelector('#myclaw-artifacts-content');
237
+ if (cachedData && contentEl) {
238
+ renderArtifactsList(contentEl, cachedData);
239
+ }
240
+ };
241
+ leftGroup.appendChild(eyeBtn);
242
+
243
+ header.appendChild(leftGroup);
210
244
 
211
245
  // 搜索框(或获取已存在的搜索框)
212
246
  var searchBoxHeader = document.querySelector('#myclaw-search-box');
@@ -243,7 +277,7 @@
243
277
  var _scWs = getWorkspaceId();
244
278
  showcaseLink.href = 'https://www.yiranlaoshi.com/showcase?claw=' + _scClaw + '&workspace=' + _scWs;
245
279
  showcaseLink.target = '_blank';
246
- showcaseLink.textContent = '\uD83D\uDC41 \u9879\u76EE\u96C6';
280
+ showcaseLink.textContent = '我的项目';
247
281
  showcaseLink.style.cssText = 'cursor:pointer;padding:2px 10px;border-radius:3px;font-size:12px;background:rgba(255,255,255,0.08);transition:background 0.15s;color:#cdd6f4;text-decoration:none;';
248
282
  showcaseLink.onmouseenter = function () { showcaseLink.style.background = 'rgba(255,255,255,0.18)'; };
249
283
  showcaseLink.onmouseleave = function () { showcaseLink.style.background = 'rgba(255,255,255,0.08)'; };
@@ -457,10 +491,12 @@
457
491
  '__teacher__.json',
458
492
  '__teacher-view__.html',
459
493
  ];
460
- sorted = sorted.filter(function (asset) {
461
- var basename = (asset.path || asset.name || '').split('/').pop();
462
- return ARTIFACT_BLACKLIST.indexOf(basename) === -1;
463
- });
494
+ if (!showHiddenArtifacts) {
495
+ sorted = sorted.filter(function (asset) {
496
+ var basename = (asset.path || asset.name || '').split('/').pop();
497
+ return ARTIFACT_BLACKLIST.indexOf(basename) === -1;
498
+ });
499
+ }
464
500
 
465
501
  sorted.forEach(function (asset, idx) {
466
502
  // 状态判断:基于 last_open 时间戳
@@ -792,7 +828,14 @@
792
828
  'background: #fff',
793
829
  ].join(';');
794
830
 
795
- iframe.src = previewUrl + '?t=' + Date.now();
831
+ // 大文件(音频/视频)走 CDN,其余走本地 server(避免 CDN charset 导致乱码)
832
+ var assetExt = (asset.path || '').split('.').pop().toLowerCase();
833
+ var CDN_EXTS = ['mp3', 'wav', 'ogg', 'flac', 'aac', 'm4a', 'mp4', 'webm', 'mov', 'avi', 'mkv'];
834
+ if (CDN_EXTS.indexOf(assetExt) !== -1) {
835
+ iframe.src = previewUrl + '?t=' + Date.now();
836
+ } else {
837
+ iframe.src = MYCLAW_API_BASE + '/api/file?path=' + encodeURIComponent(getWorkspaceId() + '/' + asset.path) + '&t=' + Date.now();
838
+ }
796
839
 
797
840
  box.appendChild(iframe);
798
841
  overlay.appendChild(box);
@@ -2107,7 +2150,7 @@
2107
2150
 
2108
2151
  // ═══ 作品模板列表弹框 ═══
2109
2152
  // 使用通用文件接口 GET /api/file?path=(路径相对 .openclaw 根)
2110
- var TEMPLATE_ROOT = 'workspace-ai-demo/skills/yiran-playground-template-use';
2153
+ var TEMPLATE_ROOT = 'skills/yiran-playground-template-use';
2111
2154
 
2112
2155
  function openTemplateModal() {
2113
2156
  if (document.querySelector('#myclaw-template-modal')) return;
@@ -2329,7 +2372,7 @@
2329
2372
 
2330
2373
  // 加载 demo.html(text/html,server 直接返回,iframe 可正常渲染)
2331
2374
  previewIframe.src = MYCLAW_API_BASE + '/api/file?path='
2332
- + encodeURIComponent(TEMPLATE_ROOT + '/templates/' + tpl['文件夹名'] + '/demo.html');
2375
+ + encodeURIComponent(TEMPLATE_ROOT + '/templates/' + tpl['文件夹名'] + '/__student-view__.html');
2333
2376
  }
2334
2377
 
2335
2378
  row.onclick = setActive;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiyiran/myclaw",
3
- "version": "1.1.25",
3
+ "version": "1.1.33",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -17,6 +17,16 @@
17
17
  "name": "yiran-skill-media",
18
18
  "strategy": "on",
19
19
  "description": "统一多媒体生成 skill(图片+音乐,主备切换)"
20
+ },
21
+ {
22
+ "name": "yiran-playground-template-use",
23
+ "strategy": "on",
24
+ "description": "AI Playground 课程模板库(存储、搜索、deploy 一条龙)"
25
+ },
26
+ {
27
+ "name": "yiran-course-template-pipeline",
28
+ "strategy": "on",
29
+ "description": "课程模板制作流水线(demo -> student/teacher JSON -> HTML 打包)"
20
30
  }
21
31
  ],
22
32
  "_doc_agents": "Step 3: 将 agent-list/ 下的智能体分发到 ~/.openclaw/ 并注册到 openclaw.json",
@@ -0,0 +1,132 @@
1
+ # 课程模板流水线 Skill
2
+
3
+ 这个 skill 面向中文课堂的小专题课程设计流程。
4
+
5
+ 它的目标不是只生成某一个页面,而是把一个“题目灵感 / 设计角度”逐步变成一整套可用的课程任务文件。
6
+
7
+ ---
8
+
9
+ 业务背景请统一参考:
10
+ `业务背景.md`
11
+
12
+ ---
13
+
14
+ # 当前工作流
15
+
16
+ ## 阶段一:灵感 -> demo 页面
17
+ 最开始输入的是:
18
+ - 题目灵感
19
+ - 设计角度
20
+ - 课堂上的切入想法
21
+
22
+ 这一阶段最重要的事情是:
23
+ **先做出 __demo__.html(效果演示页)**
24
+
25
+ 阶段一到阶段三的产物,统一放在:
26
+ **当前工作目录下新建的 `任务名称/` 文件夹里。**
27
+
28
+ 也就是说:
29
+ - 不先放到 templates
30
+ - 不先放到 skill 目录根部
31
+ - 而是在当前工作目录里,先建立一个任务临时文件夹,再往里写 `__demo__.html`、`__student__.json`、`__teacher__.json`
32
+
33
+ ---
34
+
35
+ ## 阶段二:生成 __student__.json
36
+ 这一阶段不要求一定已经有 __teacher__.json。
37
+ 这一阶段甚至不要求一定已经有完整作品。
38
+
39
+ 这一阶段的核心目标是:
40
+ **先把学生任务的步骤和评价结构 JSON 确立下来。**
41
+
42
+ 对应输出:
43
+ `__student__.json`
44
+
45
+ ---
46
+
47
+ ## 阶段三:生成 __teacher__.json
48
+ 在 __student__.json 已经明确后,再整理教师侧信息。
49
+
50
+ 这一阶段的核心目标是:
51
+ **明确题目设计目的、训练重点、适合学生类型,以及老师上课时如何判断和引导。**
52
+
53
+ 对应输出:
54
+ `__teacher__.json`
55
+
56
+ ---
57
+
58
+ ## 阶段四:JSON -> HTML,并按目录打包
59
+ 第4阶段现在拆成两个脚本:
60
+
61
+ ### 1)build_template_views.py
62
+ 校验通过后,在原文件夹中直接生成:
63
+ - `__student-view__.html`
64
+ - `__teacher-view__.html`
65
+ - `index.html`
66
+
67
+ 其中 `index.html` 采用固定脚本规则:
68
+ - 只展示两块内容
69
+ - 左边是“评价目标”
70
+ - 右边是“步骤”
71
+ - 不显示任务标题
72
+ - 不显示一句话说明
73
+ - 不再依赖临时提示词拼装
74
+ - 统一由脚本直接根据 `__student__.json` 渲染
75
+
76
+ ### 2)move_template_task.py
77
+ 在页面已经生成好的前提下,把整个文件夹移动到:
78
+ `yiran-playground-template-use` skill 的 `templates/`
79
+
80
+ 同时按规则改名,例如:
81
+ `a100_给依然老师设计一个AI画像`
82
+
83
+ 并且:
84
+ **move 成功后会自动触发 `yiran-playground-template-use` 的索引重建。**
85
+
86
+ ---
87
+
88
+ # 当前目录结构
89
+
90
+ - `SKILL.md`:技能总说明
91
+ - `prompts/阶段1-demo生成.md`:如何把灵感先做成 demo 页面
92
+ - `prompts/阶段2-student生成.md`:如何生成 __student__.json
93
+ - `prompts/阶段3-teacher生成.md`:如何生成 __teacher__.json
94
+ - `prompts/阶段4-打包落盘.md`:如何组织文件并调用第4阶段脚本
95
+ - `scripts/render_teacher_view.py`:把 __teacher__.json 渲染成教师查看页
96
+ - `scripts/render_student_page.py`:把 __student__.json 渲染成学生页
97
+ - `scripts/build_template_views.py`:在原目录生成 __student-view__.html 和 __teacher-view__.html
98
+ - `scripts/move_template_task.py`:移动整个任务文件夹到 templates 并改名,同时自动重建索引
99
+ - `references/teacher-fields.md`:教师侧字段设计与标签规则说明
100
+ - `references/student-fields.md`:学生侧字段说明
101
+ - `references/student-example.json`:学生侧 JSON 示例
102
+ - `references/student-scaffold.json`:学生侧 JSON 脚手架
103
+ - `references/teacher-scaffold.json`:教师侧 JSON 脚手架
104
+ - `assets/student-template.html`:独立学生页模板
105
+ - 模板库和搜索索引统一维护在 `yiran-playground-template-use` skill 中
106
+
107
+ ---
108
+
109
+ # 模板索引
110
+
111
+ 模板库和索引统一维护在 `yiran-playground-template-use` skill 中。
112
+
113
+ `move_template_task.py` 成功执行后会自动触发索引重建。如需手动重建,在 `yiran-playground-template-use` skill 中运行:
114
+
115
+ ```bash
116
+ python3 scripts/build_template_index.py
117
+ ```
118
+
119
+ ---
120
+
121
+ # 核心原则
122
+
123
+ 1. 先有灵感,再做 demo,再定 __student__.json,再定 __teacher__.json
124
+ 2. 阶段一到三的产物,统一放在当前工作目录下新建的任务文件夹里
125
+ 3. __student__.json 先解决学生任务结构
126
+ 4. __teacher__.json 再解决题目设计目的与教师判断
127
+ 5. 第4阶段拆成 build 和 move 两个独立脚本
128
+ 6. templates 作为 skill 的资产目录统一维护
129
+ 7. 模板有变化后,要重新构建索引
130
+ 8. demo 中的媒体资源优先使用 CDN 链接,不使用本地相对路径;当前固定前缀为 `https://cdn.yiranlaoshi.com/yiran/workspace-ai-demo`,后面拼接资源相对路径
131
+ 9. 模板负责布局,提示词负责填内容,脚本负责稳定输出
132
+ 10. 所有内容优先服务中文课堂和小学生阅读场景
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: yiran-course-template-pipeline
3
+ description: 面向中文课堂的小专题课程模板流水线。适用于把一个题目灵感或设计角度,先生成 demo 页面,再先后整理成 __student__.json 和 __teacher__.json,最后通过脚本生成页面、整理目录、沉淀模板资产并构建模板索引。
4
+ ---
5
+
6
+ # 课程模板流水线
7
+
8
+ 这个 skill 支持的是一条完整工作流,而不是单点产出。
9
+
10
+
11
+ ## 四阶段流程
12
+
13
+ ### 1)灵感 -> demo 页面
14
+ 当用户先给出题目灵感、设计角度或课堂切入点时,优先生成 demo 页面。
15
+
16
+ 这一阶段优先使用:
17
+ - `prompts/阶段1-demo生成.md`
18
+
19
+ ### 2)生成 __student__.json
20
+ 这个阶段最重要的目标是:
21
+ 先把学生任务的步骤和评价结构 JSON 确立下来。
22
+
23
+ 这一阶段优先使用:
24
+ - `prompts/阶段2-student生成.md`
25
+ - `references/student-fields.md`
26
+ - `references/student-example.json`
27
+ - `references/student-scaffold.json`
28
+
29
+ ### 3)生成 __teacher__.json
30
+ 在 __student__.json 已经明确后,再整理教师侧信息。
31
+
32
+ 这一阶段优先使用:
33
+ - `prompts/阶段3-teacher生成.md`
34
+ - `references/teacher-fields.md`
35
+ - `references/teacher-scaffold.json`
36
+
37
+ ### 阶段一到三的工作目录规则
38
+ 阶段一到阶段三产出的文件,统一放在:
39
+ **当前工作目录下新建的 `任务名称/` 文件夹里。**
40
+
41
+ 也就是说,这几个中间产物先写在当前工作目录的任务文件夹内:
42
+ - `__demo__.html`
43
+ - `__student__.json`
44
+ - `__teacher__.json`
45
+
46
+ ### 4)JSON -> HTML,并按目录打包
47
+ 第4阶段拆成三个独立脚本:
48
+ - `scripts/build_template_views.py`
49
+ - `scripts/move_template_task.py`
50
+ - `scripts/publish_template.py`
51
+
52
+ 其中:
53
+ - build 负责在原目录生成 `__student-view__.html`、`__teacher-view__.html` 和 `index.html`
54
+ - `index.html` 采用固定脚本规则:左边展示”评价目标”,右边展示”步骤”,不显示任务标题和一句话说明
55
+ - move 负责把任务文件夹移动到 `yiran-playground-template-use` skill 的 `templates/`,并自动触发索引重建
56
+ - publish 负责把模板文件夹内所有资源上传到七牛 CDN,并重写 HTML 中的资源引用为 CDN 绝对地址(见 `cdn-convention.md`)
57
+
58
+ ## 原则
59
+
60
+ - 先做 demo
61
+ - 再定 __student__.json
62
+ - 再定 __teacher__.json
63
+ - 阶段一到三先在当前工作目录的任务文件夹里完成
64
+ - 所有 HTML 中的外部资源(图片、字体、JS 库等)必须使用 CDN 链接,禁止本地相对路径;使用哪个 CDN 不限
65
+ - publish 脚本会统一重新打包:无论原引用是相对路径还是其他 CDN,只要本地能找到对应文件,都会上传到指定 CDN 并重写引用(见 `cdn-convention.md`)
66
+ - 第4阶段拆成 build、move、publish 三个独立脚本
67
+ - templates 作为 skill 的资产目录统一维护
68
+ - 模板有变化后,要重新构建索引
69
+ - 全部内容优先中文
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>A100 · 给依然老师设计一个AI画像</title>
7
+ <style>
8
+ * { box-sizing: border-box; }
9
+ body { margin: 0; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: #f4f7fb; color: #24324a; }
10
+ .page { max-width: 1200px; margin: 0 auto; padding: 20px; }
11
+ .hero { background: linear-gradient(135deg,#5f82ff 0%,#8c74ff 100%); color: #fff; border-radius: 24px; padding: 22px 24px; box-shadow: 0 16px 36px rgba(92,108,192,.22); }
12
+ .hero h1 { margin: 0; font-size: 28px; }
13
+ .hero p { margin: 8px 0 0; opacity: .92; font-size: 14px; }
14
+ .view { margin-top: 18px; display: grid; gap: 16px; }
15
+ .top { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; }
16
+ .card { background: #fff; border: 1px solid #e7eefc; border-radius: 20px; padding: 18px; box-shadow: 0 10px 24px rgba(100,122,166,.08); }
17
+ .card h2 { margin: 0 0 12px; font-size: 18px; color: #314a96; }
18
+ .meta-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
19
+ .meta-item { background: #f8faff; border: 1px solid #e7eefc; border-radius: 14px; padding: 12px; }
20
+ .meta-item .label { font-size: 12px; color: #7a89ad; margin-bottom: 6px; }
21
+ .meta-item .value { font-size: 14px; color: #24324a; font-weight: 700; }
22
+ .tags { display: flex; flex-wrap: wrap; gap: 8px; }
23
+ .tag { display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 999px; background: #edf2ff; color: #4c65c3; font-size: 13px; font-weight: 700; }
24
+ .section-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
25
+ .list { display: grid; gap: 10px; }
26
+ .list-item { background: #f8faff; border: 1px solid #e7eefc; border-radius: 14px; padding: 12px; line-height: 1.7; font-size: 14px; color: #60708b; }
27
+ .issue { border-left: 4px solid #8c74ff; background: #faf8ff; }
28
+ .issue strong { color: #314a96; display: block; margin: 6px 0; }
29
+ @media (max-width: 900px) { .top, .section-grid, .meta-grid { grid-template-columns: 1fr; } }
30
+ </style>
31
+ </head>
32
+ <body>
33
+ <div class="page">
34
+ <section class="hero">
35
+ <h1>A100 · 给依然老师设计一个AI画像</h1>
36
+ <p>这是根据教师 JSON 自动生成的可视化查看页,方便老师快速扫读与判断。</p>
37
+ </section>
38
+
39
+ <section class="view">
40
+ <div class="top">
41
+ <div class="card">
42
+ <h2>基础信息</h2>
43
+ <div class="meta-grid">
44
+ <div class="meta-item"><div class="label">主能力标签</div><div class="value">表达构建</div></div>
45
+ <div class="meta-item"><div class="label">任务类型标签</div><div class="value">视听表达</div></div>
46
+ </div>
47
+ </div>
48
+ <div class="card">
49
+ <h2>适合学生类型</h2>
50
+ <div class="tags"><span class="tag">初次接触</span><span class="tag">需要明确目标</span><span class="tag">持续迭代</span></div>
51
+ </div>
52
+ </div>
53
+
54
+ <div class="section-grid">
55
+ <div class="card"><h2>训练重点</h2><div class="list"><div class="list-item">围绕明确对象生成形象</div><div class="list-item">把人物图片放进网页中完成展示</div><div class="list-item">通过小幅修改让作品逐步变好</div></div></div>
56
+ <div class="card"><h2>可拓展方向</h2><div class="list"><div class="list-item">给画像加背景音乐</div><div class="list-item">加入点击切换不同版本画像</div><div class="list-item">给人物加一句语音介绍</div></div></div>
57
+ </div>
58
+
59
+ <div class="section-grid">
60
+ <div class="card"><h2>卡点和解决方案</h2><div class="list"><div class="list-item issue"><strong>卡点</strong>学生不知道要画谁,描述很泛<strong>解决方案</strong>先让学生说清楚对象是谁,再从发型、衣服、表情这些具体点开始描述</div><div class="list-item issue"><strong>卡点</strong>学生一次改太多,看不出变化<strong>解决方案</strong>提醒学生每次只改一个地方,比如先改头发,再改表情</div></div></div>
61
+ <div class="card"><h2>课后作业</h2><div class="list"><div class="list-item">回家把老师画像再优化一版,至少改一个地方,并说明你改了什么</div><div class="list-item">给网页再加入一张新版本图片,展示前后变化</div></div></div>
62
+ </div>
63
+ </section>
64
+ </div>
65
+ </body>
66
+ </html>
@@ -0,0 +1,64 @@
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>{{任务标题}}</title>
7
+ <style>
8
+ * { box-sizing: border-box; }
9
+ body { margin: 0; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: #f4f7fb; color: #24324a; }
10
+ .page { max-width: 1440px; margin: 0 auto; padding: 20px 20px 48px; }
11
+ .header-bar { background: linear-gradient(135deg,#5f82ff 0%,#8c74ff 100%); border-radius: 24px; padding: 20px 24px; box-shadow: 0 16px 36px rgba(92,108,192,.24); }
12
+ .header-left h1 { margin: 0; font-size: 26px; line-height: 1.3; color: #fff; font-weight: 800; }
13
+ .header-left .subtitle { margin: 8px 0 0; font-size: 13px; line-height: 1.8; color: rgba(255,255,255,.88); }
14
+ .main-section { margin-top: 18px; }
15
+ .block { background: #fff; border-radius: 24px; padding: 22px; box-shadow: 0 10px 28px rgba(100,122,166,.12); }
16
+ .content-layout { display: grid; grid-template-columns: 220px minmax(0,1fr) 220px; gap: 14px; align-items: stretch; }
17
+ .task-panel, .goal-panel { background: #f8faff; border: 1px solid #e7eefc; border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
18
+ .panel-group h3 { margin: 0 0 10px; color: #334d98; font-size: 17px; }
19
+ .task-item { margin-bottom: 10px; }
20
+ .task-item:last-child { margin-bottom: 0; }
21
+ .item-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: #7a89ad; }
22
+ .item-body { background: #fff; border: 1px solid #e7eefc; border-radius: 12px; padding: 10px 12px; font-size: 13px; color: #60708b; line-height: 1.7; }
23
+ .task-item .num { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #edf2ff; color: #7a89ad; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
24
+ .star-item .num { background: #fff7dc; color: #b89a4f; }
25
+ .sample-frame-wrap { background: #f8faff; border: 1px solid #e7eefc; border-radius: 20px; padding: 14px; min-width: 0; }
26
+ .sample-frame-head { display: flex; justify-content: flex-start; align-items: center; gap: 10px; margin-bottom: 12px; }
27
+ .sample-frame-head h3 { margin: 0; color: #334d98; font-size: 17px; }
28
+ iframe { width: 100%; height: 560px; border: 1px solid #dfe7fb; border-radius: 16px; background: #fff; display: block; }
29
+ @media (max-width: 960px) { .page { padding: 14px 12px 32px; } .header-bar { padding: 16px 18px; } .header-left h1 { font-size: 22px; } .header-left .subtitle { font-size: 12px; } .content-layout { grid-template-columns: 1fr; } .task-panel, .goal-panel, .sample-frame-wrap { padding: 14px; } iframe { height: 360px; } }
30
+ </style>
31
+ </head>
32
+ <body>
33
+ <div class="page">
34
+ <header class="header-bar">
35
+ <div class="header-left">
36
+ <h1>{{任务标题}}</h1>
37
+ <p class="subtitle">{{一句话说明}}</p>
38
+ </div>
39
+ </header>
40
+ <div class="main-section">
41
+ <section class="block">
42
+ <div class="content-layout">
43
+ <div class="task-panel">
44
+ <div class="panel-group">
45
+ <h3>步骤</h3>
46
+ {{步骤区域}}
47
+ </div>
48
+ </div>
49
+ <div class="sample-frame-wrap">
50
+ <div class="sample-frame-head"><h3>{{示例区标题}}</h3></div>
51
+ <iframe src="{{示例页面文件}}" title="{{示例区标题}}"></iframe>
52
+ </div>
53
+ <div class="goal-panel">
54
+ <div class="panel-group">
55
+ <h3>评价目标</h3>
56
+ {{评价目标区域}}
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </section>
61
+ </div>
62
+ </div>
63
+ </body>
64
+ </html>
@@ -0,0 +1,105 @@
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>小专题模板 Demo</title>
7
+ <style>
8
+ * { box-sizing: border-box; }
9
+ body { margin: 0; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: #f4f7fb; color: #24324a; }
10
+ .page { max-width: 1440px; margin: 0 auto; padding: 20px 20px 48px; }
11
+ .header-bar { background: linear-gradient(135deg, #5f82ff 0%, #8c74ff 100%); border-radius: 24px; padding: 20px 24px; box-shadow: 0 16px 36px rgba(92, 108, 192, 0.24); }
12
+ .header-left h1 { margin: 0; font-size: 26px; line-height: 1.3; color: #fff; font-weight: 800; }
13
+ .header-left .subtitle { margin: 8px 0 0; font-size: 13px; line-height: 1.8; color: rgba(255,255,255,0.88); }
14
+ .main-section { margin-top: 18px; display: grid; gap: 18px; }
15
+ .block, .teacher-section { background: #fff; border-radius: 24px; padding: 22px; box-shadow: 0 10px 28px rgba(100, 122, 166, 0.12); }
16
+ .content-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr) 220px; gap: 14px; align-items: stretch; }
17
+ .task-panel, .goal-panel { background: #f8faff; border: 1px solid #e7eefc; border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
18
+ .panel-group h3 { margin: 0 0 10px; color: #334d98; font-size: 17px; }
19
+ .task-item { margin-bottom: 10px; }
20
+ .task-item:last-child { margin-bottom: 0; }
21
+ .item-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: #7a89ad; }
22
+ .item-body { background: #fff; border: 1px solid #e7eefc; border-radius: 12px; padding: 10px 12px; font-size: 13px; color: #60708b; line-height: 1.7; }
23
+ .task-item .num { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #edf2ff; color: #7a89ad; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
24
+ .star-item .num { background: #fff7dc; color: #b89a4f; }
25
+ .sample-frame-wrap { background: #f8faff; border: 1px solid #e7eefc; border-radius: 20px; padding: 14px; min-width: 0; }
26
+ .sample-frame-head { display: flex; justify-content: flex-start; align-items: center; gap: 10px; margin-bottom: 12px; }
27
+ .sample-frame-head h3 { margin: 0; color: #334d98; font-size: 17px; }
28
+ iframe { width: 100%; height: 560px; border: 1px solid #dfe7fb; border-radius: 16px; background: #fff; display: block; }
29
+ .block-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
30
+ .block-title h2 { margin: 0; font-size: 24px; color: #2d438c; }
31
+ .badge { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
32
+ .badge-teacher { background: #f1edff; color: #7156c8; }
33
+ .teacher-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
34
+ .teacher-card { background: #f8faff; border: 1px solid #e7eefc; border-radius: 18px; padding: 16px; }
35
+ .teacher-card h3 { margin: 0 0 8px; color: #334d98; font-size: 16px; }
36
+ .teacher-card p, .teacher-card li { margin: 0; color: #60708b; line-height: 1.85; font-size: 13px; }
37
+ .teacher-card ul { padding-left: 18px; margin: 0; }
38
+ .teacher-note { margin-top: 14px; background: #f6f8ff; border: 1px dashed #cfdcff; border-radius: 18px; padding: 14px 16px; }
39
+ .teacher-note h3 { margin: 0 0 7px; color: #334d98; font-size: 16px; }
40
+ .teacher-note p { margin: 0; color: #60708b; line-height: 1.85; font-size: 13px; }
41
+ .footer-note { margin-top: 12px; text-align: center; font-size: 13px; color: #7a879f; }
42
+ @media (max-width: 960px) {
43
+ .page { padding: 14px 12px 32px; }
44
+ .header-bar { padding: 16px 18px; }
45
+ .header-left h1 { font-size: 22px; }
46
+ .header-left .subtitle { font-size: 12px; white-space: normal; }
47
+ .content-layout, .teacher-grid { grid-template-columns: 1fr; }
48
+ .task-panel, .goal-panel, .sample-frame-wrap, .teacher-section { padding: 14px; }
49
+ iframe { height: 360px; }
50
+ }
51
+ </style>
52
+ </head>
53
+ <body>
54
+ <div class="page">
55
+ <header class="header-bar">
56
+ <div class="header-left">
57
+ <h1>【任务标题】</h1>
58
+ <p class="subtitle">【一句话任务说明:先做什么,再放到网页里,重点练什么】</p>
59
+ </div>
60
+ </header>
61
+
62
+ <div class="main-section">
63
+ <section class="block">
64
+ <div class="content-layout">
65
+ <div class="task-panel">
66
+ <div class="panel-group">
67
+ <h3>步骤</h3>
68
+ <div class="task-item"><div class="item-top"><span class="num">1</span><span>【步骤短标题】</span></div><div class="item-body">【学生真正要读的简短说明】</div></div>
69
+ <div class="task-item"><div class="item-top"><span class="num">2</span><span>【步骤短标题】</span></div><div class="item-body">【学生真正要读的简短说明】</div></div>
70
+ <div class="task-item"><div class="item-top"><span class="num">3</span><span>【步骤短标题】</span></div><div class="item-body">【学生真正要读的简短说明】</div></div>
71
+ <div class="task-item"><div class="item-top"><span class="num">4</span><span>【步骤短标题】</span></div><div class="item-body">【学生真正要读的简短说明】</div></div>
72
+ </div>
73
+ </div>
74
+
75
+ <div class="sample-frame-wrap">
76
+ <div class="sample-frame-head"><h3>示范样例</h3></div>
77
+ <iframe src="./example.html" title="示范样例"></iframe>
78
+ </div>
79
+
80
+ <div class="goal-panel">
81
+ <div class="panel-group">
82
+ <h3>评价目标</h3>
83
+ <div class="task-item star-item"><div class="item-top"><span class="num">★</span><span>一星</span></div><div class="item-body">【完成最基础的一步】</div></div>
84
+ <div class="task-item star-item"><div class="item-top"><span class="num">★★</span><span>二星</span></div><div class="item-body">【比基础要求再多完成一点】</div></div>
85
+ <div class="task-item star-item"><div class="item-top"><span class="num">★★★</span><span>三星</span></div><div class="item-body">【完成进阶挑战,展示更多变化】</div></div>
86
+ </div>
87
+ </div>
88
+ </div>
89
+ </section>
90
+ </div>
91
+
92
+ <section class="teacher-section">
93
+ <div class="block-title"><h2>下半区:给老师看</h2><span class="badge badge-teacher">教师区</span></div>
94
+ <div class="teacher-grid">
95
+ <div class="teacher-card"><h3>为什么这样设计</h3><p>上半区直接给学生使用,文字短,结构清楚,中间样例突出。</p></div>
96
+ <div class="teacher-card"><h3>模板使用原则</h3><p>只把学生真正需要阅读的内容放到白卡片里,编号和星级放在卡片外面,做出主次关系。</p></div>
97
+ <div class="teacher-card"><h3>上半区写法</h3><p>步骤和评价目标都要短句化,面向小学生,避免长句和抽象词。</p></div>
98
+ <div class="teacher-card"><h3>示例区原则</h3><p>中间 iframe 永远是视觉中心,具体项目案例放在 example.html 或外部链接里。</p></div>
99
+ </div>
100
+ <div class="teacher-note"><h3>模板提示</h3><p>后续换专题时,优先替换任务标题、一句话说明、步骤、评价目标和 iframe 地址,不要先改结构。</p></div>
101
+ <div class="footer-note">这个文件已经同步了新的上半区结构,可作为后续模板继续复用。</div>
102
+ </section>
103
+ </div>
104
+ </body>
105
+ </html>