google-slides

Reads, edits, and builds Google Slides decks via the gws CLI and Slides API.

Updated Mar 29, 2024
One-click install
npx skills add https://github.com/petobens/ai-harness --skill google-slides-petobens
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: google-slides
Source: https://github.com/petobens/ai-harness/tree/main/skills/google-slides
Command: npx skills add https://github.com/petobens/ai-harness --skill google-slides-petobens

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Editing Google Slides programmatically is error-prone: text overflows boxes, styling gets lost during replacement, and new slides break a deck's visual design. This Skill provides a disciplined workflow for reading, inspecting, editing, and creating slides through the gws CLI while preserving the deck's template design and visual quality. ## Core Features & Use Cases - Read and inspect decks: Fetch full presentation JSON, extract slide text (including grouped elements and table cells), and surface objectIds, placeholder types, text run indices, and geometry needed for precise edits. - Edit text and styling safely: Replace placeholder text, restyle text runs over exact index ranges, and duplicate, delete, or reposition slides using atomic batchUpdate calls validated with --dry-run. - Template-first slide creation: Copy slides from the Muttdata template deck through an Apps Script web app so new slides preserve the original visual design instead of being built from scratch. - Visual verification: Render edited slides to PNG thumbnails and inspect them for overflow, clipping, and collisions before reporting done. - Use Case: You need to update a quarterly business review deck. The Skill inspects the deck, swaps in the new titles and metrics while preserving fonts and emphasis, copies a KPI template slide for a new section, and renders each changed slide to confirm nothing overflows. ## Quick Start Ask the assistant to read the Google Slides deck at your presentation URL and replace the title text on slide 2, then render it to verify the fit.

Frequently Asked Questions about google-slides

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I edit Google Slides text programmatically?

Use the Slides API batchUpdate endpoint through the gws CLI. Replace placeholder text with replaceAllText scoped by pageObjectIds, or delete and re-insert text in a shape while reapplying its captured style to preserve formatting.

How do I copy a slide from one Google Slides deck to another?

The Slides API cannot copy slides between presentations while preserving design, so this Skill routes the copy through a deployed Apps Script web app. Pass the source presentation ID, destination ID, and source slide objectId to the web app endpoint.

How do I check if text overflows a text box in Google Slides?

The deck JSON cannot reveal overflow, so render the slide with presentations pages getThumbnail at LARGE size and download the PNG. Inspect the image for overflow, clipping, collisions, and awkward wrapping before finishing.

What tools are required to automate Google Slides edits?

This workflow requires the gws CLI for Slides and Drive API calls, curl for the Apps Script web app and thumbnail downloads, jq for parsing deck JSON, and pass for retrieving the web app URL and secret.

Why does my gws command fail with a DNS or discovery error?

Google Slides reads and writes require network access, so sandboxed environments can block the request. Rerun the same gws command with escalated network permissions rather than treating it as an API or payload failure.

When should I not build a Google Slides slide from scratch?

Avoid creating slides from scratch whenever a suitable template slide exists. Copy the best structural match from the template deck first, then edit only the text content needed, preserving the original layout, typography, and spacing.