@ia-ccun/code-agent-cli 0.0.50-beta.1 → 0.0.50-beta.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.
package/README.md CHANGED
@@ -217,22 +217,48 @@ aicode-cli --list-models # 列出可用模型
217
217
 
218
218
  ### 创建自定义 Skill
219
219
 
220
- 在 `~/.aicode-cli/skills/` 目录下创建 `.md` 文件:
220
+ 在 `~/.aicode-cli/agent/skills/<skill-name>/` 目录下创建 `SKILL.md` 文件:
221
+
222
+ ```bash
223
+ # 创建技能目录
224
+ mkdir -p ~/.aicode-cli/agent/skills/my-skill
225
+
226
+ # 创建 SKILL.md
227
+ cat > ~/.aicode-cli/agent/skills/my-skill/SKILL.md << 'EOF'
228
+ ---
229
+ name: my-skill
230
+ description: "技能的简短描述。Use when 触发条件描述。"
231
+ metadata:
232
+ version: "1.0.0"
233
+ author: "your-name"
234
+ ---
221
235
 
222
- ```markdown
223
236
  # My Skill
224
237
 
225
238
  ## 描述
226
- 技能说明
239
+ 技能的详细说明
227
240
 
228
241
  ## 触发方式
229
- /skill:my-skill
242
+ `/skill:my-skill`
230
243
 
231
244
  ## 执行步骤
232
245
  1. 步骤一
233
246
  2. 步骤二
247
+ EOF
234
248
  ```
235
249
 
250
+ **字段说明:**
251
+
252
+ | 字段 | 必填 | 说明 |
253
+ |------|------|------|
254
+ | `name` | 是 | 技能标识符(小写+连字符),与目录名一致 |
255
+ | `description` | 是 | 触发条件描述,Agent 据此判断何时使用该技能 |
256
+ | `disable-model-invocation` | 否 | 设为 `true` 时禁止调用 LLM,纯本地执行 |
257
+ | `metadata.version` | 否 | 版本号 |
258
+ | `metadata.author` | 否 | 作者 |
259
+
260
+ > ⚠️ 文件名必须为 `SKILL.md`,且放在独立目录中(目录名与 `name` 一致)。
261
+
236
262
  ## 预置 Prompts
237
263
 
238
264
  内置 Prompt 模板位于 `config/agent/prompts/`(打包在 npm 包中)
@@ -31,6 +31,8 @@ npm install -g @ia-ccun/code-agent-cli
31
31
 
32
32
  ```bash
33
33
  aicode-cli
34
+ # 或
35
+ aicode
34
36
  ```
35
37
 
36
38
  ### 基本对话
@@ -66,6 +68,15 @@ Ctrl+Q
66
68
  Enter
67
69
  ```
68
70
 
71
+ ### Git Worktree 支持
72
+
73
+ 使用 `/skill:using-git-worktrees` 在多工作区间高效切换:
74
+
75
+ ```
76
+ /skill:using-git-worktrees
77
+ 帮我创建一个新的 worktree 来开发登录功能
78
+ ```
79
+
69
80
  ---
70
81
 
71
82
  ## 3. 核心命令
@@ -90,6 +101,13 @@ Enter
90
101
 
91
102
  思考级别:`off` → `minimal` → `low` → `medium` → `high` → `xhigh`
92
103
 
104
+ ### 技能相关
105
+
106
+ | 命令 | 说明 |
107
+ |------|------|
108
+ | `/skill:<name>` | 激活指定技能 |
109
+ | `/skills` | 列出所有可用技能 |
110
+
93
111
  ---
94
112
 
95
113
  ## 4. 快捷键
@@ -224,16 +242,71 @@ Skill 是预置的 AI 技能模块,针对特定场景优化。
224
242
 
225
243
  ### 可用 Skills
226
244
 
245
+ #### 代码开发
246
+
227
247
  | Skill | 说明 | 激活方式 |
228
248
  |-------|------|----------|
