SuperAPI AI Directory

md-to-modern-pptx

Office & productivity

View repository

Updated 10-24 16:20

About this skill

Md → Modern PPTX

Quick start (recommended)

Goal: use theme-factory to pick a theme + use PptxGenJS to reliably generate PPTX, then use markitdown for content QA(optionally also do visual QA).

1) Pick a theme (theme-factory)

  • Theme preview: open ~/.agents/skills/theme-factory/theme-showcase.pdf
  • theme slug (corresponds to ~/.agents/skills/theme-factory/themes/*.md):
    • ocean-depths
    • sunset-boulevard
    • forest-canopy
    • modern-minimalist
    • golden-hour(used in this example)
    • arctic-frost
    • desert-rose
    • tech-innovation
    • botanical-garden
    • midnight-galaxy

2) Install dependencies (once)

In the project directory where you want to generate the PPTX, run:

npm i pptxgenjs
python -m pip install "markitdown[pptx]"

3) Generate the PPTX

Use this skill's built-in script (targeting "Deep Research style Markdown"):

node .\skills\md-to-modern-pptx\scripts\md-deepresearch-to-pptx.js --in .\YOUR.md --out .\YOUR.pptx --theme golden-hour

If your Markdown does not match the Deep Research structure: first organize it into the following structure (see references/deepresearch-md-contract.md), then generate.

Gemini image generation (optional, but it significantly raises the "premium" feel)

Your idea is feasible: use a text-to-image model such as gemini-3-pro-image-preview togenerate illustrations for some pages, then embed the images when generating the PPTX.

Image strategy (default recommendation)

  • Add images only to Detailed Analysis pages: 1 per subsection (up to 5), best value for effort.
  • Title/Executive Summary/Key Findings/Consensus/Debate/Sources: no images by default (avoid noise and style drift).

Image prompt coordination (Prompt Bank)

A single image's prompt consists of 4 parts (keep them consistent to avoid style jumping from page to page):

  1. Semantics: this page's subsection title + key context (1–2 sentences)
  2. Visual style:modern editorial illustration / flat vector / subtle grain / clean shapes
  3. Theme constraints: follow the deck theme's color tendencies (e.g., golden-hour is warm mustard + terracotta + beige)
  4. Hard constraints:no text, no logos, no watermarks, no brand marks

This skill's script automatically generates the plan according to the above principles (you can also edit it by hand).

1) Prepare .env(do not commit sensitive information)

Two placement options are recommended (choose one):

  • Global (recommended):~/.agents/skills/md-to-modern-pptx/.env(configure once, reusable across all projects; the script also supports some "nested install" paths)
  • Project-level:<项目根目录>/.env(applies only to the current project; the script also reads it automatically)

.env For content reference see skills/md-to-modern-pptx/.env.example:

CHERRY_BASE_URL=https://your-gateway.example.com
CHERRY_API_KEY=your_key_here
CHERRY_MODEL=gemini-3-pro-image-preview

Notes:

  • This is designed around the "relay station/gateway" base_url + key approach; the script prioritizes reading CHERRY_*, and is compatible with the legacy GEMINI_* naming.
  • For Gemini image generation models such as gemini-3-pro-image-preview : the script uses POST /v1beta/models/<model>:generateContent(responseModalities=["IMAGE"])。
  • If your gateway does not support the Gemini native path, it falls back to the OpenAI-like POST /v1/images/generations(some relay stations use task_id polling).

2) Generate the image plan (plan.json)

python .\skills\md-to-modern-pptx\scripts\gemini_image_pack.py make-plan --in .\YOUR.md --theme golden-hour --out .\images.plan.json

This generates prompts for up to 5 images for the analysis pages by default (starting from page 5).

3) Call Gemini to generate images

python .\skills\md-to-modern-pptx\scripts\gemini_image_pack.py generate --plan .\images.plan.json --out-dir .\images

If the error contains something like:

  • "no available channel (distributor)" / model_not_found
  • “not supported model for image generation”

It usually means: your relay station account/group has not enabled the model's IMAGE output capability, and you need to enable it/switch groups/switch to an available model on the relay station side.

The default output naming is:images/slide-05.png, images/slide-06.png ... (aligned with the deck page numbers).

4) Regenerate the PPTX and auto-insert images

node .\skills\md-to-modern-pptx\scripts\md-deepresearch-to-pptx.js --in .\YOUR.md --out .\YOUR.pptx --theme golden-hour --images-dir .\images

(If you temporarily don't want to insert images: add --no-images。)

QA (mandatory)

Content QA (markitdown)

python -m markitdown .\YOUR.pptx
python -m markitdown .\YOUR.pptx | Select-String -Pattern "xxxx|lorem|ipsum|this.*(page|slide).*layout" -CaseSensitive:$false

Focus on:

  • Whether any paragraphs are missing / order is wrong
  • Whether Markdown markers remain (**/backticks)
  • Whether there is placeholder text

Visual QA (optional, but strongly recommended)

If your machine has LibreOffice (soffice) and Poppler (pdftoppm), you can use the pptx skill's thumbnail.py to generate a thumbnail grid and quickly spot problems such as overflow/occlusion/margins that are too small:

python "$HOME\.agents\skills\pptx\scripts\thumbnail.py" .\YOUR.pptx deck-thumbs --cols 4

Common pitfalls (avoid them)

  • PptxGenJS colors should not include #, and do not use 8-digit hex to sneak in transparency (it will corrupt the file)
  • Use bullet: truefor lists; don't write “•” directly
  • Do not reuse the same options object (PptxGenJS mutates it in place)

For more complete PPTX engineering considerations, see directly the pptx skill's pptxgenjs.md。