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-presentationGenerate 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.
| 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. | |
Step 0: Check environment (required)
Before running, verify config:
node "<skills-dir>/surgepix-setup/scripts/check_env.mjs"
.env, then retryStep 1: Gather inputs
At least one of --prompt or --outline is required.
doc, docx, pdf, txt, md, html, pptx — max 50MB10, range 5 - 30): use --n16:9): 16:9 (widescreen) / 4:3 (standard)modern / corporate / creative / minimal / tech. Use as a quick shorthand for visual direction; omit if --promptPreset Styles section below for detailed descriptions.zh / en / jasessionID (number type) printed by the last run. If this is a fresh request, omit it — the platform auto-creates a new session.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 iterate |
The 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
sessionId (note: it is a number type, e.g. 123) so the user can pass it in a retry if needederror field. Common causes:--prompt nor --outline provided--n out of range or invalid --language code--session-id <sessionId> (number type) in the next run — both versions appear in the same session history on the frontend.check_env.mjs before first use in a session--prompt or --outline--n must be an integer between 5 and 30--session-id 123 in the next run — both versions appear in the same session on the frontend.--session-id is omitted, the platform auto-creates a new session for the run..pptx download URL is valid for 24 hours; download before it expires.doc, docx, pdf, txt, md, html, pptx — max 50MB.download value from the outputCreate & Edit Visuals with AI
© 2026 SurgePix. All rights reserved. Made with ❤️ for productivity.