229
- | code-review | 代码审查 | `/skill:code-review` |
230
- | commit | Git 提交 | `/skill:commit` |
231
- | pr | PR 描述 | `/skill:pr` |
232
- | refactor | 代码重构 | `/skill:refactor` |
233
- | unit-test | 单元测试 | `/skill:unit-test` |
234
- | csv-data-summarizer | CSV 数据分析 | `/skill:csv-data-summarizer` |
235
- | frontend-design | 前端设计 | `/skill:frontend-design` |
236
- | ui-ux-pro-max | UI/UX 设计 | `/skill:ui-ux-pro-max` |
249
+ | `code-review` | 代码审查 | `/skill:code-review` |
250
+ | `refactor` | 代码重构 | `/skill:refactor` |
251
+ | `unit-test` | 单元测试 | `/skill:unit-test` |
252
+ | `test-driven-development` | 测试驱动开发 | `/skill:test-driven-development` |
253
+ | `frontend-design` | 前端设计 | `/skill:frontend-design` |
254
+ | `owasp-security` | OWASP 安全编码 | `/skill:owasp-security` |
255
+
256
+ #### Git 相关
257
+
258
+ | Skill | 说明 | 激活方式 |
259
+ |-------|------|----------|
260
+ | `commit` | Git 提交消息生成 | `/skill:commit` |
261
+ | `using-git-worktrees` | Git Worktree 管理 | `/skill:using-git-worktrees` |
262
+
263
+ #### 数据分析
264
+
265
+ | Skill | 说明 | 激活方式 |
266
+ |-------|------|----------|
267
+ | `csv-data-summarizer` | CSV 数据分析 | `/skill:csv-data-summarizer` |
268
+ | `design-md` | Markdown 设计文档 | `/skill:design-md` |
269
+
270
+ #### UI/UX 设计
271
+
272
+ | Skill | 说明 | 激活方式 |
273
+ |-------|------|----------|
274
+ | `ui-ux-pro-max` | UI/UX 专业设计 | `/skill:ui-ux-pro-max` |
275
+ | `impeccable/*` | 完美界面系列技能 | `/skill:impeccable:polish` 等 |
276
+
277
+ #### 多媒体
278
+
279
+ | Skill | 说明 | 激活方式 |
280
+ |-------|------|----------|
281
+ | `video-generation` | 视频生成 | `/skill:video-generation` |
282
+ | `aliyun-tts` | 阿里云 TTS | `/skill:aliyun-tts` |
283
+ | `xiaomi-tts` | 小米 TTS | `/skill:xiaomi-tts` |
284
+
285
+ #### 写作与内容
286
+
287
+ | Skill | 说明 | 激活方式 |
288
+ |-------|------|----------|
289
+ | `khazix-writer` | 公众号长文写作 | `/skill:khazix-writer` |
290
+ | `hv-analysis` | 横纵分析法深度研究 | `/skill:hv-analysis` |
291
+
292
+ #### 开发流程
293
+
294
+ | Skill | 说明 | 激活方式 |
295
+ |-------|------|----------|
296
+ | `brainstorming` | 头脑风暴 | `/skill:brainstorming` |
297
+ | `writing-plans` | 编写实施计划 | `/skill:writing-plans` |
298
+ | `executing-plans` | 执行计划 | `/skill:executing-plans` |
299
+ | `dispatching-parallel-agents` | 并行任务分发 | `/skill:dispatching-parallel-agents` |
300
+ | `systematic-debugning` | 系统性调试 | `/skill:systematic-debugging` |
301
+ | `verification-before-completion` | 完成前验证 | `/skill:verification-before-completion` |
302
+
303
+ #### 技能管理
304
+
305
+ | Skill | 说明 | 激活方式 |
306
+ |-------|------|----------|
307
+ | `skill-creator` | 创建/编辑技能 | `/skill:skill-creator` |
308
+ | `session-learning` | 会话学习总结 | `/skill:session-learning` |
309
+ | `find-skills` | 查找技能 | `/skill:find-skills` |
237
310
 
238
311
  ### 使用方法
239
312
 
@@ -254,13 +327,11 @@ Prompt 是预置的工作流模板,用于特定任务。
254
327
 
255
328
  | Prompt | 说明 |
