# Build Slides

> Guides intake, gathers context from Google Docs, Gmail, meeting notes, and the web, drafts an executive slide summary for approval, then inserts slides into a user-provided Google Slides deck. Use when the user asks to build slides, add a slide to a deck, create presentation content, or summarize a topic on slides.

- Skill: `cgray-redhat/build-slides` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx skillmds@latest add cgray-redhat/build-slides`
- Raw SKILL.md: https://api.skillmd.com/api/skills/cgray-redhat/build-slides/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: cgray-redhat (https://skillmd.com/u/cgray-redhat)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/cgray-redhat/build-slides

---


# Build Slides

Research a topic, draft executive slide content for user approval, then insert slide(s) into an existing Google Slides deck the user provides.

## Prerequisites

1. Run **refresh-connections** for `gws` before gathering.
2. Required scopes: `drive`, `documents`, `presentations`, `gmail`, `calendar`. If auth fails: `gws auth login`.
3. Read `ME.md` and `TEAM.md` at the project root (if present) for voice and program framing.

## Workflow

```
Build Slides:
- [ ] Step 0: Intake — topic, deck, placement, layout, sources
- [ ] Step 1: Gather context
- [ ] Step 2: Synthesize and get user approval
- [ ] Step 3: Resolve images (if any)
- [ ] Step 4: Insert slides
- [ ] Step 5: Confirm with deck link and sources
```

---

## Step 0 — Intake

Gather before any API writes. Use **AskQuestion** when available; otherwise ask in one message.

| Area | Questions |
|------|-----------|
| **Topic** | What is the slide about? What decision or narrative does it support? |
| **Deck** | Google Slides URL or presentation ID (required) |
| **Placement** | Append at end, insert after slide N, or replace slide N |
| **Layout** | Duplicate slide #X from this deck **or** use standard Title + Body layout |
| **Scope** | 1 executive slide (default) or 2–3 slides if topic is broad |
| **Sources** | Google Docs, Gmail, meeting notes, web (multi-select) |
| **Meeting** | If meetings: title and approximate date |
| **Specific files** | Optional Doc/Slide URLs to prioritize |
| **Audience** | Executive leadership, internal team, customer-facing |
| **Images** | Include images? Prefer source-doc images, web diagrams, or none |

**Gate:** Do not gather or write until deck URL and topic are confirmed.

---

## Step 1 — Gather context

Parse the deck ID from the URL (see [reference.md](reference.md)), then run:

```bash
python3 ~/.cursor/skills/build-slides/scripts/gather_slide_context.py \
  --topic "<TOPIC>" \
  --deck-id "<PRESENTATION_ID>" \
  [--days 30] \
  [--meeting-title "<TITLE>" --meeting-date YYYY-MM-DD] \
  [--doc-ids "id1,id2"] \
  --format json
```

**Web (agent-driven):** If the user enabled web sources, run `WebSearch` for recent relevant articles. Cite URLs in the summary. Do not invent facts.

If the script fails, follow the manual fallback in [reference.md](reference.md).

---

## Step 2 — Synthesize and approve

Present in chat **before writing to Slides**:

- Proposed slide title(s)
- 3–5 executive bullets per slide (decision-oriented, no jargon padding)
- Optional speaker notes (1–2 sentences)
- Image suggestions with source (doc embed, web URL, or skip)
- Slide count (1 vs 2–3) with rationale
- Sources consulted with links

Ask: *"Approve this content, or tell me what to change?"*

**Do not call `insert_slides.py` until the user approves.**

---

## Step 3 — Resolve images

Slides API `createImage` requires a publicly fetchable URL. See [reference.md](reference.md) for upload steps.

1. Prefer images from source docs or linked materials.
2. For web images: download, upload to Drive with `anyoneWithLink` permission, use `webContentLink`.
3. Skip if no suitable image or user declined images.

---

## Step 4 — Insert slides

Write approved content to a spec file, then run:

```bash
python3 ~/.cursor/skills/build-slides/scripts/insert_slides.py \
  --deck-id "<PRESENTATION_ID>" \
  --spec /tmp/slide-spec.json \
  --layout duplicate \
  --template-slide-index 3 \
  --insert-after 5
```

**`slide-spec.json`** shape:

```json
{
  "slides": [
    {
      "title": "Topic — Executive Summary",
      "bullets": ["Outcome-focused bullet", "Another bullet"],
      "speakerNotes": "Optional notes for presenter.",
      "images": [{ "url": "https://...", "alt": "Diagram" }]
    }
  ]
}
```

Layout flags:

- `--layout duplicate` — copy `--template-slide-index` (1-based) or `--template-slide-id`
- `--layout standard` — Title + Body layout from deck masters
- `--insert-after N` — 0 = beginning; omit to append at end
- `--replace-slide N` — replace existing slide (only when user explicitly chose this)

---

## Step 5 — Confirm

- Link to the deck (include slide index when known)
- List sources used
- Note any `[needs input]` gaps or image fallbacks
- Offer to revise content or add another slide

## Quality rules

- Facts trace to gathered sources only; mark gaps `[needs input]`
- Executive tone: short title, outcome-focused bullets, no filler
- Use `ME.md` / `TEAM.md` for framing only; do not invent program details
- Never overwrite existing slides unless user explicitly chose "replace slide N"
- Images must be relevant; skip rather than use decorative stock

## Example prompts

1. "Build a slide about SUSE Pre-emptive in my working deck from recent emails and docs"
2. "Add an executive summary slide after slide 2 in [deck URL] from yesterday's FLT meeting notes"
3. "Create a customer-facing slide on Mythos security using our strategy doc and web research"

## Additional resources

- [reference.md](reference.md) — gws commands, deck parsing, batchUpdate patterns, image upload, manual fallback

