Skip to main content

Edit Slides

Refine and modify slides that have already been built. This guide covers editing slide layouts with natural language prompts, understanding how your text edits are preserved, adding build animations, and previewing changes.

Prerequisites

Before editing slides, make sure you have:

  • At least one built slide in your deck (run /pitchsmith:build-one or /pitchsmith:build-all first -- see Build Slides)
  • Claude Code running in your project directory

Edit with Natural Language

Change a slide's layout, structure, or visual design by describing what you want in plain English. Pitch Smith interprets your prompt and regenerates the slide while preserving your text edits.

  1. Open a Claude Code session in your project directory.

  2. Run the edit command:

    /pitchsmith:edit

    In single mode (one slide at a time), this opens the current slide for editing. In deck mode, Pitch Smith asks you which slide to edit. You can also specify a slide number directly:

    /pitchsmith:edit 3
  3. Pitch Smith loads the slide and displays a summary of its current state: layout type, number of editable fields, and how many times it has been edited.

  4. When prompted, describe the layout change you want. For example:

    • "Move the title to the left and add a sidebar with bullet points on the right"
    • "Change this to a two-column layout with an image placeholder on the left"
    • "Make the background darker and increase the font size of the heading"
  5. Pitch Smith confirms your request, then regenerates the slide with the new layout while keeping any text you have manually edited.

Verify: Edit applied successfully

After the edit completes, open the slide in the Slide Viewer or browser. Confirm that:

  • The layout change you requested has been applied
  • Any text you previously edited by hand is still present (not overwritten)
  • The slide still uses your brand theme (colors, fonts, shapes)

If the edit did not produce the result you wanted, run /pitchsmith:edit again with a more specific prompt. You can iterate as many times as needed.

How natural language editing works

When you run /pitchsmith:edit, Pitch Smith reads the current slide HTML, understands its structure (which elements are headings, body text, images, and so on), and uses AI to regenerate the layout based on your prompt. The key difference from building a new slide is that the edit command also reads your state file to preserve any text you have manually typed into the slide.

Text Preservation Across Edits

When you edit text directly on a slide (for example, by clicking on a heading in the Slide Viewer and typing), Pitch Smith saves those changes in a state file alongside the slide HTML. When you later run /pitchsmith:edit to change the layout, your manual text edits are preserved and applied to the new layout.

How It Works

  1. Each slide has a companion state file (for example, slide-3-state.json) that tracks which text fields you have modified.
  2. When you type in an editable field on the slide, the auto-save mechanism writes your changes to the state file.
  3. When /pitchsmith:edit regenerates the slide layout, it reads the state file and re-applies your text to the matching fields in the new layout.

Caveats

  • Field matching is by name. Text preservation maps your edits by the data-field attribute on each element. If a layout change removes a field entirely (for example, removing a subtitle element), the text for that field cannot be placed automatically.
  • New fields start empty. If a new layout adds fields that did not exist before, those fields start with placeholder text from the plan or template.
  • Manual text in removed fields is not lost. The state file retains all your edits. If you revert to a layout that includes the removed field, your text reappears.
Verify: Text preserved after layout change
  1. Open a slide in the Slide Viewer and manually edit a heading or body text field.
  2. Wait a moment for auto-save to write the change (the viewer saves automatically).
  3. Run /pitchsmith:edit and request a layout change (for example, "switch to a two-column layout").
  4. After the edit completes, open the slide again.

Expected: Your manually typed text appears in the corresponding fields of the new layout. The state file at output/<deck-slug>/slides/slide-<n>-state.json contains your edits.

Add Animations

Add build animations to a slide so that elements appear in sequence during a presentation. Pitch Smith uses AI to analyze the slide's content structure and create logical animation groups.

  1. Run the animate command for a specific slide:

    /pitchsmith:animate 3

    Replace 3 with the number of the slide you want to animate.

  2. Pitch Smith analyzes the slide's DOM structure, classifies elements (headings, bullet points, images, charts), and generates animation groups based on the content's narrative flow.

  3. Pitch Smith presents an animation plan showing which elements appear in each build step. Review the plan and approve it.

  4. Once approved, Pitch Smith applies the animations by adding build IDs to elements, updating the slide manifest, and regenerating the viewer.

Verify: Animations applied

Open the slide in the Slide Viewer and enter presentation mode (press F for fullscreen or use the toolbar button). Step through the slide using the right arrow key or spacebar.

Expected: Elements appear in sequence according to the animation groups. Each press of the arrow key reveals the next group of elements.

If no animation occurs, run /pitchsmith:refresh to ensure the manifest is up to date.

Animation tips
  • Animations work best when slides have clear content hierarchy -- headings, then sub-points, then supporting visuals.
  • You can re-run /pitchsmith:animate on the same slide to regenerate animation groups with different grouping.
  • The Slide Viewer's animation builder also provides a visual interface for creating and editing animation groups directly.

Preview Changes

After editing a slide or adding animations, preview the result in the Slide Viewer.

Auto-Refresh

If the Slide Viewer is already open, it detects file changes on disk and refreshes automatically. After running /pitchsmith:edit or /pitchsmith:animate, the viewer should update within a few seconds without manual intervention.

Manual Refresh

If the viewer does not update automatically, or if you want to force a refresh of the slide manifest:

/pitchsmith:refresh

This regenerates the manifest.json file for your deck, which tells the viewer about all available slides, their titles, and animation data. After running refresh, the viewer picks up any newly built, edited, or animated slides.

Verify: Viewer shows latest changes

After running /pitchsmith:refresh, check the Slide Viewer:

  • Newly built slides appear in the thumbnail sidebar
  • Edited slides show their updated layout
  • Animated slides play build animations in presentation mode

If the viewer still shows stale content, close and re-open it from the Command Palette (Pitch Smith: Open Slide Viewer).

See Also

Related documentation

The following pages provide deeper context on the concepts used in this guide:

  • Build Slides -- Build slides from your deck plan before editing them
  • Quickstart -- Build your first slide from scratch in five steps
  • Core Concepts: Slides -- How slide generation and editing work under the hood (coming soon)
  • Core Concepts: Workflows -- The command system that powers Pitch Smith (coming soon)
  • Reference: Commands -- Complete command reference with options and examples (coming soon)