Replace the visual template of an existing HTML slide project while preserving its content. Use when a user asks to change, apply, or replace a PPT template for an existing project, a specific slide, or an explicit page range and provides a template_code or a template selected from the template picker. Do not use for creating templates or converting native PPTX files.
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Use this skill when the input asks to apply an existing platform template to an existing HTML slide project. The command includes the exact template_code and an explicit scope. Whole-deck requests mention the current PPT project; single-slide requests mention only the target slide HTML file. The user may also name a page range such as pages 3-5.
The command is intentionally concise. Apply this skill's defaults even when the message does not repeat them; treat explicit user notes as overrides.
Do not load slide-template-maker. This skill only applies an existing platform template.
.pptx, .ppt, .potx, .pot, or .ppsx file, refuse and explain that this skill cannot edit native PowerPoint files.template_code from the platform template picker or upstream context. Never infer a code from a display name, URL, or local directory.@ mentions. If a required mention is missing, ask only for that missing node.@ mention. Do not require or ask for an additional whole-PPT or folder mention when the target file is present; use its file_path and project-local context to locate related resources.template_code, say that no replacement is needed and stop. Do not install, copy, or rewrite files. Do not infer a match from visual similarity.For an entire-deck request, call ask_user before changing files with exactly these choices:
新增一个 PPT (default): create a sibling result beside the current PPT.直接修改当前 PPT: edit the current PPT in place and rely on file history for recovery.Allow an optional natural-language note in the same question. If the question is skipped or times out, use 新增一个 PPT and an empty note.
Name a new sibling PPT as 原文件名-模板展示名, using the platform display name rather than template_code, and keep the original extension. If that name already exists, append -2, then -3, and so on. Example: 季度汇报-商务蓝.html already exists, so the next file is 季度汇报-商务蓝-2.html.
For a single-slide or explicit page-range request, do not ask this save-mode question. Modify only the requested pages in the current PPT.
Reuse the installation and resource rules from slide-template:
install_slides_template with the exact template_code.template.json first.template.json.theme.css and visual-spec.md when present.data-width / data-height or the equivalent fixed CSS size from the current PPT, then keep that width, height, and aspect ratio. Do not force 1920x1080, and do not resize the original PPT to the template's canvas.data-slot semantics, page count, and page order unless the user's note requests a change.transitions metadata, including explicit none overrides, during template replacement. A sibling project copies the same settings; if slide paths change, map overrides by the corresponding original path. Template assets do not define or replace the user's playback policy. Change transitions only on an explicit request, through update_slide_transitions.data-ppt-step and data-ppt-effect) on the elements that carry the same content. When a template rewrites the markup, put the same attributes on the replacement element for each configured one, keep nested items later than their container, and never invent steps the original did not have. If an element with steps was merged, split, or removed and its steps cannot be carried over, say so in the report instead of dropping them silently.index.html, magic.project.js, and slide-bridge.js unchanged unless the chosen save mode requires a new sibling project, and even then copy them as project infrastructure rather than rewriting their page list.theme.css or font list unless that change cannot affect other pages. A mixed result is allowed: requested pages use the new template, and every other page stays on the old template. Do not rewrite unrelated pages to make the deck look uniform.Before saving, check that the resulting HTML project still has the expected slide count, requested page scope, original canvas size, text/image/chart-data presence, local resource references, and valid template assets. Also compare the number of elements carrying data-ppt-step on each affected page before and after; any difference must be explained in the report. If installation, parsing, rendering, or saving fails, do not silently overwrite the original content; report the concrete failure and the available retry/recovery path.
Report the selected template display name and exact code, save mode, affected page numbers, original canvas size, resulting file/version, and any in-slide step settings that could not be carried over (with page numbers). Do not expose temporary installation paths.
dtyq/magic
0f1432c
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.