google-slides
Google Slides
Route the Request
- Use
@presentationsto create a net-new presentation when no existing native Google Slides deck is the template or reference. - Use this skill to create a presentation by following an existing native Google Slides template, reference deck, or prior-period deck.
- Use this skill to edit, update, repair, restyle, or clean up an existing native Google Slides deck.
- If a request combines new content with an existing native Google Slides deck that must be followed, use this skill.
- Do not use this skill to author a blank or from-scratch presentation.
Parse a Template Deck
If code mode is unavailable in the current Codex environment, reproduce the same read-to-file, parse, and render workflow with the available connector and local tools. Preserve the same artifacts and validation steps; do not skip the workflow merely because code mode cannot be used.
For template or reference following, first use code mode to read the complete template/reference presentation directly into a file. Set SKILL_DIR to this skill's absolute directory and WORKSPACE to an absolute task workspace, then run this in one functions.exec call:
const SKILL_DIR = "<absolute-skill-directory>";
const WORKSPACE = "<absolute-task-workspace>";
const loaded = await tools.exec_command({
cmd: `/bin/cat -- '${SKILL_DIR}/host/read-template-to-file.mjs'`,
workdir: SKILL_DIR,
login: false,
yield_time_ms: 30000,
max_output_tokens: 20000,
});
if (loaded.exit_code !== 0) throw new Error("Could not load the template reader");
const { readTemplateToFile } = new Function(
`${loaded.output.replace(/^\s*export\s+/gm, "")}\nreturn { readTemplateToFile };`,
)();
const result = await readTemplateToFile({
presentationId: "<presentation-id>",
outputPath: `${WORKSPACE}/raw-template.json`,
workspaceRoot: WORKSPACE,
skillRoot: SKILL_DIR,
tools,
});
text(JSON.stringify(result));The reader omits the fields argument so the connector returns the full presentation resource, then writes the unmodified connector response to raw-template.json without placing it in model context.
Next, set NODE to the bundled Node.js executable returned by the workspace dependency loader and run:
"$NODE" "$SKILL_DIR/scripts/parse_template_design_system.mjs" \
--input "$WORKSPACE/raw-template.json" \
--output "$WORKSPACE/design-system.json" \
--catalog "$WORKSPACE/design-catalog.md"--catalog is optional. Use the JSON for master families, layout and placeholder IDs, inherited styles, theme colors, protected regions, and exemplar geometry. Use the catalog as a compact planning view. Confirm semantic and visual interpretations against rendered source slides; the parser derives structure but does not render the deck.
Render a Deck
Export a deck once as PDF and render every slide locally instead of fetching one thumbnail per slide. Set PDFTOPPM to pdftoppm inside the native-binaries directory returned by the workspace dependency loader, then run this in one functions.exec call:
const SKILL_DIR = "<absolute-skill-directory>";
const WORKSPACE = "<absolute-task-workspace>";
const PDFTOPPM = "<absolute-native-binaries-directory>/pdftoppm";
const loaded = await tools.exec_command({
cmd: `/bin/cat -- '${SKILL_DIR}/host/export-and-render-slides.mjs'`,
workdir: SKILL_DIR,
login: false,
yield_time_ms: 30000,
max_output_tokens: 30000,
});
if (loaded.exit_code !== 0) throw new Error("Could not load the slide renderer");
const { exportAndRenderSlides } = new Function(
`${loaded.output.replace(/^\s*export\s+/gm, "")}\nreturn { exportAndRenderSlides };`,
)();
const result = await exportAndRenderSlides({
presentationId: "<presentation-id>",
outputDir: `${WORKSPACE}/renders/<deck-name>`,
workspaceRoot: WORKSPACE,
skillRoot: SKILL_DIR,
designSystemPath: `${WORKSPACE}/design-system.json`,
pdftoppmPath: PDFTOPPM,
dpi: 120,
tools,
});
text(JSON.stringify(result));Use the helper as shown instead of calling Drive fetch or export_file directly. It automatically handles current reference-backed and legacy inline responses, writes presentation.pdf, and returns ordered PNGs mapped to native slide IDs. It fails if the PDF page count differs from the design system. Use a fresh output directory, then inspect every PNG with view_image; create a local contact sheet when useful.
Presentations location
Use/create ChatGPT at My Drive root. Place new presentations created from scratch or from a template there.
Edit existing presentations in place.
Respect user-specified locations.
Build From the Template
For template or reference following, copy the template once and edit only the copy.
Before making mutations, use the design catalog and rendered template slides to choose and record for every planned output slide:
- its narrative role;
- the native template exemplar slide ID or layout ID;
- whether it will be built by duplicating the exemplar or creating from the layout.
Match exemplars by narrative role, content density, evidence type, orientation, hierarchy, and meaning-bearing slots—not merely by object count or visual similarity. If the user links a particular template slide, inspect it explicitly and use it when it fits the requested role.
Do not use an exemplar containing device mockups, photography, screenshots, charts, or other meaning-bearing slide-local media unless every
