Skip to content

MiniMax-AI/mcode-stack / stacks/youfang/skills/magic-move-deck

magic-move-deck

Unverified

Build Keynote-style Magic Move slide decks as one offline 1920×1080 HTML file: every slide is an architecture / flow diagram seen through a camera, and the elements two slides share morph and fly instead of cross-fading. Four visual styles (hand-drawn, minimal, dark neon, neo-brutalist): the agent first renders one sample slide in each style, the user picks one, then the whole deck is built in that style. Also exports 4K / 1080p video. Use for 做演示 / 做 slides / 做 PPT / Magic Move / 神奇移动 / 架构图演示 / 技术分享 deck / 动画 slides / animated architecture walkthrough. Not for bullet-point decks or a single static diagram.

FileKindSize
SKILL.mdskill md10.5 KB
examples/rag-assistant/README.mdmarkdown6.1 KB
examples/rag-assistant/details/00_cover.htmlother15.5 KB
examples/rag-assistant/details/01_ingestion.htmlother21.2 KB
examples/rag-assistant/details/02_retrieval.htmlother21.2 KB
examples/rag-assistant/details/03_generation.htmlother22.1 KB
examples/rag-assistant/details/99_end.htmlother15.6 KB
examples/rag-assistant/diagram-binding.mdmarkdown2.8 KB
examples/rag-assistant/overview.htmlother23.5 KB
examples/rag-assistant/previews/00_cover.jpgbinary80.6 KB
examples/rag-assistant/previews/01_ingestion.jpgbinary175.3 KB
examples/rag-assistant/previews/02_retrieval.jpgbinary184.5 KB
examples/rag-assistant/previews/03_generation.jpgbinary187.1 KB
examples/rag-assistant/previews/99_end.jpgbinary86.6 KB
examples/rag-assistant/previews/overview.jpgbinary163.2 KB
examples/rag-assistant/previews/trans_d1_to_spot.jpgbinary133.6 KB
examples/rag-assistant/previews/trans_overview_to_d1.jpgbinary78.5 KB
references/bilingual-layout.mdmarkdown2.6 KB
references/cards.mdmarkdown5.0 KB
references/diagram-rules.mdmarkdown4.9 KB
references/magic-move-contract.mdmarkdown7.4 KB
references/styles.mdmarkdown4.3 KB
references/verification.mdmarkdown4.8 KB
scripts/build_deck.pyscript15.8 KB
scripts/render_video.pyscript6.7 KB
scripts/snapshot_deck.pyscript5.0 KB
scripts/styles.pyscript7.3 KB
styles/brutalist/STYLE.mdmarkdown2.1 KB
styles/brutalist/diagram.htmlother12.5 KB
styles/brutalist/preview.pngbinary221.2 KB
styles/handdrawn/STYLE.mdmarkdown2.1 KB
styles/handdrawn/diagram.htmlother14.6 KB
styles/handdrawn/preview.pngbinary302.9 KB
styles/minimal/STYLE.mdmarkdown2.0 KB
styles/minimal/diagram.htmlother12.6 KB
styles/minimal/preview.pngbinary226.2 KB
styles/neon/STYLE.mdmarkdown1.9 KB
styles/neon/diagram.htmlother13.4 KB
styles/neon/preview.pngbinary280.1 KB
templates/card-main.jsscript2.9 KB
templates/detail-main.jsscript4.3 KB
templates/diagram-binding.mdmarkdown1.2 KB
templates/keynote.htmlother38.7 KB

references/diagram-rules.md

View on GitHub
# 画图规则(所有风格通用)

每张图都是某个风格模板 `styles/<style>/diagram.html` 的副本,只改 `main()`。四个模板的 helper 名字、签名、9 个色槽完全相同,区别只在外观(`STYLE.md`)。本文件是与风格无关的规则;风格自己的字体、配色、额外规则见对应 `STYLE.md`。

## 硬规则

