SurgePix
Presentation Creator
Generate AI-powered presentations from a prompt, outline, or document — optimized for autonomous agent skill calling and automated workflows. Use when the user asks to create a PPT, make a slide deck, turn an outline into slides, or generate a presentation from a brief. Accepts natural language prompts, local files or document URLs as input. Returns a download URL, session ID, and task ID upon completion, with async execution and automatic polling. Supports 8 present styles for intent-to-style mapping, session-based multi-turn iteration for conversational refinement and auto language detection.
npx skills add https://github.com/surgepix/agent-skills --skill surgepix-generate-presentationSurgePix Presentation Creator
Generate a polished PowerPoint (.pptx) file from a prompt and optional outline using the SurgePix API. Use when the user asks to create a PPT, make a slide deck, turn an outline into slides, or generate a presentation from a brief.
What the Skill Does
| Action | Description |
|---|---|
| Generate PPT | Create a complete .pptx from text prompt, style, and other requirements |
| Upload reference document | Upload a visual reference image or outline file to apply to PPT design |
| Check task status | Poll a generation task by taskId to check progress |
| Download result | Retrieve the .pptx download URL directly from the task result |
Generations run asynchronously. By default, the skill submits the task and polls automatically until complete. Pass --no-wait to receive a taskId immediately and check progress manually with the status command. | |
Workflow
Step 0: Check environment (required)
Before running, verify config:
node "<skills-dir>/surgepix-setup/scripts/check_env.mjs"
- Exit 0 → proceed to Step 1
- Exit 1 → follow surgepix-setup skill to configure
.env, then retry
Step 1: Gather inputs
At least one of
--promptor--outlineis required.- Prompt (optional): text describing the presentation topic, purpose, and key points.
- Outline (optional): local file path or document URL. Script uploads automatically. Supported formats:
doc,docx,pdf,txt,md,html,pptx— max 50MB - Slide count (optional, default
10, range5 - 30): use--n - Aspect ratio (optional, default
16:9):16:9(widescreen) /4:3(standard) - Style (optional): layout and typography preset. Choose from:
modern/corporate/creative/minimal/tech. Use as a quick shorthand for visual direction; omit if--promptPreset Styles section below for detailed descriptions. - Language (optional, default: auto-detect from user's input language):
zh/en/ja - Session ID (optional): if the user is iterating on a previous result, ask them to provide the
sessionID(number type) printed by the last run. If this is a fresh request, omit it — the platform auto-creates a new session. - Local outline file → script uploads automatically, then calls API
- Outline URL → script uses it directly
Step 2: Run generate-presentation
node "<skills-dir>/surgepix-generate-presentation/scripts/generate_presentation.js" \ [--prompt "<text>"] [--outline "<path-or-url>" ...] \ [--n <5-30>] [--aspect-ratio <16:9>] [--style <name>] \ [--language <zh|en|ja>] [--session-id <id>]
Flag Description --prompt <text>Text describing the presentation topic, purpose, and key points --outline <path-or-url>Outline document (local path auto-uploaded; repeatable for multiple files) --n <5-30>Number of slides, default 10 --aspect-ratio <ratio>Aspect ratio, default 16:9 (e.g. 16:9,4:3)--style <name>Layout preset: modern/corporate/creative/minimal/tech--language <code>Output language: zh/en/ja--session-id <id>Session ID; pass the sessionId(number type) from a previous run to iterateThe script always uses asynchronous mode (internal
noWait=true) — it submits the task and automatically polls until complete.Step 3: Parse output
Success (stdout):
{"ok":true,"taskId":"task_xxx","sessionId":123,"progress":"succeeded","download":"https://...presentation.pptx"}
Failure (stderr):
{"ok":false,"error":"..."}
Step 4: Present result
- On success: Show the download URL. Always show
sessionId(note: it is a number type, e.g.123) so the user can pass it in a retry if needed - On failure: Report the
errorfield. Common causes:- Missing required parameter — neither
--promptnor--outlineprovided - Unsupported outline format — file format not supported
- Outline file too large — exceeds 50MB
--nout of range or invalid--languagecode- Generation failed — internal error; retry or simplify the prompt
- Missing required parameter — neither
- The result is automatically attached to the session (auto-created or reused). The user can open the platform frontend to see all iterations in one place.
- If the user is not satisfied and wants to iterate, instruct them to pass
--session-id <sessionId>(number type) in the next run — both versions appear in the same session history on the frontend.
- On success: Show the download URL. Always show
Rules
- ALWAYS run
check_env.mjsbefore first use in a session - Provide at least
--promptor--outline --nmust be an integer between 5 and 30- If the user wants to iterate, they pass
--session-id 123in the next run — both versions appear in the same session on the frontend. - If
--session-idis omitted, the platform auto-creates a new session for the run. - The
.pptxdownload URL is valid for 24 hours; download before it expires. - Supported outline formats:
doc,docx,pdf,txt,md,html,pptx— max 50MB. - NEVER pass local outline paths to the API — script handles upload internally
- NEVER invent download URLs — only use the
downloadvalue from the output - NEVER echo auth tokens in logs or output
Create & Edit Visuals with AI
© 2026 SurgePix. All rights reserved. Made with ❤️ for productivity.