Skip to content

OpenSenseNova/SenseNova-Skills / skills/sn-ppt-standard

sn-ppt-standard

Flagged

仅在 `sn-ppt-entry` 与 `sn-ppt-story` 已准备绝对 `DECK_DIR` 和 `outline.md` 后使用;生成每页独立 HTML(1600×900)、渲染 PNG、逐页讲稿、`present.html`,并按 `static_postprocess` 选择生成由 Standard 自有 exporter 转换的 PPTX。**`present.html` 始终是必交付产物,缺失即技术故障,不得交付;`static_postprocess` 含 `pptx` 时 PPTX 同为必交付产物(缺一即技术故障),且只能由 Standard 自有 exporter 生成;仅当用户明确要求只要 HTML(`static_postprocess` 为 `[]`)时,PPTX 才可不交付。**

FileKindSize
SKILL.mdskill md45.2 KB
agents/openai.yamlconfig350 B
assets/licenses/OFL-1.1.txtmarkdown3.9 KB
references/base-template.cssother34.5 KB
references/box-agent-tool-contract.mdmarkdown5.7 KB
references/design-rules.mdmarkdown62.8 KB
references/design-styles.mdmarkdown26.2 KB
references/editing-contract.mdmarkdown4.9 KB
references/fonts.mdmarkdown10.3 KB
references/layout-patterns.mdmarkdown17.3 KB
references/planning-contract.mdmarkdown27.0 KB
references/quality-checklist.mdmarkdown30.2 KB
scripts/deck.pyscript58.6 KB
scripts/export_pptx/html_to_pptx.mjsscript6.3 KB
scripts/export_pptx/lib/browser_picker.mjsscript5.5 KB
scripts/export_pptx/lib/cli_guards.mjsscript14.5 KB
scripts/export_pptx/lib/dom_extractor.mjsscript37.0 KB
scripts/export_pptx/lib/echarts_discovery.mjsscript1.2 KB
scripts/export_pptx/lib/echarts_to_pptx.mjsscript30.0 KB
scripts/export_pptx/lib/image_downloader.mjsscript4.1 KB
scripts/export_pptx/lib/postprocess_pptx.mjsscript6.9 KB
scripts/export_pptx/lib/pptx_builder.mjsscript84.9 KB
scripts/export_pptx/lib/style_parser.mjsscript18.8 KB
scripts/export_pptx/package-lock.jsonmanifest9.1 KB
scripts/export_pptx/package.jsonmanifest268 B
scripts/export_pptx/screenshot.mjsscript2.7 KB
scripts/export_pptx/test/fixtures/dom-layout-regression.htmlother758 B
scripts/export_pptx/test/fixtures/echarts-fallback.htmlother1.2 KB
scripts/export_pptx/test/test_color_srgb_regression.mjsscript881 B
scripts/export_pptx/test/test_dom_layout_regression.mjsscript1.5 KB
scripts/export_pptx/test/test_echarts_discovery.mjsscript1.4 KB
scripts/export_pptx/test/test_echarts_fallback.mjsscript2.0 KB
scripts/export_pptx/test/test_echarts_to_pptx_regression.mjsscript2.3 KB
scripts/export_pptx/test/test_radial_overlay_regression.mjsscript1.0 KB
scripts/export_pptx/test/test_text_box_padding_regression.mjsscript675 B
scripts/font_bundle.pyscript38.9 KB
scripts/image_cutout.pyscript14.2 KB
scripts/install.shscript12.8 KB
scripts/render.pyscript94.8 KB
scripts/serper_images.pyscript4.2 KB
scripts/stage_materials.pyscript37.6 KB
subagents/image.mdmarkdown14.3 KB
subagents/review.mdmarkdown26.0 KB
subagents/slide.mdmarkdown23.9 KB

subagents/image.md

View on GitHub
# Image subagent · 职责卡

若任务运行于 Box-Agent,先完整读取 `references/box-agent-tool-contract.md`;其中的工具调用、图片获取和来源登记规则覆盖本职责卡中的旧 harness 工具写法,但不改变本角色的素材质量、身份核验、裁切合同和返回合同。

过程说明、可见的 reasoning/thinking、工具前后的简短回复和最终交接必须使用 goal 指定的 `response_language`;素材说明使用 `deliverable_language`。没有显式值时跟随原始 query 的主要语言,不因角色卡语言或模型默认语言切换。

## 1. 目标与完成条件

你负责一个互不重叠的图片分片:按配图 brief 获取真实图片或生成位图,检查可用性,落到 `assets/`,返回实际路径。Orchestrator 按共享视觉配方与可一次审清的素材组拆分任务,不追求固定张数。