1. **只画 brief 里有的东西。** 先列出用户文字里的名词(角色 / 实体)和动词(动作 / 流转),只画这些。brief 没提到模型、工具、外部服务、存储、消息通道、异常、状态气泡、时间线,就不画。5 个名词的 brief 画 5 个节点,不补全成 12 个节点的「完整系统架构」。拿不准时先问。
2. **颜色跟着概念走,不跟着图走。** 多图系列先写 `diagram-binding.md`(`templates/diagram-binding.md`):概念 → 色槽 → 形状,之后只追加不改。每张图 `main()` 顶部写 `// Concept color binding` 注释,与绑定表一致。
3. **色槽按抽象语义选**(下表),不按槽名字面意思。不为单张图新增颜色;新概念优先换形状。
4. **框内文字色 = 框的描边色**(`btext` / `node` 已这样做);模板配色已验证对比度 ≥ 4.5:1,不要改成别的颜色。
5. **箭头一律 `C.flow`**,线不上色;唯一例外是红色虚线异常路径(`{ stroke: C.error.stroke, strokeLineDash: [10, 7] }`)。**红色只用于异常。**
6. **颜色数量按需求定**,最多 9 种;超过 5 种加 `legend()`,只列本图用到的颜色。颜色不能是唯一线索:每个框都有文字。
7. **主角加大加粗**:主角框是其他框的 1.3–1.5 倍,`{ box: { strokeWidth: 3.2 } }`,不靠更亮的颜色。
8. **不用 emoji。** 警示用红色 + 六边形,强调用加粗 + 主色。
9. **`main()` 的颜色和字体只用模板常量。** 用 `C.<slot>`、`C.flow`、`C.caption`、`C.title`、`LABEL_BG`、`FONT_TI` / `FONT_BD`,不写十六进制颜色和字体名;线条粗细、`roughness` 可以照手绘风写,其他风格的 `restyle()` 会把它们换成自己的值。这样同一个 `main()` 能在四种风格里渲染(`scripts/styles.py`),换风格不用重画。少数必须的例外(二维码底的 `'#ffffff'`)写注释说明。
10. **helper 一个都不改、不绕开。** 直接用 `ctx` 画的东西进不了 deck。

## 9 个色槽的抽象语义

| 槽 | 抽象语义(跨领域) | Agent 领域的用法 |
|---|---|---|
| `C.user` | 人 / 发起者 / 系统入口 | 用户、人类输入、人工审批 |
| `C.im` | 通道 / 传输 / 队列 / 消息 / 网关 | IM 渠道、Bus、队列、网关 |
| `C.agent` | 本图主角 / 核心子系统 / 控制面 | 主 Agent、Orchestrator |
| `C.subagent` | 执行者 / 次要子系统 / 处理流水线 | 子 Agent、Worker、Verifier |
| `C.llm` | 模型 / 算法 / 推理 | LLM、Embedding、Reranker |
| `C.tools` | 能力 / 工具 / 隔离环境 | 工具调用、MCP、Sandbox |
| `C.memory` | 存储 / 持久化 / 数据 | 记忆、DB、向量库、对象存储 |
| `C.external` | 外部依赖 / 背景参照 | 第三方 API、外部服务 |
| `C.error` | 异常 / 失败 / 降级(克制使用) | 拒绝、兜底、失败分支 |

## 形状语义

| 形状 | 用途 | helper |
|---|---|---|
| 框 | 实体 / 服务 / 资源 | `box(x, y, w, h, color, override?)`;带文字用 `node()` 或 `bnode()` |
| 长条 | 通道 / 队列 / Bus | `channel(x, y, w, h, color)` |
| 折角卡片 | 任务 / Job / 工作单元 | `taskCard(x, y, w, h, color)` |
| 气泡 | 状态通知 / 推送 | `bubble(x, y, w, h, color, 'left' \| 'right')` |
| 六边形 | 异常 / 决策 / 兜底 | `hexagon(cx, cy, w, h, color)` |
| 虚线时间线 | 时序 / 阶段 | `timeline(x1, y, x2, marks)` |
| 分区框 | 子系统 / 信任区 / 分组 | `frame(x, y, w, h, color, label, labelW)` |

文字:`lbl({ text, sub, ... })` 两行,`plain({ text, ... })` 单行(HTML,`<b>` / `<br>` 可用,字面 `<` `&` 要转义),`title()` / `subtitle()` 是标题。压在线上的文字加 `bg: LABEL_BG`。

## 渲染与自检

模板画完置 `window.__renderDone = true`。用 Playwright 渲染(视口 = 画布尺寸,等 `document.fonts.ready` 和 `__renderDone`),或:

```bash
"$CHROME" --headless=new --disable-gpu --hide-scrollbars --window-size=1920,1080 \
  --virtual-time-budget=8000 --screenshot="$PWD/out.png" "file://$PWD/details/01_topic.html"
```

逐张看 PNG:

- [ ] 没有 emoji;字体符合所选风格的 `STYLE.md`
- [ ] 没有字压字、框穿字、箭头穿字;文字都在所属框内,换行后不溢出
- [ ] 每种颜色对应 brief 里的一类概念;超过 5 色有图例;每个框有文字
- [ ] 主角明显更大更粗;箭头都是 `C.flow`,只有异常路径是红色虚线
- [ ] `main()` 有 `// Concept color binding` 注释,且与 `diagram-binding.md` 一致
- [ ] 画布上的每个节点和箭头都能对应到 brief 里的一个名词或动词
canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.Stars: 197kUpdated Claude CodeCodexVerifiedInstall