Quick Start · Prerequisites · Public Tests
AI-generated slides you can finally just edit.
Anyone who has used an AI slide tool knows the feeling: the result is 90% right, but changing one word or swapping one image means re-describing, re-generating, and re-rolling the dice — touch one thing, regenerate everything.
This project's answer is direct: what the AI generates is not a PPT file, but a web page. Open it and edit — changing text is like editing a document (click in and type), swapping an image is like changing an avatar (upload and done), hit save and you're finished. No further conversation with the AI required.
And when you do need a PPT file, export with one click. Need stronger visuals? Have the AI repaint specific pages as full-page artwork to replace the original HTML.
HTML, PPTX, and Image are not three separate formats — they are seamlessly switchable under different conditions, with the editing layer lifted up to HTML.
The editor depends on no framework and is bound to no harness. Through MCP it launches a local web page where editing, annotating, image generation, comparison, design-panel swaps, and export are all one click away.
AI full-page artwork ("baked" pages) ← upgrade: covers and hero pages can be pushed to the limit
↑
【HTML slides】← the medium: flexibly generated by AI, manually editable, browser as player
↓
Standard PPTX file ← compatible: send to people on Office / WPS
↓
PDF ← direct byproduct, for archiving and distribution
One body of content, three forms. Day-to-day editing happens in HTML; pages that need extreme visuals get repainted by AI as full-page artwork (the original HTML is kept in a hidden source layer, always revertible); for delivery, export a standard PPTX. The three forms are linked by content fingerprints — change the HTML and the baked pages and export artifacts are automatically marked "stale". You never silently ship an outdated version.
The editor is a single zero-dependency web page. Open any generated deck:
- Edit text: click in and type — no "edit mode" to switch into
- Swap images: upload to replace; images land in the deck's assets directory
- Annotate: lasso any element you're unhappy with, write one sentence, and the instruction goes to the AI for a precise fix
- Reorder: drag thumbnails in the table-of-contents sidebar
No AI online, no network needed; saving means writing back to the file itself. Fast, direct, predictable.
The editor collaborates with AI over the standard MCP (Model Context Protocol), exposing exactly five standard tools — not bound to any specific AI product or framework: Kimi Code, Claude Code, Codex, or any MCP-capable agent plugs in and works.
Without an agent the editor stands alone; with one, every request you submit on the page (briefing, generation, edits, export) becomes a task the AI completes on an isolated copy, published back only after validation passes — isolated workspaces, validation, and revision checks protect the source from unintended overwrites.
| Scenario | How |
|---|---|
| Build a deck from scratch | Give the AI your topic and material, pick a style on a visual panel first (24 themes × color variants — swatches, fonts, and motion are WYSIWYG); the AI generates within the frozen style |
| Rework an existing PPTX | Hand the .pptx to the AI for conversion into web slides, then enter the same editing flow |
| Export PPTX for delivery | One click produces dual-track artifacts: an editable version (text and charts are native in PowerPoint) + a fidelity version (visuals sealed pixel-perfect), plus a PDF |
| Embed into your own system | Both slides and editor are iframe-embeddable, talking to the host over a postMessage protocol |
You never launch the editor by hand: over MCP, the agent automatically pops up this local web page at the moments that need human input — requirements briefing, edit confirmation, export QA. You act on the page and submit; the agent completes the task on an isolated copy and publishes it back. These are real recordings of the human touchpoints in that automated loop:
Note: the editor itself is a single zero-dependency
editor.htmland also works standalone — open any generated deck directly, edit, and save back to the file. That is the fallback path, not the main flow.
The three clips above cover edit-in-place / lasso annotation / briefing / export QA. These two add the other core capabilities without duplicating them: the editor's main switch, and version protection after a save. Both are real Playwright recordings of the same deck (960 × 540 / 10 fps, with captions and button highlights):
The remaining controls (style bar, intent buttons in the annotation list, artifact downloads, design-intent panel) are already shown in the three clips above and are not repeated here. Text-level guidance for the style bar and annotation intents lives in the generation skill's
SKILL.md.Two boundaries worth knowing: the editor modifies the HTML master, not the
.pptxbinary, so a re-export is needed afterwards; "Submit annotation", "Send to AI" and "Export as PPTX" are intent buttons that only enqueue — an agent must claim them before anything runs — while "Copy … instruction" only writes to the clipboard and submits no intent.
The same business page (demo content for "Shanhe Ji", a fictional tea brand; all data is fictional) rebuilt by twenty-two themes that each carry a written G10 composition_program contract. Each theme owns how information enters the space, so the difference is structural, not a palette swap: B1 presses the page into a visible 12-column grid with a vertical data spine; C3 prints it as terminal windows with key:value output; E5 carries the title on a −12° force band; H1 unrolls it as a handscroll with vertical titles and a cinnabar seal; G2 flows single-column text with highlighter marks and sticky-note annotations; F1 centers a single frosted-glass panel with diffuse corner light blobs; C1 drops a signal-orange block on a black keynote stage; G4 splits the page into a yellow/indigo clash with the claim reversed out on the yellow face; G5 splits into a midnight-blue/moss-green clash with the claim in moss green on blue; E2 frames the title inside a double-line drawing frame with mono key:value KPI annotation rows; E3 centers a gold-framed claim with flanking gold-line wings and symmetric mirrored KPI columns; C2 arrays specimen cards with numbered labels and leaf-vein side margins on a dark botanical ground; D3 frames brush-stroke block titles with dashed circle annotations and irregular-rounded slices on a painterly canvas; A1 floats the title as a ghost outline behind hairline columns with vertical title strips and ink-dot corner marks; D2 develops content out of amber darkness with glow halos as frameless containers and film perforation bands; E6 collages candy-colored blocks with 3px ink borders; E12 arrays outlined flat cards with hard ink offset shadows and sticker chips in a business neo-brutalist poster; G1 drapes the page in deep emerald velvet with cream-ink cards and gold-foil seals in an academic yearbook; D4 engraves brass-line frames with rivet-cornered steel panels and a red annotation stamp on a lacquered-charcoal ground; E8 prints a newspaper extra with a masthead bar, full-width rule lines, and three-column body text; E9 layers a geological cross-section with stratum color bands, a rock-core sample column, and era tags; E11 tears an industrial ticket stub with perforation lines, field rows, and a barcode footer. Text sizes come from the skeleton's .t-* role classes, so readability floors hold by construction rather than by a post-hoc gate.
The earlier token-swap samples (the older
p01–p29set) still live inassets/theme-sampler/; the twenty-two above are the recompiled versions. Historical source deck:tests/decks/theme-sampler/(not distributed in this checkout). The G2/F1 high-density samplers are from the batch-1 v2 acceptance (rev6, 12-item audit all green); C1 uses the original token-swap sample; G4/G5/E2/E3 are from the batch-3 G10 pipeline integration acceptance; C2/D3 are from the batch-4 G10 pipeline acceptance; A1/D2/E12/G1 are from the batch-5 G10 pipeline acceptance (E6 Memphis restored from batch-1 v2); D4/E8/E9/E11 are from the batch-6 G10 pipeline acceptance.
Different page forms from the same generation pipeline: cover doubles as clickable TOC, high-density data pages, chart pages, infographic pages.
Motion is a built-in vocabulary of the skeleton (8 families, 41 recipes), not post-produced video — these are real recordings of the web pages.
![]() |
![]() |
![]() |
|---|---|---|
| AI illustration ambience (launch-mono-v3) | Typewriter + scramble decode (smartforge-c1) | Split-char text engine (motion-v5) |
Top row: in-page AI illustrations — images live in assets/ via slots, replace the same-named file to swap. Bottom row: full-page baking with layout restructuring — flat narrative paragraphs are reorganized by AI into a structured infographic (every word preserved), with the original HTML kept in a hidden source layer, always revertible or re-bakable.
Design is not left to the AI's improvisation
AI-generated slides are mediocre because the default aesthetic converges on "centered headline + purple-blue gradient + card walls". This project's countermeasure is front-loading decisions: visual identity comes from a curated theme library (you pick, not improvise), layout is driven by content (count the words before choosing a composition), and the AI creates within constraints — constraints don't limit quality, they are the source of it.
Text overflow is gated by math, not by eyeballing
- At build time: capacity planning precedes layout choice; every container is pre-certified using PPT font metrics
- After generation: real Playwright render measurement — zero overflow, zero overlap, compliant font sizes; the script has the final say
- At export: a mathematical certifier reopens the PPTX and computes line by line — ink width, ink-box collisions, line-height floors. Nothing is written to disk unless certification fully passes; failures trigger automatic repair. Publication is gated by the implemented layout checks; real Office/WPS rendering still needs verification
- Font subsets are embedded where licensing permits. Font handling varies between Office and WPS; use the fidelity track when visual consistency matters more than native editing.
Public regression tests and historical acceptance work
The public regression suite uses synthetic fixtures to check bridge request arbitration, managed asset/export reads, local worker script paths, the image-provider self-check, and runtime diagnostic failures. Run it using the instructions below. Historical development reports describe a broader 55-check acceptance system and a 54-page business benchmark; that private harness and customer material are not distributed, and are not a substitute for reproducible public end-to-end evidence.
Editor ↔ Agent bridge, technical notes
- Exactly five MCP tools:
open_editor/await_intent/push_update/get_status/close_session - All tasks are async intents: the agent works on an isolated copy, published atomically after CAS validation
- Durable processing: tasks can be stopped and resumed (resume / rebuild); the source of truth lives in SQLite; page, agent, and service stay in sync over SSE
- Git-protected baseline: dedicated refs and an isolated index — your HEAD and staging area are never touched
| Dimension | Common practice | This project |
|---|---|---|
| Deliverable | PPTX files / image collages / framework-bound players | A single zero-dependency HTML file; the browser is the player |
| Editing after generation | Regenerate and roll the dice | Edit the original file in place, no AI involved |
| Design decisions | AI decides unilaterally, style is a lottery | Curated theme library + visual panel: humans pick, AI implements |
| Overflow prevention | Runtime font shrinking / eyeballing | Capacity planning + render measurement + mathematical certification |
| PPTX export | Screenshot pasted in (uneditable) / naive conversion (layout drifts) | Native editable + vector fidelity dual tracks; nothing ships unless certified |
| Full-page AI artwork | Final once generated, nothing left to edit | Baked pages keep a hidden source layer — revert and re-bake any time |
| AI framework lock-in | Bound to a specific product | Standard MCP; any agent framework can integrate |
| Quality evidence | Varies by tool | Public regression tests, layout checks, fidelity scores, and diff heatmaps; see verification limits below |
The integrated workflow needs the generation skill and the MCP bridge. Installing the skill alone does not install the bridge or the Python/browser dependencies. Keep a checkout of this repository for the bridge and editor; do not remove it after registering the MCP command.
Prerequisites: Python 3.10+, Git, Node.js/npm, and an MCP-capable coding agent. Run the following from a terminal, then complete both installation sections below:
git clone https://github.com/DSXiangLi/SlideForge.git
cd SlideForgeBasic HTML editing does not need an AI connection. Generation uses your coding agent's configured model and may incur its normal usage costs.
The generation side is driven by an AI coding agent:
- With the
skills/SlideForge/skill loaded, the full workflow — from requirements briefing to dual-track export (including render checks, capacity gates, and every export script) — ships with the skill itself. - Connect the MCP service, and the agent pops up the web page whenever human input is needed.
Option 1 (recommended) — the npx skills installer, which auto-detects your agent and drops the skill into the right folder (pick SlideForge when prompted):
# Install into the current project
npx skills add DSXiangLi/SlideForge
# …or install globally, for every project
npx skills add DSXiangLi/SlideForge -gOption 2 — manual: copy (or symlink) skills/SlideForge/ into your agent's skill directory; the entry point is SKILL.md. Common user-level skill directories:
| Agent | Skill directory |
|---|---|
| Claude Code | ~/.claude/skills/SlideForge/ |
| Kimi Code | ~/.agents/skills/SlideForge/ |
| WorkBuddy | ~/.workbuddy/skills/SlideForge/ (user-level); or <project root>/.workbuddy/skills/SlideForge/ (project-level, shared with the team) |
# Example: Claude Code / Kimi Code (macOS · Linux)
cp -r skills/SlideForge ~/.claude/skills/
# Example: WorkBuddy (Windows PowerShell)
Copy-Item -Recurse skills\SlideForge "$env:USERPROFILE\.workbuddy\skills\"The skill is distributed as static files, but its generation checks and export scripts have runtime dependencies. Complete the bridge setup below using the repository's requirements.txt; copying the skill directory alone is not a complete installation.
The main flow — content → pages → render/capacity checks → export — needs no additional image-service credentials beyond your coding agent's own configuration. Only
the two optional passes (AI illustration, full-page baking) call an image service, always through
the skill's own provider (skills/SlideForge/scripts/providers/openai_image.py, stdlib-only)
hitting the official OpenAI Images API.
OPENAI_API_KEY(required);OPENAI_BASE_URLfor OpenAI-compatible endpoints;OPENAI_IMAGE_MODELdefaults togpt-image-2.- Or use a
.envfile — the first existing file wins, keys are not merged:./.env(the deck directory when invoked through the adapter) →<skill dir>/.env→~/.slideforge/.env. Template:skills/SlideForge/.env.example. - Keep the default model: the skill's own image gate requires page-level slots to be ≥2560×1440,
which the
gpt-image-1family (1024×1024 / 1536×1024 / 1024×1536) cannot produce. The provider fails loudly with guidance rather than upscaling, cropping, or silently degrading. - Verify the setup without network or billing:
python skills/SlideForge/scripts/providers/openai_image.py --self-check. With no size arguments, this validates the 2560×1440 page preset. Pass--sizeor a concrete--aspect-ratioto check another size. This checks configuration presence and size compatibility, not whether a key is accepted by the remote API.
The bridge is a stdio MCP server with the fixed name pptx-html-bridge and entry point tools/edit.py --mcp. Installation takes three steps:
From the cloned repository root, install the complete local runtime into a dedicated venv. This includes the MCP SDK, layout metrics, image comparison, and PPTX export dependencies.
macOS / Linux:
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.txt
.venv/bin/python -m playwright install chromium
.venv/bin/python tools/edit.py --doctorWindows PowerShell:
python -m venv .venv
.venv\Scripts\python.exe -m pip install -r requirements.txt
.venv\Scripts\python.exe -m playwright install chromium
.venv\Scripts\python.exe tools/edit.py --doctorOn Linux, Playwright may also require OS libraries (python -m playwright install --with-deps chromium, using the same venv interpreter; installing OS packages may require administrator privileges).
--doctor checks imports, the MCP version, shipped files, Git/Node availability, and the Chromium installation. It starts no server and makes no model/image API calls. A successful check is not an end-to-end export or agent-host compatibility test. Run generation/export scripts with this same venv interpreter.
Claude Code, one line (writing the absolute path of the Step-1 venv interpreter as python3 is the most robust):
claude mcp add pptx-html-bridge -- /absolute/path/.venv/bin/python3 /absolute/path/tools/edit.py --mcpCodex / Kimi Code / Cursor and others: add the equivalent entry to the mcpServers object of your agent's MCP configuration. Prefer an absolute interpreter path for command; on Windows escape JSON paths with \\ (or use forward slashes):
{
"mcpServers": {
"pptx-html-bridge": {
"command": "/absolute/path/.venv/bin/python3",
"args": ["/absolute/path/tools/edit.py", "--mcp"]
}
}
}WorkBuddy: edit the user-level config ~/.workbuddy/mcp.json (note the filename has no leading dot — it is not .mcp.json) and merge the entry into the existing mcpServers (don't overwrite other servers). Windows example:
{
"mcpServers": {
"pptx-html-bridge": {
"command": "C:\\Users\\<you>\\Desktop\\SlideForge\\.venv\\Scripts\\python.exe",
"args": ["C:\\Users\\<you>\\Desktop\\SlideForge\\tools\\edit.py", "--mcp"]
}
}
}Writing the config does not activate the server automatically: open WorkBuddy's connector management page (top-right entry), find pptx-html-bridge in the custom connectors list, click Trust, then restart the session.
Kimi Code: raise the tool timeout. Kimi Code force-times-out any single MCP tool call after 60 seconds by default (progress notifications do not extend it), which would kill the bridge's long
await_intentwait — up to one day — and leave page-submitted requests unclaimed. Add"toolTimeoutMs": 86500000to the server entry above (or set[mcp] toolTimeoutMsinconfig.toml, or theKIMI_MCP_TOOL_TIMEOUT_MSenv var), then restart the session. Hosts without a 60-second cap don't need this.
You know it works when the agent sees exactly five tools: open_editor / await_intent / push_update / get_status / close_session.
- On hosts that support MCP Apps,
open_editor(open_browser="auto")embeds the editor directly into the chat panel (track A, where the tool surface additionally exposesopen_briefand app-related tools); - otherwise it opens a standalone browser window (track B). The five model-facing tools and the intent protocol are identical across both tracks.
The bridge is not tied to a working directory: open_editor registers the deck path per session, and the page, the daemon, and the agent have independent lifecycles — the daemon can stay resident in the background.
requirements.txt: full bridge + generation/export runtime.skills/SlideForge/requirements.txtcontains the script dependencies for separately installed skills.- Chromium: install with
python -m playwright install chromiumusing the runtime interpreter. - Git and Node.js: required for protected versions and the image-validation script.
- Poppler (
pdftocairo): optional for vector fidelity export. Without it, the exporter reports a raster fallback; install it for the vector path. - Fontconfig (
fc-match): improves system-font discovery/subsetting. Missing fonts or unsupported embedding can affect native PPTX output. - LibreOffice (
sofficeon PATH): used for reference rendering of native PPTX in export comparison, with the includedpypdfium2dependency for PDF rendering/text checks. It does not replace testing in actual Office/WPS.
Dependency ranges are compatibility bounds, not a locked environment. Image generation is optional and separately billed by the configured provider.
After installing requirements.txt, run with the same venv interpreter (Chromium is not required for these synthetic tests):
# macOS / Linux
.venv/bin/python -m unittest discover -s tests/public -v# Windows PowerShell
.venv\Scripts\python.exe -m unittest discover -s tests/public -vThese tests use synthetic temporary files, do not start a daemon, and do not call paid APIs. They cover specific regressions, not full browser editing, live agent integration, or Office/WPS fidelity. Private/customer decks remain excluded from public test distribution.
skills/SlideForge/ [Product] generation skill: workflow + skeleton + reference library + all generation/export scripts
editor.html [Product] single-file editor: edit / annotate / flip — a three-state workbench
tools/ [Product] MCP bridge: edit.py entry + core + MCP proxy
tests/public/ [Public regression] synthetic bridge/provider checks; private benchmark decks are not distributed
docs/ design docs / research / iteration logs / acceptance evidence / lessons learned
- Generation and bridge workflow: SKILL.md
- Editing contract: editing-contract.md
- Theme index: themes/index.md
- Historical iteration and visual reports: docs/progress/
- Executable public regression checks: tests/public/
Internal architecture documents and the private acceptance harness are not included in this repository.
The repository includes the generation/editing/export pipeline and focused public regression tests. Full clean-machine onboarding, live MCP-host integration, browser editing, actual Office 365/WPS rendering, and paid image-generation quality require separate end-to-end verification. HTML is the editable master: PPTX imports reconstruct content, exports are one-way, baked pages are images, and unsupported visuals or pages may be flattened with degradation reported.








