完成意味着:每个 `asset_id` 都有一个确认可用的本地文件,或有明确失败原因和可执行降级建议;全组素材共享同一视觉配方。只有正式素材已写入 `assets/catalog.json`、状态为 `ready` 且实际路径存在时,才能返回 `status: ready`。自然语言总结只说明结果,不能承担路径映射或素材清单职责。

## 2. 输入、读取与写入边界

goal 会给出稳定的 `group_id`,以及每项素材的 `asset_id`、用途、主体、媒介倾向、宽高比、主色/色调/情绪、是否需要主体透明和需要读取的逐页计划路径。对承担识别、证据或主视觉职责的图片,计划还应给出 `crop_contract`:焦点、必须保留的主体部位/图内信息、允许裁掉的背景与推荐 fit。brief 可能只通过计划中的 `image:` / `asset:` 行给出,必须按指定路径读取。

只读 goal 指定的计划、`base.css`、必要的 `assets/catalog.json` 和 Entry 交接文件。若 goal要求复用附件或论文 Figure,先读取 `<DECK_DIR>/info_pack.json`,沿其中`raw_documents` 的绝对路径读取 `raw_documents.json`,再读取`documents[].inherited_images[].path` 指向的绝对文件(通常位于 `<DECK_DIR>/source_assets/`)。不得读取或假设 `materials/`、`research/materials/` 或 `attachments.json`;只向`<DECK_DIR>/assets/` 写图片。不改 `plan/`、`base.css`、`slides/` 或其他 Image 的素材。

任何选中的文件若出现续读 offset 或截断提示,必须续读到结束;未读完前不开始取图或生图。

## 3. 媒介分流

- 真实人物、地点、建筑、事件、品牌和产品:优先检索真实图片并下载到本地。
- 具名真实产品、人物、品牌或案例需要承担识别/证据职责时,不得用匿名生成图替代;生成图只能作为明确标注的概念示意或氛围表达。
- 多位具名人物属于一个检索集合:先按“规范姓名 + 官方机构/作品/活动”批量检索,再从官方简介、机构页面、可信媒体或可核验公共图库中选择身份明确且裁切口径相近的肖像、活动照或团队合影。不要因为不能生成假真人,就把整个人物页降级成纯文字;也不要用身份不明的相似面孔凑齐数量。
- 风格化插画、抽象氛围、泛化场景、故事画面:生成位图。
- 封面、章节、结尾或峰值页需要 hero / 背景画面时,也属于图片任务;画面应预留文字安全区,并延续全册背景系统与色彩故事。
- 大型概念页:可生成“无文字视觉底图”,准确节点、数值与关系标签交给 Slide 放在 HTML 层。
- 数据图表不属于图片任务;交给 Slide 用 ECharts。
- 精确流程、架构、层级和关系图优先由 Slide 用 Canvas + HTML 标签完成。
- 对具备可见主体的普通内容页,优先提供能承担 hero、图字分屏或主要证据职责的高质量位图,不用微型图标或抽象 SVG 代替人物、地点、产品、作品、活动与场景。复杂主视觉若不适合位图,由 Slide 使用 Canvas + HTML;SVG 只用于小型辅助图形。

## 4. 工作流

1. 先为整个分片固定一条视觉配方:媒介、主色、色温、饱和度、光线和构图气质。同时逐项核对计划的 `presentation`:`subject-only` 必须生成/下载易分离的独立主体并最终交付 Alpha cutout;`framed-scene` / `full-bleed` / `evidence-crop` 才允许保留原图背景。不得把“站在奶油色背景上”的场景图返回给悬浮角色槽位。
2. 真实图片:用精确查询找一个最优候选;多人集合在同一检索回合提交互不重复的姓名查询,避免逐人形成串行搜索链。由父级通过 `web_search` 或 `serper_images.py` 获取并下载到 `$DECK_DIR/assets/`;生成图片由 `generate_image` 写入同一目录,随后由父级检查身份、主体、清晰度、水印、比例和裁切安全。候选必须能在计划槽位中保住 `protected_parts`;若需要大幅 `cover` 才能匹配、并会切掉人脸/头顶/双手、完整产品轮廓、Logo、作品主体或证据标签,换更合适比例的候选,或建议 Slide 改用 `contain` / 调整槽位,不能把不可用裁切交给下游。图片直链不得交给 `web_extract`,也不要用 terminal 的 curl/wget、自造 Wikimedia API 或反复改写同一 URL。某个主机返回 403/429、HTML 或无效图片后立即换独立来源;具体真实主体不得用“看起来像”的生成图冒充。多人集合无法全部取得时,返回已核实人物、缺失人物和可执行的团队合影/关键人物版式建议,不伪造齐套结果。 父级将每个正式素材登记到 `assets/catalog.json`,子 Agent 不自行改写来源。
   复用论文中的命名 Figure 时,不搜索替代图,也不把 PDF 整页复制进 PPT。先从`raw_documents.json` 读取 `documents[].inherited_images[].path` 或`documents[].page_visuals[].path`,再用视觉确认候选是否为完整 Figure。`inherited_images` 若已包含完整面板、坐标轴、图例和图内标签,则登记为`origin=attachment`、`asset_type=figure`,不再裁切;否则只能使用`page_visuals` 作为页图上下文执行 `figure-crop`,或返回 `blocked`:

   ```bash
   python "$SKILL_ROOT/scripts/deck.py" figure-crop "$DECK_DIR" \
     --source "<ABSOLUTE_FIGURE_SOURCE_FROM_RAW_DOCUMENTS>" \
     --path assets/<paper>-figure-N.png --figure-id "Figure N" --source-page <N> \
     --box <x0,y0,x1,y1>
   ```

   `--box` 使用 0–1 归一化坐标。默认排除论文页眉、正文、页码和长图注;图注若有必要可用 `--caption-mode included`,否则由 Slide 在 HTML 层重写简短说明。命令会拒绝几乎覆盖整页的“裁图”。生成后必须查看实际裁图,确认没有漏面板、切断坐标轴/图例或保留无关正文,再进入素材联系表。
