SKILL.md
PowerPoint CLI
For installation and requirements, see [README.md](README.md).
Batch Mode (recommended)
The server is stateful — create a presentation, then build it up, then save. Use the batch runner to execute multiple commands in a single session:
echo '<json>' | bun ~/.pi/agent/skills/powerpoint/powerpoint-batch.ts
bun ~/.pi/agent/skills/powerpoint/powerpoint-batch.ts recipe.json
bun ~/.pi/agent/skills/powerpoint/powerpoint-batch.ts --recipe '<json>'
Input format — a JSON object with a commands array:
{
"commands": [
{ "tool": "create_presentation" },
{ "tool": "add_slide", "args": { "title": "Hello World" } },
{ "tool": "manage_text", "args": { "slide_index": 0, "operation": "add", "left": 1, "top": 2, "width": 8, "height": 1, "text": "Body text", "font_size": 18 } },
{ "tool": "save_presentation", "args": { "file_path": "./output.pptx" } }
]
}
Output: JSON array of { tool, result } objects (or { tool, error } on failure).
The batch runner auto-injects presentationid into all commands after createpresentation/open_presentation, so you don't need to track it yourself.
Single-Command Mode
For one-off read operations, use the single-command CLI:
bun ~/.pi/agent/skills/powerpoint/powerpoint-cli.js <command> [flags]
bun ~/.pi/agent/skills/powerpoint/powerpoint-cli.js --help
Useful for inspection commands that don't need state:
bun <cli> list-slide-templates
bun <cli> get-template-info --template-id title_slide
bun <cli> get-server-info
Available Tools
Lifecycle
create_presentation— create empty presentationcreatepresentationfromtemplate— create from .pptx template:{ "templatepath": "./template.pptx" }openpresentation— open existing file:{ "filepath": "./deck.pptx" }savepresentation— save to file:{ "filepath": "./output.pptx" }getpresentationinfo— slide count, dimensions, propertiessetcoreproperties— set title, author, keywords, etc.
Slides
addslide— add a slide:{ "layoutindex": 1, "title": "Slide Title" }
- layoutindex: 0=Title, 1=Title+Content, 2=Section, 5=Blank, etc. - Optional: backgroundtype ("solid"/"gradient"), backgroundcolors, colorscheme
getslideinfo— shapes, layout info:{ "slide_index": 0 }extractslidetext— all text from a slide:{ "slide_index": 0 }extractpresentationtext— all text from all slides
Text Content
populateplaceholder— fill a layout placeholder:{ "slideindex": 0, "placeholder_idx": 1, "text": "Hello" }addbulletpoints— bullets in a placeholder:{ "slideindex": 0, "placeholderidx": 1, "bullet_points": ["A", "B", "C"] }manage_text— add/format text boxes:
``json { "slideindex": 0, "operation": "add", "left": 1, "top": 2, "width": 8, "height": 1, "text": "Hello", "fontsize": 24, "bold": true, "color": [0, 0, 0] } ` Operations: add, format, validate, format_runs`
Images
manage_image— add/enhance images:
``json { "slideindex": 0, "operation": "add", "imagesource": "./photo.png", "left": 1, "top": 2, "width": 4, "height": 3 } ` source_type`: "file" (default), "url", "base64"
Tables
add_table— add a data table:
``json { "slide_index": 0, "rows": 3, "cols": 4, "left": 1, "top": 2, "width": 8, "height": 3, "data": [["H1","H2","H3","H4"],["a","b","c","d"],["e","f","g","h"]] } ``
formattablecell— style a cell:{ "slideindex": 0, "shapeindex": 0, "row": 0, "col": 0, "bold": true, "bg_color": [68, 114, 196] }
Charts
add_chart:
``json { "slideindex": 0, "charttype": "bar", "left": 1, "top": 2, "width": 8, "height": 4, "categories": ["Q1","Q2","Q3"], "seriesnames": ["Revenue"], "seriesvalues": [[100, 200, 300]] } ` Note: series_values is an array of arrays (one inner array per series). Chart types: bar, column, line, pie, scatter, area, doughnut`
updatechartdata— replace data on existing chart
Shapes & Connectors
add_shape:
``json { "slideindex": 0, "shapetype": "rectangle", "left": 1, "top": 1, "width": 3, "height": 2, "fillcolor": "4472C4", "text": "Box" } ` Types: rectangle, roundedrectangle, oval, triangle, diamond, arrow_right`, etc.
add_connector— lines/arrows between points:
``json { "slideindex": 0, "connectortype": "straight", "startx": 2, "starty": 3, "endx": 6, "endy": 3 } ``
Design & Styling
applyprofessionaldesign— apply themes:{ "operation": "applytheme", "colorscheme": "modern_blue" }
- Operations: applytheme, designslide, enhance_slide
applypictureeffects— shadow, reflection, etc.optimizeslidetext— auto-resize fonts:{ "slide_index": 0 }managefonts— analyze/optimize:{ "operation": "analyze", "fontpath": "./deck.pptx" }
Templates
listslidetemplates— list available layout templatesgettemplateinfo— details about a template:{ "templateid": "titleslide" }applyslidetemplate— apply template to existing slidecreateslidefrom_template— new slide from templatecreatepresentationfrom_templates— full deck from template sequenceautogeneratepresentation— auto-generate from topic:
``json { "topic": "Q4 Results", "slidecount": 8, "presentationtype": "business", "colorscheme": "modernblue" } ``
Other
manage_hyperlinks— add/remove/list linksmanageslidetransitions— set/remove transitionsmanageslidemasters— inspect master layouts
Reference
- Positions (
left,top) and sizes (width,height) are in inches. Standard slide is 10×7.5. - Slide indices are 0-based.
- Colors: hex RGB without
#for shape fills (e.g.,"4472C4"), RGB arrays[r, g, b]for text/cell colors. - Color schemes:
modernblue,corporategray,elegantgreen,warmred. - Tool names accept both
snake_caseandkebab-case.