PPT Template Adaptation
Use this skill when the task is to rewrite an existing PPT template into a new deck while preserving the
template's visual logic. It consumes spec.json from pptx-template-parsing; do not start from a failed
generated deck or manually inferred shape indices.
This skill is intentionally self-contained. Do not read old external handbooks from previous projects.
What this skill enforces
- Parse first, generate second. If a slot, card count, or style is missing, fix parsing before adding generation fallback logic.
- Work page by page. Incremental runs keep original slide indices stable until the final full build.
- Keep one global outline as the source of truth for contents pages, section dividers, and section titles.
- Fill text before icons, logo, and images.
- Preserve parsed template style: geometry, alignment, theme colors, paragraph/run structure, and number badges unless the user asks for redesign.
- Replace icons and images only when semantics require it and a valid slot exists.
- Validate each page before moving on.
Inputs
- Original template
.pptx. - Parsed
spec.jsonfrompptx-template-parsing. - A
content_plan.jsonwithspec,output,asset_dir, optionalbrand,keep_slides, optionaloutline, andpages[].
Required workflow
- If no current
spec.jsonexists, runpptx-template-parsingfirst. - Read the parser
summary.txt; choose template slides whose roles and slot counts match the needed story. Avoid chart/table slides unless chart/table data will be supplied. - Scaffold a plan:
bashpython3 skills/ppt-template-adaptation/scripts/scaffold_content_plan.py \ --spec workspace/specs/<template>/spec.json \ --out workspace/plans/<deck>.content_plan.json \ --output-pptx workspace/out/<deck>.pptx
- Edit
keep_slides,outline, andpages[]. Map each page to existing slots only: titles totitle, free labels tolabels[], body boxes tobody[], repeated structures tocards[], semantic glyphs tocards[].icon, and photos/screenshots toimages[]. - Validate global text coherence:
bashpython3 skills/ppt-template-adaptation/scripts/validate_content_plan.py \ --plan workspace/plans/<deck>.content_plan.json
- Fill one or a few original slide indices at a time:
bashpython3 skills/ppt-template-adaptation/scripts/apply_content_plan.py \ --plan workspace/plans/<deck>.content_plan.json \ --pages 0,1 \ --render
- Review the rendered page when visual review is available. If the user will do visual review, provide the output files and continue with structural checks; do not use image tools when the user forbids it.
- Repeat the page loop until selected pages pass. Then run a full build without
--pagesso unused slides are dropped according tokeep_slides.
Debugging order
- Inspect parser output first:
summary.txt,spec.jsonfill_plan, card count,style.paragraphs, font availability, and visual obstacles. - If parsing is wrong, fix
pptx-template-parsing, rerun parsing, and rebuild the plan or affected pages. - If parsing is right but generation breaks style or layout, fix
ppt-template-adaptationapplication logic. - Use
--no-clear-unfilled,--skip-global-text-check, or--skip-image-resolveonly for deliberate diagnostics. Do not use them to declare a page complete.
Reference read order
Read only the references needed for the current task:
references/workflow.md— complete page-by-page workflow and acceptance criteria.references/text-coherence.md— contents/section outline consistency and text fitting.references/icon-fill.md— semantic icon replacement rules.references/image-fill.md— conservative image replacement and Tavily usage.
Example scripts
scripts/scaffold_content_plan.pyscripts/validate_content_plan.pyscripts/apply_content_plan.pyscripts/render_pages.pyscripts/tavily_image_service.py
Usage rule
Do not jump to the next page until the current page has passed validation. For visual validation, either review the render when allowed or hand the render artifact to the user for manual review.