256
329
  |--------|------|
257
- | `/bmad-init` | 初始化 BMAD 项目 |
258
330
  | `/init-project` | 初始化新项目 |
259
331
  | `/feat` | 新增功能开发流程 |
260
332
  | `/git-commit` | Git 提交 |
261
- | `/git-rollback` | Git 回滚 |
262
- | `/git-worktree` | Git Worktree 管理 |
263
333
  | `/workflow` | 复杂工作流 |
334
+ | `/code-simplifier` | 代码简化 |
264
335
 
265
336
  ### 使用示例
266
337
 
@@ -273,6 +344,9 @@ Prompt 是预置的工作流模板,用于特定任务。
273
344
 
274
345
  # Git 提交
275
346
  /git-commit
347
+
348
+ # 复杂工作流
349
+ /workflow
276
350
  ```
277
351
 
278
352
  ---
@@ -293,9 +367,11 @@ Prompt 是预置的工作流模板,用于特定任务。
293
367
 
294
368
  | 主题 | 说明 |
295
369
  |------|------|
296
- | dark | 暗色主题 |
297
- | light | 亮色主题 |
298
- | catppuccin-mocha | 猫puccin mocha(推荐) |
370
+ | `catppuccin-mocha` | Catppuccin Mocha 暗色主题(推荐) |
371
+
372
+ ### 自定义主题
373
+
374
+ 主题文件位于 `~/.aicode-cli/agent/themes/`,可自定义颜色和样式。
299
375
 
300
376
  ---
301
377
 
@@ -320,6 +396,12 @@ Prompt 是预置的工作流模板,用于特定任务。
320
396
  2. **先审后改**:重要修改前先让 AI 解释代码
321
397
  3. **备份优先**:关键文件操作前手动备份
322
398
 
399
+ ### Git 工作流
400
+
401
+ 1. **使用 Worktree**:多分支并行开发时使用 Git Worktree
402
+ 2. **规范提交**:使用 `/skill:commit` 生成规范提交消息
403
+ 3. **代码审查**:重要变更使用 `/skill:code-review` 审查
404
+
323
405
  ---
324
406
 
325
407
  ## 10. 故障排除
@@ -328,10 +410,11 @@ Prompt 是预置的工作流模板,用于特定任务。
328
410
 
329
411
  | 问题 | 解决方案 |
330
412
  |------|----------|
331
- | 启动慢 | 检查网络连接 |
332
- | 模型连接失败 | 核对 models.json 配置 |
333
- | 扩展不生效 | 运行 `/reload` 重载 |
413
+ | 启动慢 | 检查网络连接,确认模型 API 可达 |
414
+ | 模型连接失败 | 核对 `models.json` 配置和 API Key |
415
+ | 扩展不生效 | 运行 `/reload` 重载配置 |
334
416
  | Token 溢出 | 使用 `/clear` 清理上下文 |
417
+ | Skills 找不到 | 确认技能已安装到 `~/.aicode-cli/agent/skills/` |
335
418
 
336
419
  ### 详细模式
337
420
 
@@ -339,6 +422,12 @@ Prompt 是预置的工作流模板,用于特定任务。
339
422
  aicode-cli --verbose
340
423
  ```
341
424
 
425
+ ### 查看上下文
426
+
427
+ ```bash
428
+ /context
429
+ ```
430
+
342
431
  ---
343
432
 
344
433
  ## 附录
@@ -347,8 +436,8 @@ aicode-cli --verbose
347
436
 
348
437
  | 变量 | 说明 |
349
438
  |------|------|
350
- | `AICODE_CLI_CONFIG_DIR` | 配置目录 |
351
- | `AICODE_CLI_CODING_AGENT_DIR` | Agent 配置目录 |
439
+ | `AICODE_CLI_CONFIG_DIR` | 配置目录路径 |
440
+ | `AICODE_CLI_CODING_AGENT_DIR` | Agent 配置目录路径 |
352
441
 
353
442
  ### 命令行参数
354
443
 
@@ -359,6 +448,12 @@ aicode-cli --verbose
359
448
  | `--model <name>` | 指定模型 |