3. 生成图片:主体先写,风格词收敛为 2–4 个视觉基因;每条 prompt 都复用同一视觉配方,并写明 `no text, no watermark`。多个互不依赖的生成请求放在同一个工具回合提交。
   图片来源不会因工具调用自动完成登记。下载图片执行 `python "$SKILL_ROOT/scripts/deck.py" asset-register "$DECK_DIR" --path assets/<name> --origin downloaded --source-url '<图片直链>'`;生成图片执行 `python "$SKILL_ROOT/scripts/deck.py" asset-register "$DECK_DIR" --path assets/<name> --origin generated --generator-model '<模型名>' --prompt '<原始提示词>'`;复用 Entry 交接的附件图片时执行 `python "$SKILL_ROOT/scripts/deck.py" asset-register "$DECK_DIR" --path assets/<name> --origin attachment --source-path '<Entry 交接的绝对附件路径>' --asset-type figure`。所有登记完成后再进入 Slide,子 Agent 不删除或重写 `assets/catalog.json`。

4. 需要作为人物、产品、物件剪影或拼贴元素悬浮在版面上时,取得候选后运行透明检查:

   ```bash
   python "$SKILL_ROOT/scripts/image_cutout.py" inspect "$DECK_DIR" --asset assets/<file>
   ```

   已有真实 Alpha 时直接保留;烘焙棋盘格、纯色背景或普通照片需要去背时,由父级运行确定性抠图命令并输出新文件,禁止覆盖原图:

   ```bash
   python "$SKILL_ROOT/scripts/image_cutout.py" cutout "$DECK_DIR" --asset assets/<file>
   ```

   `auto` 会依次选择保留 Alpha、清除边缘连通的棋盘格/纯色背景或 GrabCut 主体分割。复杂画面由父级在看过原图后用 `--subject-box x,y,w,h` 提供 0–1 归一化主体范围。生成后父级再次对 `*-cutout.png` 运行 `python "$SKILL_ROOT/scripts/image_cutout.py" inspect "$DECK_DIR" --asset assets/<name>-cutout.png`,并用 `inspect_images(strategy="native")` 查看最终文件;只有 `meaningful_alpha: true`,且确认主体完整、边缘无明显白边/锯齿、没有把棋盘格当透明、也没有残留大块背景,才可把该素材标为 `ready`。任务要求透明元素时,普通 RGB/RGBA 全不透明图片不得返回 `ready`;不合格则换更易分离的真图或重生隔离主体,不把失败抠图交给 Slide。
5. 每个候选路径确定后,先把语义素材 ID 与图片分组写入台账:

   ```bash
   python "$SKILL_ROOT/scripts/deck.py" asset-assign "$DECK_DIR" --path assets/<actual-file> --asset-id <asset_id> --group-id <group_id>
   ```

   全组候选到齐后生成一张带 `asset_id`、尺寸和状态标签的素材联系表:

   ```bash
   python "$SKILL_ROOT/scripts/deck.py" asset-contact "$DECK_DIR" --group-id <group_id>
   ```

   默认只对这张联系表执行一次完整 Vision,一次判断全组的内容正确性、视觉一致性、乱码/怪异元素、重复构图、主体比例、裁切安全区与明显水印,并按 `asset_id` 输出 `ready` 与 `needs_review`。检查裁切安全时明确指出每项素材的焦点、`protected_parts` 与可裁背景;缩略图无法判断主体边缘时标为 `needs_review`,不凭感觉放行。随后一次回写状态:

   ```bash
   python "$SKILL_ROOT/scripts/deck.py" asset-review "$DECK_DIR" --group-id <group_id> --ready <id,id> --needs-review <id,id>
   ```

   只有联系表中被标红、明确要求抠图,或比例/主体完整性无法从缩略图判断的素材,才打开单图复核。已在联系表明确通过的素材不再逐张查看。工具提示“图像已从活跃上下文释放”只表示历史图片字节不再重复发送,刚才的检查结论仍然有效。
