Skip to content
Back to skills

Fig Pptx

ASecurity

Convert an accepted academic diagram into an editable PowerPoint (.pptx) or hybrid vector-text SVG/PDF with a clean background or intact transparent frame plus native editable text boxes, without slicing icons into tiles or modifying the source PNG. Skip for quantitative plots whose data points must stay pixel-exact. 把学术示意图转为真文本框可编辑 PPTX 与混合矢量 SVG。

  • 217 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 9, 2026
ai-agentspythonapi

Works with

  • api

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned December 5, 2026

npx -y skills add Azhi-ss/academic-figure-skills --skill fig-pptx --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fig Pptx?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Fig Pptx
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/azhi-ss-fig-pptx/badge)](https://www.skillsdirectory.com/skills/azhi-ss-fig-pptx)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: fig-pptx
description: >
  Convert an accepted academic diagram into an editable PowerPoint (.pptx) or hybrid vector-text SVG/PDF with a clean background or intact transparent frame plus native editable text boxes, without slicing icons into tiles or modifying the source PNG. Skip for quantitative plots whose data points must stay pixel-exact. 把学术示意图转为真文本框可编辑 PPTX 与混合矢量 SVG。
metadata:
  version: "2.2.0"
---

# fig-pptx

把一张已经接受的学术示意图做成可编辑 PPTX(及可选混合矢量文字 SVG/PDF)。文字是真文本框,图形与图标保留在同一张整图里(不生成图标表,不把图切成格子或碎片再拼回去)。源 PNG 不修改。

## 入口

只在「用户已接受成图」且「明确要求可编辑 PPT / 可编辑文字」时开始(`fig-draw` 交付后询问得到肯定也算明确要求)。

- 图未交付、用户未回答、或不满意当前成图:停(改图交给 `fig-draw`)。
- 这是需要像素级保真数据点的定量结果图:停,并说明本流程会重绘图像层。

## 步骤

1. 读 `references/layers.md`,掌握**本地 OCR + 确定性抹字通道(默认优先)**与**三层色度抠图 / AI 擦字兜底通道**(复杂渐变/照片纹理背景)。
2. 在**用户工作区**建运行目录 `<workspace>/.fig-pptx/<run-id>/`(不要写进全局安装后的 skill 目录),复制 `source.png` 进去。完成条件:源图未被改写。
3. 运行 `python3 <fig-pptx>/scripts/pick_font.py --style <comic|hand|technical|serif>`(含中文必加 `--cjk`)选定字体家族(脚本已支持无 `fc-list` 时直扫系统字体目录)。
4. 优先运行 `python3 <fig-pptx>/scripts/ocr_erase.py --source "$RUN/source.png" --out-clean "$RUN/clean.png" --out-layout "$RUN/layout.json" --font "<字体家族>"`(若有 `FigureSpec` 文件则追加 `--spec "$RUN/spec.json"` 自动校对 OCR 文本,macOS 零依赖走原生 Vision,Linux/Windows 可用 `uv run --with rapidocr,onnxruntime,pillow,numpy,python-pptx python3 ...`):
   - 若仅个别文字压在复杂纹理/渐变底上(`complex_bg_ratio` 偏高或目检有残留),再按 `references/layers.md` 降级走 AI 擦字 + `detect_text_boxes.py` 或三层色度抠图通道。
5. 重点检查 `layout.json` 中标记了 `"needs_review": true`(含 `review_reasons`,如疑似数学公式、上下标、希腊字母误识或低置信度)的条目,对照 `source.png` 修正文本并将数学上下标拆为 `runs` 的 `subscript`/`superscript`;随后执行 `layout_guard.py --strict` 与 `compose_pptx.py`(无 `python-pptx` 时自动走纯标准库 OpenXML 写出器;若用户同时需要 Overleaf/Figma 矢量文字版,再跑 `compose_svg.py`)。完成条件:`pick_font.py`、`layout_guard.py --strict` 均退出码 0,并写出 `.pptx`。
6. 检查 `clean.png` 及合成结果与 `source.png` 并排目检。若字压住图形或出现双影/重字,修正 `layout.json` 后重合成一次,交付 `.pptx` 路径并诚实说明残余差异后停止。

Files in this skill

  • SKILL.md2.1 KB
  • references/layers.md4.8 KB
  • scripts/chroma_key.py15.1 KB
  • scripts/compose_pptx.py27.3 KB
  • scripts/layout_guard.py13.4 KB
  • scripts/pick_font.py2.7 KB
  • scripts/probe_palette.py4.8 KB
  • scripts/slice_grid.py16.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.