一键导入
learn-template
Guide template ingestion end to end: learn a PPTX, inspect and edit the manifest, smoke-test template-backed layouts, then hand off to create-deck.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Guide template ingestion end to end: learn a PPTX, inspect and edit the manifest, smoke-test template-backed layouts, then hand off to create-deck.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Build consulting-grade presentations from a natural-language brief using a 4-phase Pre-flight -> Storyline Review -> Build -> QA workflow on top of the agent-slides CLI.
Run one experiment cycle of the demo research loop. Reads program-demo.md for the current lane and hypothesis, applies a fix, builds all benchmarks, scores them, and records results.
Modify an existing agent-slides deck in place. Inspect → smallest mutation → validate. Handles layout switches, slot edits, content changes, rebinding, and batch operations.
Run rendered visual QA on an `agent-slides` deck using LibreOffice slide screenshots, a scored checklist, and optional auto-fixes for common issues.
Review an `agent-slides` deck for storytelling quality, narrative structure, message coverage, and content density without drifting into rendered visual QA.
Run the final pre-share polish pass on an `agent-slides` deck. Checks structural completeness, source lines, formatting consistency, and content completeness, then applies only safe mechanical fixes.
| name | learn-template |
| description | Guide template ingestion end to end: learn a PPTX, inspect and edit the manifest, smoke-test template-backed layouts, then hand off to create-deck. |
Use this skill when the user provides a .pptx template and wants to make it usable with agent-slides.
In this repo, prefer uv run agent-slides ... so the checked-out CLI is used.
Treat uv run agent-slides contract as the canonical command contract instead of inferring behavior from older docs or wrappers.
heading, subheading, body, col1, col2, image.source and the template digest in source_hash. Moving or modifying the PPTX after learning can break or stale the manifest.theme data carries the template's colors, fonts, and spacing into template-backed decks.Run the work in eight steps:
create-deckStart with a concrete PPTX path. Prefer an absolute path or a repo-relative path that will remain stable.
Quick existence check:
test -f template.pptx
If the file is missing, stop and correct the path before doing anything else.
Extract the template manifest:
uv run agent-slides learn template.pptx -o manifest.json
Read both stdout and stderr:
source, layouts_found, and usable_layoutsIf the command fails with Template file not found, the path is wrong.
If stderr warns that the template has 0 usable layouts, the template is built from arbitrary shapes rather than typed placeholders. That is outside v0 template ingestion; document that Approach B or full template intelligence would be needed.
Summarize the learned manifest:
uv run agent-slides inspect manifest.json
Also inspect the raw JSON before trusting it:
uv run python -m json.tool manifest.json
Present these findings:
sourcelayouts_foundusable_layoutstheme_extractedslugusableslotsTreat the inspect output as the fast summary and the raw JSON as the source for manual corrections.
Review every learned layout, not just the first usable one.
For each layout, show:
name and slugusableslot_mappingIn an interactive run, ask whether the slot names make sense. In an unattended run, make the judgment yourself from placeholder names, placeholder bounds, and layout structure, then record the assumption.
Use these review rules:
heading.subheading.body.col1 and col2.image.col2. If it behaves more like a sidebar, either leave it unmapped or mark the layout unusable.Flag ambiguous cases explicitly:
Edit manifest.json directly when the learned slot mapping is wrong or too optimistic.
Safe edits:
slot_mapping to the correct v0 namesslot_mapping"usable": false on layouts you want the CLI to ignoreDo not invent new slot names outside:
heading, subheading, body, col1, col2, image
Do not casually edit these fields:
sourcesource_hashindexmaster_indexthemeboundsThose fields come from the learned template and should normally change only by re-running learn.
Example manual correction:
{
"slug": "agenda",
"usable": true,
"slot_mapping": {
"heading": 0,
"body": 1
}
}
Example of disabling a misleading layout:
{
"slug": "sidebar_heavy",
"usable": false,
"slot_mapping": {
"heading": 0,
"col1": 1,
"col2": 2
}
}
If the template PPTX was modified after learning, build will warn that the template changed. Treat that as a stale manifest and re-run:
uv run agent-slides learn template.pptx -o manifest.json
Do a smoke test before handing the manifest to create-deck.
First initialize a template-backed deck:
uv run agent-slides init test.json --template manifest.json
Then add two slides using usable layouts from the inspected manifest:
uv run agent-slides slide add test.json --layout <title_or_first_usable>
uv run agent-slides slide add test.json --layout <content_or_second_usable>
Populate the slots that actually exist on those layouts. For a heading/body layout:
uv run agent-slides slot set test.json --slide 0 --slot heading --text "Template Smoke Test"
uv run agent-slides slot set test.json --slide 0 --slot subheading --text "Verify title styling and subtitle mapping"
uv run agent-slides slot set test.json --slide 1 --slot heading --text "Content Layout Check"
uv run agent-slides slot set test.json --slide 1 --slot body --text "Verify that learned text placeholders map cleanly into the template."
For a two-column layout, use:
uv run agent-slides slot set test.json --slide 1 --slot heading --text "Two-Column Layout Check"
uv run agent-slides slot set test.json --slide 1 --slot col1 --text "Left column content"
uv run agent-slides slot set test.json --slide 1 --slot col2 --text "Right column content"
Build the PPTX:
uv run agent-slides build test.json -o test.pptx
If a supposedly usable layout cannot accept the slots you expected, go back to manifest review rather than forcing bad content into the wrong layout.
Prefer unattended confirmation first:
uv run agent-slides review test.json
Inspect test.review/report.md and the rendered slide PNGs to verify that:
If the environment can open desktop files, you can also spot-check the built deck directly:
open test.pptx
If build warns that the template changed after learning, the manifest is stale. Re-run learn, then repeat the smoke test.
Once the manifest is clean and the smoke test passes, hand off to create-deck:
/create-deck --template manifest.json "make a deck about Q3 strategy"
At that point, create-deck should pick from the manifest's usable template layouts instead of the built-in layout set.