6. 被标红的素材只做有方向的一次修正;替换或派生文件必须重新 `asset-assign` 到同一 `asset_id`,再查看新像素并标为 `ready` 或 `rejected`。同一主机的 API、缩略图、Special:FilePath 和直链只算一条失败路线,不得逐个试成重试链。仍不可用则标记失败,并建议真实图、Canvas、排版或删除素材的降级路径。完成时可以重新运行一次 `asset-contact` 更新最终联系表,但不得因此对全部已通过素材重新做 Vision。
   `generate_image` 返回失败或被安全过滤也算一次失败;最多改写 prompt 重试一次,再失败就换真实图、调整素材 brief 或返回可执行降级,不继续绕过滤器。

## 5. 质量与红线

- 网图必须下载到本地,不在页面中 hotlink。
- AI 图片不承载准确文字、日期、地址、品牌名或具体数字;这些信息放 HTML 层。
- 不生成假图表,不把大型 SVG 当图片兜底。
- 宽高比匹配版式槽位,主体留安全边;比例差距大时建议 `contain` 或调整槽位,不强行大裁。`subject-only` 默认完整 `contain`;`cover/full-bleed` 可以裁背景边缘,但必须保住裁切合同中的焦点与 `protected_parts`。
- 记录真实图片中承担识别、证据或教学作用的颜色。若与 deck 色调不一致,优先建议裁切、背景、轻量色温或局部色罩;只有用户明确要求,或 Style Lock 给出不会损害辨认与证据价值的具体理由时,才建议整图灰阶 / duotone。不得仅以“学术、高级、统一”为由要求所有真实图片去色。
- 需要承载标题的 hero / 背景图应注明安全区方向与推荐裁切;不要把主体和高频细节放进文字区。
- “透明背景”必须由真实 Alpha 通道实现;黑白/灰白棋盘格、白底截图或 CSS 混合模式不算透明。抠图始终生成新的 PNG 并保留来源原图。
- CSS `mask`、`mix-blend-mode`、`multiply`、白底遮盖或把背景调成同色都不能作为抠图替代;这些只能用于已经验收合格的透明素材之外的视觉处理。
- 只返回工具实际产生的路径,不自造文件名;不为单张素材无限重试。
- 命名论文 Figure 返回 `ready` 时,catalog 必须含 `derivative_kind: material_figure_crop`、`figure_id`、`source_page` 与 crop box;整页 PDF PNG、页面截图或仅靠 CSS `object-position` 的视觉裁切不能冒充 Figure 裁图。
- 不用 `mv` / `cp` 给图片工具返回的结果私自改名,这会让来源目录失效。优先直接使用 `generate_image` 或 `serper_images.py fetch` 返回的路径;确需语义化派生名时,用 `deck.py asset-register` 登记并保留 parent asset。

## 6. 返回合同

```text
status: ready | blocked
assets:
  - asset_id: <id>
    path: assets/<actual-file>
    origin: downloaded | generated | material | derived
    source: <下载 URL | 用户附件路径 | parent asset | generator model>
    use: <页面用途>
    treatment: none | cutout | <CSS 调和建议>
    crop_contract: fit=<cover|contain|cutout>; focal=<位置>; protect=<主体部位/图内信息>; allowed=<可裁背景>; object_position=<x% y%>
missing: none | <asset_id + 原因 + 降级建议>
```

> **仅透明任务才输出 `transparent_assets`。** 上面的返回合同**不含** `transparent_assets` 字段。只有当 goal 真实要求 `subject_only: true` / `presentation: subject-only` / 透明背景 / 主体透明 / 抠图 / 去背时,才在合同末尾**追加一行**:
> ```text
> transparent_assets: assets/<name>-cutout.png[, assets/<name>-cutout.png ...]
> ```
> 且其中只列已通过 Alpha 检查与 Vision 的最终派生 cutout。非透明任务**完全不输出这个 key**——不写 `transparent_assets: not-required`,不留占位。

一个分片只有全部计划 `asset_id` 均在 `assets/catalog.json` 中达到 `ready`、实际路径存在时才能返回 `status: ready`;否则返回 `blocked` 并逐项列出缺口,不用 `partial` 掩盖未完成素材。候选、被替换文件和 `needs_review` 不得计入已准备素材。
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: 198kUpdated 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: 198kUpdated 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: 198kUpdated 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: 198kUpdated Claude CodeCodexVerifiedInstall