360
449
  | `--clear` | 启动时清理会话 |
361
450
 
451
+ ### 相关资源
452
+
453
+ - **项目仓库**: https://github.com/ia-ccun/code-agent-cli
454
+ - **npm 包**: https://www.npmjs.com/package/@ia-ccun/code-agent-cli
455
+ - **pi-coding-agent**: 底层 Agent 框架
456
+
362
457
  ---
363
458
 
364
459
  *世界那么哒 · AI 实践落地 @2026*
@@ -14,6 +14,9 @@
14
14
  "npm:pi-subagents",
15
15
  "npm:pi-rewind",
16
16
  "npm:pi-btw",
17
- "npm:pi-mcp-adapter"
17
+ "npm:pi-mcp-adapter",
18
+ "npm:juicesharp/rpiv-todo",
19
+ "npm:juicesharp/rpiv-ask-user-question",
20
+ "npm:@juicesharp/rpiv-advisor"
18
21
  ]
19
22
  }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Zara Zhang
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,136 @@
1
+ # Frontend Slides
2
+
3
+ A Claude Code skill for creating stunning, animation-rich HTML presentations — from scratch or by converting PowerPoint files.
4
+
5
+ ## What This Does
6
+
7
+ **Frontend Slides** helps non-designers create beautiful web presentations without knowing CSS or JavaScript. It uses a "show, don't tell" approach: instead of asking you to describe your aesthetic preferences in words, it generates visual previews and lets you pick what you like.
8
+
9
+ Here is a deck about the skill, made through the skill:
10
+
11
+ https://github.com/user-attachments/assets/ef57333e-f879-432a-afb9-180388982478
12
+
13
+
14
+ ### Key Features
15
+
16
+ - **Zero Dependencies** — Single HTML files with inline CSS/JS. No npm, no build tools, no frameworks.
17
+ - **Visual Style Discovery** — Can't articulate design preferences? No problem. Pick from generated visual previews.
18
+ - **PPT Conversion** — Convert existing PowerPoint files to web, preserving all images and content.
19
+ - **Anti-AI-Slop** — Curated distinctive styles that avoid generic AI aesthetics (bye-bye, purple gradients on white).
20
+ - **Production Quality** — Accessible, responsive, well-commented code you can customize.
21
+
22
+ ## Installation
23
+
24
+ ### For Claude Code Users
25
+
26
+ Copy the skill files to your Claude Code skills directory:
27
+
28
+ ```bash
29
+ # Create the skill directory
30
+ mkdir -p ~/.claude/skills/frontend-slides/scripts
31
+
32
+ # Copy all files (or clone this repo directly)
33
+ cp SKILL.md STYLE_PRESETS.md viewport-base.css html-template.md animation-patterns.md ~/.claude/skills/frontend-slides/
34
+ cp scripts/extract-pptx.py ~/.claude/skills/frontend-slides/scripts/
35
+ ```
36
+
37
+ Or clone directly:
38
+
39
+ ```bash
40
+ git clone https://github.com/zarazhangrui/frontend-slides.git ~/.claude/skills/frontend-slides
41
+ ```
42
+
43
+ Then use it by typing `/frontend-slides` in Claude Code.
44
+
45
+ ## Usage
46
+
47
+ ### Create a New Presentation
48
+
49
+ ```
50
+ /frontend-slides
51
+
52
+ > "I want to create a pitch deck for my AI startup"
53
+ ```
54
+
55
+ The skill will:
56
+ 1. Ask about your content (slides, messages, images)
57
+ 2. Ask about the feeling you want (impressed? excited? calm?)
58
+ 3. Generate 3 visual style previews for you to compare
59
+ 4. Create the full presentation in your chosen style
60
+ 5. Open it in your browser
61
+
62
+ ### Convert a PowerPoint
63
+
64
+ ```
65
+ /frontend-slides
66
+
67
+ > "Convert my presentation.pptx to a web slideshow"
68
+ ```
69
+
70
+ The skill will:
71
+ 1. Extract all text, images, and notes from your PPT
72
+ 2. Show you the extracted content for confirmation
73
+ 3. Let you pick a visual style
74
+ 4. Generate an HTML presentation with all your original assets
75
+
76
+ ## Included Styles
77
+
78
+ ### Dark Themes
79
+ - **Bold Signal** — Confident, high-impact, vibrant card on dark
80
+ - **Electric Studio** — Clean, professional, split-panel
81
+ - **Creative Voltage** — Energetic, retro-modern, electric blue + neon
82
+ - **Dark Botanical** — Elegant, sophisticated, warm accents
83
+
84
+ ### Light Themes
85
+ - **Notebook Tabs** — Editorial, organized, paper with colorful tabs
86
+ - **Pastel Geometry** — Friendly, approachable, vertical pills
87
+ - **Split Pastel** — Playful, modern, two-color vertical split
88
+ - **Vintage Editorial** — Witty, personality-driven, geometric shapes
89
+
90
+ ### Specialty
91
+ - **Neon Cyber** — Futuristic, particle backgrounds, neon glow
92
+ - **Terminal Green** — Developer-focused, hacker aesthetic
93
+ - **Swiss Modern** — Minimal, Bauhaus-inspired, geometric
94
+ - **Paper & Ink** — Literary, drop caps, pull quotes
95
+
96
+ ## Architecture
97
+
98
+ This skill uses **progressive disclosure** — the main `SKILL.md` is a concise map (~180 lines), with supporting files loaded on-demand only when needed:
99
+
100
+ | File | Purpose | Loaded When |
101
+ |------|---------|-------------|
102
+ | `SKILL.md` | Core workflow and rules | Always (skill invocation) |
103
+ | `STYLE_PRESETS.md` | 12 curated visual presets | Phase 2 (style selection) |
104
+ | `viewport-base.css` | Mandatory responsive CSS | Phase 3 (generation) |
105
+ | `html-template.md` | HTML structure and JS features | Phase 3 (generation) |
106
+ | `animation-patterns.md` | CSS/JS animation reference | Phase 3 (generation) |
107
+ | `scripts/extract-pptx.py` | PPT content extraction | Phase 4 (conversion) |
108
+
109
+ This design follows [OpenAI's harness engineering](https://openai.com/index/harness-engineering/) principle: "give the agent a map, not a 1,000-page instruction manual."
110
+
111
+ ## Philosophy
112
+
113
+ This skill was born from the belief that:
114
+
115
+ 1. **You don't need to be a designer to make beautiful things.** You just need to react to what you see.
116
+
117
+ 2. **Dependencies are debt.** A single HTML file will work in 10 years. A React project from 2019? Good luck.
118
+
119
+ 3. **Generic is forgettable.** Every presentation should feel custom-crafted, not template-generated.
120
+
121
+ 4. **Comments are kindness.** Code should explain itself to future-you (or anyone else who opens it).
122
+
123
+ ## Requirements
124
+
125
+ - [Claude Code](https://claude.ai/claude-code) CLI
126
+ - For PPT conversion: Python with `python-pptx` library
127
+
128
+ ## Credits
129
+
130
+ Created by [@zarazhangrui](https://github.com/zarazhangrui) with Claude Code.
131
+
132
+ Inspired by the "Vibe Coding" philosophy — building beautiful things without being a traditional software engineer.
133
+
134
+ ## License
135
+
136
+ MIT — Use it, modify it, share it.
@@ -0,0 +1,219 @@
1
+ ---
2
+ name: frontend-slides
3
+ description: Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.
4
+ ---
5
+
6
+ # Frontend Slides
7
+
8
+ Create zero-dependency, animation-rich HTML presentations that run entirely in the browser.
9
+
10
+ ## Core Principles
11
+
12
+ 1. **Zero Dependencies** — Single HTML files with inline CSS/JS. No npm, no build tools.
13
+ 2. **Show, Don't Tell** — Generate visual previews, not abstract choices. People discover what they want by seeing it.
14
+ 3. **Distinctive Design** — No generic "AI slop." Every presentation must feel custom-crafted.
15
+ 4. **Viewport Fitting (NON-NEGOTIABLE)** — Every slide MUST fit exactly within 100vh. No scrolling within slides, ever. Content overflows? Split into multiple slides.
16
+
17
+ ## Design Aesthetics
18
+
19
+ You tend to converge toward generic, "on distribution" outputs. In frontend design, this creates what users call the "AI slop" aesthetic. Avoid this: make creative, distinctive frontends that surprise and delight.
20
+
21
+ Focus on:
22
+ - Typography: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics.
23
+ - Color & Theme: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes. Draw from IDE themes and cultural aesthetics for inspiration.
24
+ - Motion: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions.
25
+ - Backgrounds: Create atmosphere and depth rather than defaulting to solid colors. Layer CSS gradients, use geometric patterns, or add contextual effects that match the overall aesthetic.
26
+
27
+ Avoid generic AI-generated aesthetics:
28
+ - Overused font families (Inter, Roboto, Arial, system fonts)
29
+ - Cliched color schemes (particularly purple gradients on white backgrounds)
30
+ - Predictable layouts and component patterns
31
+ - Cookie-cutter design that lacks context-specific character
32
+
33
+ Interpret creatively and make unexpected choices that feel genuinely designed for the context. Vary between light and dark themes, different fonts, different aesthetics. You still tend to converge on common choices (Space Grotesk, for example) across generations. Avoid this: it is critical that you think outside the box!
34
+
35
+ ## Viewport Fitting Rules
36
+
37
+ These invariants apply to EVERY slide in EVERY presentation:
38
+
39
+ - Every `.slide` must have `height: 100vh; height: 100dvh; overflow: hidden;`
40
+ - ALL font sizes and spacing must use `clamp(min, preferred, max)` — never fixed px/rem
41
+ - Content containers need `max-height` constraints
42
+ - Images: `max-height: min(50vh, 400px)`
43
+ - Breakpoints required for heights: 700px, 600px, 500px
44
+ - Include `prefers-reduced-motion` support
45
+ - Never negate CSS functions directly (`-clamp()`, `-min()`, `-max()` are silently ignored) — use `calc(-1 * clamp(...))` instead
46
+
47
+ **When generating, read `viewport-base.css` and include its full contents in every presentation.**
48
+
49
+ ### Content Density Limits Per Slide
50
+
51
+ | Slide Type | Maximum Content |
52
+ |------------|-----------------|
53
+ | Title slide | 1 heading + 1 subtitle + optional tagline |
54
+ | Content slide | 1 heading + 4-6 bullet points OR 1 heading + 2 paragraphs |
55
+ | Feature grid | 1 heading + 6 cards maximum (2x3 or 3x2) |
56
+ | Code slide | 1 heading + 8-10 lines of code |
57
+ | Quote slide | 1 quote (max 3 lines) + attribution |
58
+ | Image slide | 1 heading + 1 image (max 60vh height) |
59
+
60
+ **Content exceeds limits? Split into multiple slides. Never cram, never scroll.**
61
+
62
+ ---
63
+
64
+ ## Phase 0: Detect Mode
65
+
66
+ Determine what the user wants:
67
+
68
+ - **Mode A: New Presentation** — Create from scratch. Go to Phase 1.
69
+ - **Mode B: PPT Conversion** — Convert a .pptx file. Go to Phase 4.
70
+ - **Mode C: Enhancement** — Improve an existing HTML presentation. Read it, understand it, enhance. **Follow Mode C modification rules below.**
71
+
72
+ ### Mode C: Modification Rules
73
+
74
+ When enhancing existing presentations, viewport fitting is the biggest risk:
75
+
76
+ 1. **Before adding content:** Count existing elements, check against density limits
77
+ 2. **Adding images:** Must have `max-height: min(50vh, 400px)`. If slide already has max content, split into two slides
78
+ 3. **Adding text:** Max 4-6 bullets per slide. Exceeds limits? Split into continuation slides
79
+ 4. **After ANY modification, verify:** `.slide` has `overflow: hidden`, new elements use `clamp()`, images have viewport-relative max-height, content fits at 1280x720
80
+ 5. **Proactively reorganize:** If modifications will cause overflow, automatically split content and inform the user. Don't wait to be asked
81
+
82
+ **When adding images to existing slides:** Move image to new slide or reduce other content first. Never add images without checking if existing content already fills the viewport.
83
+
84
+ ---
85
+
86
+ ## Phase 1: Content Discovery (New Presentations)
87
+
88
+ **Ask ALL questions in a single AskUserQuestion call** so the user fills everything out at once:
89
+
90
+ **Question 1 — Purpose** (header: "Purpose"):
91
+ What is this presentation for? Options: Pitch deck / Teaching-Tutorial / Conference talk / Internal presentation
92
+
93
+ **Question 2 — Length** (header: "Length"):
94
+ Approximately how many slides? Options: Short 5-10 / Medium 10-20 / Long 20+
95
+
96
+ **Question 3 — Content** (header: "Content"):
97
+ Do you have content ready? Options: All content ready / Rough notes / Topic only
98
+
99
+ **Question 4 — Inline Editing** (header: "Editing"):
100
+ Do you need to edit text directly in the browser after generation? Options:
101
+ - "Yes (Recommended)" — Can edit text in-browser, auto-save to localStorage, export file
102
+ - "No" — Presentation only, keeps file smaller
103
+
104
+ **Remember the user's editing choice — it determines whether edit-related code is included in Phase 3.**
105
+
106
+ If user has content, ask them to share it.
107
+
108
+ ### Step 1.2: Image Evaluation (if images provided)
109
+
110
+ If user selected "No images" → skip to Phase 2.
111
+
112
+ If user provides an image folder:
113
+ 1. **Scan** — List all image files (.png, .jpg, .svg, .webp, etc.)
114
+ 2. **View each image** — Use the Read tool (Claude is multimodal)
115
+ 3. **Evaluate** — For each: what it shows, USABLE or NOT USABLE (with reason), what concept it represents, dominant colors
116
+ 4. **Co-design the outline** — Curated images inform slide structure alongside text. This is NOT "plan slides then add images" — design around both from the start (e.g., 3 screenshots → 3 feature slides, 1 logo → title/closing slide)
117
+ 5. **Confirm via AskUserQuestion** (header: "Outline"): "Does this slide outline and image selection look right?" Options: Looks good / Adjust images / Adjust outline
118
+
119
+ **Logo in previews:** If a usable logo was identified, embed it (base64) into each style preview in Phase 2 — the user sees their brand styled three different ways.
120
+
121
+ ---
122
+
123
+ ## Phase 2: Style Discovery
124
+
125
+ **This is the "show, don't tell" phase.** Most people can't articulate design preferences in words.
126
+
127
+ ### Step 2.0: Style Path
128
+
129
+ Ask how they want to choose (header: "Style"):
130
+ - "Show me options" (recommended) — Generate 3 previews based on mood
131
+ - "I know what I want" — Pick from preset list directly
132
+
133
+ **If direct selection:** Show preset picker and skip to Phase 3. Available presets are defined in [STYLE_PRESETS.md](STYLE_PRESETS.md).
134
+
135
+ ### Step 2.1: Mood Selection (Guided Discovery)
136
+
137
+ Ask (header: "Vibe", multiSelect: true, max 2):
138
+ What feeling should the audience have? Options:
139
+ - Impressed/Confident — Professional, trustworthy
140
+ - Excited/Energized — Innovative, bold
141
+ - Calm/Focused — Clear, thoughtful
142
+ - Inspired/Moved — Emotional, memorable
143
+
144
+ ### Step 2.2: Generate 3 Style Previews
145
+
146
+ Based on mood, generate 3 distinct single-slide HTML previews showing typography, colors, animation, and overall aesthetic. Read [STYLE_PRESETS.md](STYLE_PRESETS.md) for available presets and their specifications.
147
+
148
+ | Mood | Suggested Presets |
149
+ |------|-------------------|
150
+ | Impressed/Confident | Bold Signal, Electric Studio, Dark Botanical |
151
+ | Excited/Energized | Creative Voltage, Neon Cyber, Split Pastel |
152
+ | Calm/Focused | Notebook Tabs, Paper & Ink, Swiss Modern |
153
+ | Inspired/Moved | Dark Botanical, Vintage Editorial, Pastel Geometry |
154
+
155
+ Save previews to `.claude-design/slide-previews/` (style-a.html, style-b.html, style-c.html). Each should be self-contained, ~50-100 lines, showing one animated title slide.
156
+
157
+ Open each preview automatically for the user.
158
+
159
+ ### Step 2.3: User Picks
160
+
161
+ Ask (header: "Style"):
162
+ Which style preview do you prefer? Options: Style A: [Name] / Style B: [Name] / Style C: [Name] / Mix elements
163
+
164
+ If "Mix elements", ask for specifics.
165
+
166
+ ---
167
+
168
+ ## Phase 3: Generate Presentation
169
+
170
+ Generate the full presentation using content from Phase 1 (text, or text + curated images) and style from Phase 2.
171
+
172
+ If images were provided, the slide outline already incorporates them from Step 1.2. If not, CSS-generated visuals (gradients, shapes, patterns) provide visual interest — this is a fully supported first-class path.
173
+
174
+ **Before generating, read these supporting files:**
175
+ - [html-template.md](html-template.md) — HTML architecture and JS features
176
+ - [viewport-base.css](viewport-base.css) — Mandatory CSS (include in full)
177
+ - [animation-patterns.md](animation-patterns.md) — Animation reference for the chosen feeling
178
+
179
+ **Key requirements:**
180
+ - Single self-contained HTML file, all CSS/JS inline
181
+ - Include the FULL contents of viewport-base.css in the `<style>` block
182
+ - Use fonts from Fontshare or Google Fonts — never system fonts
183
+ - Add detailed comments explaining each section
184
+ - Every section needs a clear `/* === SECTION NAME === */` comment block
185
+
186
+ ---
187
+
188
+ ## Phase 4: PPT Conversion
189
+
190
+ When converting PowerPoint files:
191
+
192
+ 1. **Extract content** — Run `python scripts/extract-pptx.py <input.pptx> <output_dir>` (install python-pptx if needed: `pip install python-pptx`)
193
+ 2. **Confirm with user** — Present extracted slide titles, content summaries, and image counts
194
+ 3. **Style selection** — Proceed to Phase 2 for style discovery
195
+ 4. **Generate HTML** — Convert to chosen style, preserving all text, images (from assets/), slide order, and speaker notes (as HTML comments)
196
+
197
+ ---
198
+
199
+ ## Phase 5: Delivery
200
+
201
+ 1. **Clean up** — Delete `.claude-design/slide-previews/` if it exists
202
+ 2. **Open** — Use `open [filename].html` to launch in browser
203
+ 3. **Summarize** — Tell the user:
204
+ - File location, style name, slide count
205
+ - Navigation: Arrow keys, Space, scroll/swipe, click nav dots
206
+ - How to customize: `:root` CSS variables for colors, font link for typography, `.reveal` class for animations
207
+ - If inline editing was enabled: Hover top-left corner or press E to enter edit mode, click any text to edit, Ctrl+S to save
208
+
209
+ ---
210
+
211
+ ## Supporting Files
212
+
213
+ | File | Purpose | When to Read |
214
+ |------|---------|-------------|
215
+ | [STYLE_PRESETS.md](STYLE_PRESETS.md) | 12 curated visual presets with colors, fonts, and signature elements | Phase 2 (style selection) |
216
+ | [viewport-base.css](viewport-base.css) | Mandatory responsive CSS — copy into every presentation | Phase 3 (generation) |
217
+ | [html-template.md](html-template.md) | HTML structure, JS features, code quality standards | Phase 3 (generation) |
218
+ | [animation-patterns.md](animation-patterns.md) | CSS/JS animation snippets and effect-to-feeling guide | Phase 3 (generation) |
219
+ | [scripts/extract-pptx.py](scripts/extract-pptx.py) | Python script for PPT content extraction | Phase 4 (conversion) |