CommunityImagegithub.com

convert-slide-mockups

Rebuild selected image-based slides as editable objects in an existing Google Slides deck. Use for in-place conversion of flattened covers, screenshots, or slide mockups. Use the Presentations skill to build a new deck from scratch.

What is convert-slide-mockups?

convert-slide-mockups is a Claude Code agent skill that rebuild selected image-based slides as editable objects in an existing Google Slides deck. Use for in-place conversion of flattened covers, screenshots, or slide mockups. Use the Presentations skill to build a new deck from scratch.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/andmigque/slides/tree/HEAD/convert-slide-mockups

Installed? Explore more Image skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Convert slide mockups into editable Google Slides

Work on the requested slides in the original presentation. Identify them by slide object ID and run the conversion loop once per target. Keep the visual baseline, rollback copy, and verification evidence together in a fresh run directory.

Preflight

  • Deck access. Confirm a full get_presentation read, batch_update_presentation (Slides batchUpdate), Drive PDF export, copy_file, and list_file_revisions, or their native API equivalents. Confirm the exported file reference can be saved locally. Use streamed PDF export when the standard export hits its size limit.
  • Local tools. Check pdftoppm -v for independent rendering, tesseract --list-langs for the source language, and python -c "import fitz, PIL" for PyMuPDF and Pillow. Use one PyMuPDF build with 144 dpi support for all measurements. Pillow supports the gradient repair and is used by the verifier. OpenCV is optional for textured artwork.
  • Missing capability. Record the tool or permission, operation it blocks, and affected slide IDs. Use a documented equivalent when it supplies the same evidence. If a required capability is unavailable, report inaccessible before starting live writes.

1. Resolve the targets

Open the supplied URL or find the native presentation by exact title and version. Map every requested name or one-based slide number to an object ID. If several decks or slides match, stop and ask which one the user means. Save the ordered target IDs.

2. Capture the baseline

Save the complete presentation resource as before.json and export before.pdf. Confirm the PDF opens, its page count matches the JSON, and the Slides revision is still the one you read before export. Repeat the capture if it changed.

Set skill_dir to this skill’s absolute path and run_dir to the evidence directory. Check every baseline page before OCR or live edits, including non-target slides needed for verification. If a page exceeds the raster budget, stop and report incomplete with the file, page number, projected size, and limits.

python "$skill_dir/scripts/pdf_raster.py" check "$run_dir/before.pdf"
  • Deck. Record its ID, Slides revision ID, page dimensions, and ordered slide IDs.
  • Each target. Record the layout, placeholder and master relationships, notes, reading and stacking order, transitions, and object animations. Inspect playback in the Slides editor for behavior the API omits.
  • Each element. Record its ID, type, size, transform, crop, alt text, and links. Identify editable content to reuse and whether flattened artwork is an image element or a page background.

3. Measure and prepare each target

For each target ID, render its page at 144 dpi, extract the embedded image where possible, and use Tesseract word boxes to build an inventory of visible lines. Save their source text and ink bounds in points before editing. Flag any word below 85/100 for human review. Keep unresolved words as source artwork and report their locations.

Match fonts available in Google Slides at the measured size and weight. Record the family with the lowest rendered line-width error and its score. Separate foreground art and repair the background with a dilated mask. Measurement, font matching, and background repair

Source contentRebuild it as
Title, subtitle, or labelReused placeholder or native text box. Give independently movable parts separate IDs.
Bulleted or numbered listOne native paragraph per item with its original marker style, order, and nesting.
Quotation and attributionEditable text preserving the exact wording, punctuation, and placement of the source line.
Citation or footnoteEditable marker and matching source line. Restore a link only when its destination can be verified.
Table or chartNative table for legible cells or chart from confirmed source data. Keep a chart with unavailable data as an image and disclose it.
Diagram, photograph, or illustrationNative shapes and connectors for simple diagrams. Keep detailed art as images and isolate movable foreground parts.

4. Establish a rollback point

Before the first write, duplicate the entire native deck with Drive. Record the backup link, original Drive revision ID, and separate Slides revision ID. Verify the copy against the baseline and save original assets and the inverse operations for each planned batch. A concurrent change during backup requires a fresh baseline and matching backup. Backup and recovery procedure

5. Apply the conversion to each target

  1. For each target ID, reuse existing editable elements and choose stable IDs for new ones. Keep the slide ID, notes, and position. Place background artwork, foreground art, and native text in their measured stacking order.
  2. Group dependent requests into a revision-guarded batch. If uploads require multiple batches, stage the assets first and keep the original visible until the replacement and native text are ready. Carry the returned revision forward.
  3. Create native paragraphs before formatting their ranges. Preserve verified links, alt text, and reading order. Record the applied object IDs and expected post-write values in the recovery log. Worked batch, bullet presets, and transform example

After a timeout or revision conflict, re-read the live target and reconcile it with the log before sending another write. Allow at most three write attempts per logical batch, including the first. If the third attempt cannot be confirmed, stop conversion writes, follow the recovery procedure, and report failed.

6. Verify the final revision

Save the full live resource as after.json and export after.pdf from the same revision. After any correction, refresh both files and remeasure the affected text. Run the bundled verifier with target_ids set to the Bash array of all resolved IDs.

python "$skill_dir/scripts/compare_pages.py" "$run_dir" --targets "${target_ids[@]}" > "$run_dir/comparison.json"
  • Every measured line retains its wording and line break. Each ink-box edge is within 2 pt of its source position and each line width is within 2% of its source width.
  • Every target has mean absolute RGB difference ≤ 2.0 on the 0–255 scale at 144 dpi. Inspect seams, clipping, alignment, and duplicated artwork at presentation size.
  • Every non-target has zero pixels with any RGB channel differing by more than 4 and zero structural differences. Slide IDs, order, and shared layouts and masters match.
  • Check native text, independent selection, list nesting, quote attributions, citation links, image alt text, reading order, z-order, notes, layout and placeholder inheritance, transitions, and animations. Inspect playback before and after for properties absent from the API. Mark any unverified check in the result. Verification evidence and exit codes

7. Report the result

Use the block below, including when the run stops early. Select exactly one status and give the reason for any unavailable artifact. Status definitions

**Status** <complete and verified | incomplete | inaccessible | failed>
**Presentation** <verified deck URL>
**Target slides** <one-based numbers and slide object IDs>

| Slide ID | Object ID | Type | Editable or image |
| --- | --- | --- | --- |
| <slide ID> | <object ID> | <text box, list, table, image, etc.> | <editable or image> |

**Residual differences** <slide/object, failed check, measured value and limit, or none>
**Recovery** <backup URL, original Drive revision ID, rollback outcome>
**Artifacts** <paths to before.json, after.json, before.pdf, after.pdf, text-bounds.json and comparison.json>

Related Skills