Google Slides
Purpose
Manage Google Slides through hatch_gws_cli; the vendored Google Workspace CLI is the only implementation path.
Tooling
Use exec to run:
hatch_gws_cli slides <resource> <method> [flags]
Connection management
hatch_gws_cli slides status
hatch_gws_cli slides disconnect
Slides operations
Core patterns:
hatch_gws_cli slides status
hatch_gws_cli slides disconnect
hatch_gws_cli schema slides.presentations.get
hatch_gws_cli schema slides.presentations.create
hatch_gws_cli schema slides.presentations.batchUpdate
Common raw API calls:
hatch_gws_cli slides presentations get --params '{"presentationId":"<presentation_id>"}'
hatch_gws_cli slides presentations create --json '{"title":"Quarterly Review"}'
hatch_gws_cli slides presentations batchUpdate --params '{"presentationId":"<presentation_id>"}' --json '{"requests":[{"createSlide":{"slideLayoutReference":{"predefinedLayout":"TITLE_AND_BODY"}}}]}'
JSON output contract:
status: parse status, connect_url, and disconnect_url
disconnect: parse ok, action, status, and disconnect_url
Composing presentation content
Never compose a deck through presentations create plus batchUpdate element inserts, whether new or rebuilt. Build it as a presentation artifact first. The artifacts tool writes a .pptx under ~/workspace/your_files/<artifact-slug>/. Then put it in Google.
- Mint the empty presentation with
hatch_gws_cli slides presentations create --json '{"title":"<title>"}'.
- Fill it from the built file:
hatch_gws_cli drive files update --params '{"fileId":"<presentation_id>"}' --upload "$JARVIS_HOME/workspace/your_files/<artifact-slug>/<name>.pptx". Drive converts the upload into the Google Slides deck in place. The path must be absolute and inside the home directory. Relative and /tmp paths fail.
- Read it back with
presentations.get before you call it ready, and confirm the page count matches the artifact. Say in your reply that the slides are pictures, so the text cannot be edited in Slides.
- To revise, edit the artifact and re-upload to the same presentation ID. The artifact is the working copy. The upload replaces every slide, so it discards any edits made in Google since, including the user's. Read the published copy back first. If it changed, say so and wait for a yes.
Auth
Authentication is handled by the wrapper's status and disconnect subcommands. Do not hand-write credential files or run raw gws auth ....
First-use setup flow
- Run
hatch_gws_cli slides status.
- If
status is unavailable, tell the user that Google Slides is not available on this device. Do not offer alternative integration approaches or ask the user for credentials.
- If
status is not_connected and connect_url is present, replace <connect_url> with the returned URL and share exactly this Markdown link: [Connect Google Slides](<connect_url>); do not paste the raw URL separately. Wait for the user to reconnect.
- Once
status is connected, proceed with Slides operations.
Operating Rules
- Use
schema before unfamiliar Slides methods so --params and --json match the current vendored CLI contract.
- Creating a presentation and editing a presentation owned only by the user may proceed from a clear request. Confirm before editing a shared presentation because its contents can be exposed to or changed for other people.
- Treat presentation IDs, page object IDs, and element IDs as opaque strings.
- Run
hatch_gws_cli slides disconnect. After running it, when disconnect_url is present, replace <disconnect_url> with the returned URL and share exactly this Markdown link: [Disconnect Google Slides](<disconnect_url>); do not paste the raw URL separately.
- Use
presentations.get before modifying an existing deck so you understand the current page and object structure.
- After a read or write action, confirm the user-visible result only. Do not surface raw API identifiers (presentation, page object, and element IDs) or other internal response fields (revision IDs, raw JSON) in text shown to the user unless the user asks for them or you need them to troubleshoot a failure; keep using them internally to chain follow-up commands.
1---2name: google-slides3description: "Read, create, and edit the user's Google Slides presentations."4icon: "google_slides"5metadata:6 source: https://skillmd.com/skills/win4r/google-slides7 includeInPrompt: false8---910# Google Slides1112## Purpose13Manage Google Slides through `hatch_gws_cli`; the vendored Google Workspace CLI is the only implementation path.1415## Tooling16Use `exec` to run:1718```sh19hatch_gws_cli slides <resource> <method> [flags]20```2122### Connection management2324```sh25hatch_gws_cli slides status26hatch_gws_cli slides disconnect27```2829### Slides operations3031Core patterns:32- `hatch_gws_cli slides status`33- `hatch_gws_cli slides disconnect`34- `hatch_gws_cli schema slides.presentations.get`35- `hatch_gws_cli schema slides.presentations.create`36- `hatch_gws_cli schema slides.presentations.batchUpdate`3738Common raw API calls:39- `hatch_gws_cli slides presentations get --params '{"presentationId":"<presentation_id>"}'`40- `hatch_gws_cli slides presentations create --json '{"title":"Quarterly Review"}'`41- `hatch_gws_cli slides presentations batchUpdate --params '{"presentationId":"<presentation_id>"}' --json '{"requests":[{"createSlide":{"slideLayoutReference":{"predefinedLayout":"TITLE_AND_BODY"}}}]}'`4243JSON output contract:44- `status`: parse `status`, `connect_url`, and `disconnect_url`45- `disconnect`: parse `ok`, `action`, `status`, and `disconnect_url`4647## Composing presentation content4849Never compose a deck through `presentations create` plus `batchUpdate` element inserts, whether new or rebuilt. Build it as a presentation artifact first. The artifacts tool writes a `.pptx` under `~/workspace/your_files/<artifact-slug>/`. Then put it in Google.50511. Mint the empty presentation with `hatch_gws_cli slides presentations create --json '{"title":"<title>"}'`.522. Fill it from the built file: `hatch_gws_cli drive files update --params '{"fileId":"<presentation_id>"}' --upload "$JARVIS_HOME/workspace/your_files/<artifact-slug>/<name>.pptx"`. Drive converts the upload into the Google Slides deck in place. The path must be absolute and inside the home directory. Relative and `/tmp` paths fail.533. Read it back with `presentations.get` before you call it ready, and confirm the page count matches the artifact. Say in your reply that the slides are pictures, so the text cannot be edited in Slides.544. To revise, edit the artifact and re-upload to the same presentation ID. The artifact is the working copy. The upload replaces every slide, so it discards any edits made in Google since, including the user's. Read the published copy back first. If it changed, say so and wait for a yes.5556## Auth57Authentication is handled by the wrapper's `status` and `disconnect` subcommands. Do not hand-write credential files or run raw `gws auth ...`.5859## First-use setup flow601. Run `hatch_gws_cli slides status`.612. If `status` is `unavailable`, tell the user that Google Slides is not available on this device. Do not offer alternative integration approaches or ask the user for credentials.623. If `status` is `not_connected` and `connect_url` is present, replace `<connect_url>` with the returned URL and share exactly this Markdown link: `[Connect Google Slides](<connect_url>)`; do not paste the raw URL separately. Wait for the user to reconnect.634. Once `status` is `connected`, proceed with Slides operations.6465## Operating Rules661. Use `schema` before unfamiliar Slides methods so `--params` and `--json` match the current vendored CLI contract.672. Creating a presentation and editing a presentation owned only by the user may proceed from a clear request. Confirm before editing a shared presentation because its contents can be exposed to or changed for other people.683. Treat presentation IDs, page object IDs, and element IDs as opaque strings.694. Run `hatch_gws_cli slides disconnect`. After running it, when `disconnect_url` is present, replace `<disconnect_url>` with the returned URL and share exactly this Markdown link: `[Disconnect Google Slides](<disconnect_url>)`; do not paste the raw URL separately.705. Use `presentations.get` before modifying an existing deck so you understand the current page and object structure.716. After a read or write action, confirm the user-visible result only. Do not surface raw API identifiers (presentation, page object, and element IDs) or other internal response fields (revision IDs, raw JSON) in text shown to the user unless the user asks for them or you need them to troubleshoot a failure; keep using them internally to chain follow-up commands.