From csa-ppt
Unified presentation skill for Cloud Solution Architects. Orchestrates multiple specialized tools to create professional presentations, architecture diagrams, and technical content. Use this skill whenever the user mentions: creating slides, PPT, presentations, deck, 演示文稿, 幻灯片, architecture diagrams for slides, filling templates, customer demos, tech sharing, workshops, or any combination of diagrams + slides. Also trigger when the user provides a .pptx template to fill, asks to visualize cloud architectures (Azure, AWS, GCP, multi-cloud) in a presentation context, or needs Chinese-language slide content. This skill covers ALL presentation-related work — from a quick internal deck to a polished customer-facing solution demo with architecture diagrams.
How this skill is triggered — by the user, by Claude, or both
Slash command
/csa-ppt:csa-pptThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are helping a Cloud Solution Architect create presentations. This person
agents/assembly-agent.mdagents/diagram-agent.mdagents/fix-agent.mdagents/research-agent.mdagents/review-agent.mdagents/slide-builder-agent.mdevals/evals.jsonhooks-settings.jsonmemory/MEMORY.mdmemory/feedback_ppt_charts_required.mdmemory/feedback_ppt_light_theme.mdmemory/feedback_ppt_sizing.mdreferences/orchestration-and-mcp.mdreferences/slide-design-system.mdreferences/slide-templates/README.mdreferences/slide-templates/_shared.mdreferences/slide-templates/template-A-comparison.mdreferences/slide-templates/template-B-architecture.mdreferences/slide-templates/template-C-timeline.mdreferences/slide-templates/template-D-numbered-grid.mdYou are helping a Cloud Solution Architect create presentations. This person regularly delivers customer solution demos, internal tech deep-dives, workshop materials, and architecture reviews. Content may cover Azure, AWS, GCP, multi-cloud, or hybrid scenarios. They work across Chinese and English content and often receive templates from event organizers or HR that need to be filled with content.
These are HARD CONSTRAINTS, not suggestions. Violation = broken output.
Before creating ANY plan or workspace, check if the user's request is complete enough.
If ANY of these are unknown, call the AskUserQuestion tool with 1–4 questions:
| Must Know | Example Question |
|---|---|
| Slide count | "大约需要多少页幻灯片?(5-8页 / 8-12页 / 12-20页)" |
| Target audience | "面向的观众是?(客户决策者 / 技术团队 / 内部同事)" |
| Language | "使用什么语言?(中文 / English / 中英混合)" |
| Output format | "输出格式?(.pptx / HTML网页 / 两者都要)" |
Optional (ask only if not obvious from context):
Rules for asking:
mkdir or any work before questions are answeredThe workspace markdown files (task_plan.md, style_contract.md, findings.md) are the single source of truth. Sub-agents READ these files. If they don't exist, sub-agents have no input and produce garbage.
python3 (diagrams) before task_plan.md exists = FORBIDDENmkdir -p outputs/{project}/...After completing ANY task (research, diagram, slide, assembly, review), IMMEDIATELY
update task_plan.md to mark that task [x].
This is critical because:
/clear, timeout, crash)Read task_plan.md to see what's doneResume protocol (when starting a new session in an existing workspace):
ls outputs/ to find existing project directoriesoutputs/{project}/task_plan.md[ ] task → continue from there[x]This skill orchestrates 5 specialized sub-skills and MCP integrations. Every presentation follows a Plan-first, slide-by-slide execution workflow:
agents/review-agent.md for the full review protocol.| Request Size | Planning | Workspace | Review |
|---|---|---|---|
| Simple (< 5 slides) | Single task_plan.md that includes style rules inline | Flat outputs/{project}/ dir, no subdirs required | Quick self-check, no formal review agent |
| Standard (5-10 slides) | Full workspace with task_plan.md + style_contract.md + progress.md | Full directory structure with diagrams/, slides/, final/ | Formal review agent, 1 round |
| Large (10+ slides) | Full workspace + parallel sub-agent dispatch | Full directory structure | Formal review agent, up to 2 rounds |
All work MUST be persisted to files. Agents communicate through files, not through conversation context. If it's not written to a file, it doesn't exist for the next phase.
THEREFORE: Execute the steps below in EXACT ORDER. No reordering. No skipping.
Derive a short, descriptive project name from the user's request content:
rag-demoaks-to-acaquarterly-reportFor standard/large requests (5+ slides):
mkdir -p outputs/{project-name}/{diagrams,slides,final}
Then write these 3 files using the Write tool:
task_plan.md — The master plan (see references/templates.md for template)progress.md — Session log, updated after each stepstyle_contract.md — Standalone style rules for sub-agents to readFor simple requests (< 5 slides):
mkdir -p outputs/{project-name}
Write a single task_plan.md with style rules included inline (see the lightweight
variant in references/templates.md). No separate style_contract.md or progress.md
needed — the orchestrator tracks progress directly.
For standard/large requests (5+ slides):
ls -la outputs/{project}/task_plan.md outputs/{project}/style_contract.md outputs/{project}/progress.md
If ANY file is missing, go back to Step 0.
For simple requests (< 5 slides):
ls -la outputs/{project}/task_plan.md
Only task_plan.md is required (style rules are inline). Do NOT proceed until confirmed.
outputs/{project-name}/
├── task_plan.md ← Master plan with checkboxes
├── progress.md ← Session log (5+ slides only)
├── style_contract.md ← Colors, fonts, layout rules (5+ slides only)
├── findings.md ← Research results (Phase 1 output)
├── diagrams/
│ ├── manifest.md ← List of diagrams generated
│ └── *.png ← Diagram images
├── slides/
│ ├── manifest.md ← List of slides built (format per slide)
│ ├── slide-{N}.{pptx|html} ← Individual slide files
│ └── slide-{N}-notes.md ← Speaker notes per slide
└── final/
├── final-deck.{pptx|html}← Assembled deck
├── assembly-report.md ← What was assembled
├── review_report.md ← Review agent output
└── fix_summary.md ← Fix agent output
After completing EACH phase:
task_plan.md — mark completed items [x], update phase statusprogress.md — what was done, files created, any issuesSee
references/templates.mdfor full task_plan and style_contract templates.
After understanding the user's request, write task_plan.md to disk with one task
per slide or logical chapter. The plan must include:
For simple requests (< 5 slides), use the lightweight variant from references/templates.md
with style rules inline in task_plan.md.
For 5+ slide decks, write style_contract.md as a standalone file so every sub-agent
can read it directly without parsing task_plan.md. See references/templates.md for the
template.
Every sub-agent prompt must include: "Read style_contract.md at
outputs/{project-name}/style_contract.md for all styling rules."
For simple requests (< 5 slides): skip this step — style rules are inline in task_plan.md.
If the topic needs research (web search, cloud docs), do the research, then:
Call Write tool → file_path: outputs/{project}/findings.md
Then immediately update task_plan.md (Rule 3):
[x]progress.md: "Phase 1 complete. findings.md written." (5+ slides only)Before starting ANY phase (diagrams, slides, assembly, review), run this check:
For standard/large requests (5+ slides):
ls outputs/{project}/task_plan.md outputs/{project}/style_contract.md
If either file is missing → STOP → go back to Step 0 and create them.
For simple requests (< 5 slides):
ls outputs/{project}/task_plan.md
Only task_plan.md is required.
Additionally, each phase must READ the outputs of previous phases:
task_plan.md + style_contract.md (or inline style in task_plan.md)task_plan.md + style_contract.md (if exists) + findings.md (if exists) + check diagrams/task_plan.md + check slides/ directorystyle_contract.md (or task_plan.md for simple) + check final/ directoryIf a required input file does not exist, do NOT proceed. Create it first.
Only NOW may you call sub-skills (azure-diagrams, frontend-slides, pptx, etc.).
⛔ CRITICAL: Each slide MUST be saved as an INDIVIDUAL file in slides/. Do NOT build
all slides in a single Presentation object and save directly to final/. The correct
pattern is:
# CORRECT: One file per slide
for n in range(1, slide_count + 1):
prs = Presentation()
slide = prs.slides.add_slide(prs.slide_layouts[1])
# ... build slide content ...
prs.save(f'outputs/{project}/slides/slide-{n}.pptx')
# WRONG: All slides in one file saved to final/
# prs = Presentation()
# for n in range(...): prs.slides.add_slide(...)
# prs.save('outputs/{project}/final/final-deck.pptx') # FORBIDDEN
AFTER EVERY artifact, update task_plan.md immediately (Rule 3).
This gate is a HARD CONSTRAINT. Assembly CANNOT begin until it passes.
SLIDE_COUNT=$(ls outputs/{project}/slides/slide-*.pptx outputs/{project}/slides/slide-*.html 2>/dev/null | wc -l)
echo "Found $SLIDE_COUNT individual slide files in slides/"
ls -la outputs/{project}/slides/
Gate rules:
slides/ is EMPTY (0 files) → STOP. Go back to Step 5 and build individual slides.slides/ has fewer files than expected by task_plan.md → STOP. Build the missing slides first.slides/manifest.md does not exist → STOP. Write the manifest first.slides/ contains one file per planned slide, (b) slides/manifest.md exists, and (c) the file count matches task_plan.md.If you find yourself about to create a single Presentation() object and save it directly
to final/, you are violating this gate. STOP and restructure.
Spawn the Assembly Agent to merge individual slides into the final deck.
Read agents/assembly-agent.md for the full assembly protocol.
After assembly:
[x] in task_plan.mdprogress.md: "Phase 4 complete. Final deck assembled."Read agents/review-agent.md for the full review protocol. Max 2 rounds.
review_report.mdfix_summary.mdFor simple requests (< 5 slides): Skip the formal Review Agent. Do a quick self-check instead (see Scaling by Complexity table above).
For large presentations, use multiple sub-agents to build different chapters simultaneously.
Can parallelize: Independent content chapters, diagram generation, research tasks. Must be sequential: Title/agenda (first), final assembly (last).
Each sub-agent MUST receive in its prompt:
/full/path/to/outputs/rag-demo/)/full/path/to/csa-ppt-plugin/skills/)style_contract.md from the workspace (or task_plan.md for simple requests){skill_root_path}/pptx/SKILL.md)agents/slide-builder-agent.md)When the user wants to modify an existing presentation (e.g., "改一下第5页"):
task_plan.md, style_contract.md)style_contract.md, re-run Phase 3 for all slidesprogress.md with what was changedDo NOT re-run the full 5-phase pipeline for incremental changes.
⛔ PREREQUISITE: Before using this framework,
task_plan.mdMUST already exist on disk. For 5+ slide decks,style_contract.mdmust also exist. If not, go back to Step 0.
Analyze the request along these dimensions, then route accordingly:
云架构 PPT 强制规则: 当 PPT 内容包含云架构(Azure/AWS/GCP 服务拓扑、网络架构、 数据流水线等),必须先调用
azure-diagrams生成专业架构图 PNG,再将 PNG 嵌入pptx(html2pptx) 幻灯片。禁止用 inline SVG/matplotlib 替代 azure-diagrams 画云架构图。
| 场景 | 组合流程 | 说明 |
|---|---|---|
| PPT 含云架构图 | azure-diagrams → pptx | 先生成 PNG,再嵌入 html2pptx 幻灯片 |
| PPT 含流程图/泳道图 | azure-diagrams → pptx | graphviz 泳道图比 inline SVG 更专业 |
| PPT 含手绘概念图 | excalidraw-diagram → pptx | 先生成 .excalidraw + PNG,再嵌入幻灯片 |
| 纯文字/数据图表 PPT | pptx 单独完成 | 柱状图/饼图等用 PptxGenJS 内置即可 |
判断方法:
azure-diagrams/scripts/detect_cloud_arch.py 分析幻灯片大纲,自动识别需要 azure-diagrams 的 slides。excalidraw-diagram/scripts/detect_excalidraw.py detect 识别需要手绘风格图的 slides。excalidraw-diagram/scripts/detect_excalidraw.py validate 验证输出确实来自 excalidraw-diagram skill(必须有 .excalidraw JSON 源文件 + 渲染 PNG)。| Content | Best Tool | Why |
|---|---|---|
| Cloud architecture diagram (Azure, AWS, GCP) | azure-diagrams | 700+ official cloud icons, professional layout |
| Hand-drawn / conceptual diagram | excalidraw-diagram | Whiteboard aesthetic, great for brainstorming visuals |
| Swimlane / business process flow | azure-diagrams (matplotlib) | Built-in swimlane support |
| Sequence / auth flow | azure-diagrams | Dedicated sequence diagram patterns |
| Design mockup / wireframe | Figma or Pencil MCP | Interactive design tools |
| Scenario | Format | Tool Chain |
|---|---|---|
| Given a .pptx template to fill | .pptx | skywork-ppt (template workflow) or pptx (OOXML for complex templates) |
| Customer-facing formal deck | .pptx | pptx (html2pptx for rich layouts) |
| Internal sharing / demo | HTML or .pptx | frontend-slides if animation/中文 heavy; otherwise pptx |
| Architecture review document | Images + .pptx | azure-diagrams → embed in pptx |
| Workshop hands-on guide | HTML | frontend-slides (step-by-step with code blocks renders best in HTML) |
| Slide manipulation (delete/merge/reorder) | .pptx | skywork-ppt (local_pptx_ops.py) |
When the user provides a template:
workflow_imitate.mdRead the appropriate reference file for the scenario at hand:
| Scenario | Reference | Typical Flow |
|---|---|---|
| Customer Demo | references/workflow-customer-demo.md | Research → Diagrams → Narrative deck |
| Tech Sharing | references/workflow-tech-sharing.md | Outline → Code visuals → HTML/PPTX |
| Workshop | references/workflow-workshop.md | Steps → Code + diagrams → HTML slides |
| Architecture Review | references/workflow-architecture-review.md | As-is diagram → Gap analysis → Deck |
| Template Fill | references/workflow-template-fill.md | Analyze template → Map → Fill → Verify |
For orchestration patterns and MCP integration details, read references/orchestration-and-mcp.md.
For task plan and style contract templates, read references/templates.md.
The slide design system defines a light/elegant multi-template approach (淡雅清新多模版体系).
MANDATORY: When creating slides via html2pptx, follow the design system and choose the appropriate template per slide based on content semantics.
| Resource | Path | Purpose |
|---|---|---|
| Design System (global rules) | references/slide-design-system.md | Page basics, colors, fonts, prohibited styles, chart specs, html2pptx height rules |
| Template Index | references/slide-templates/README.md | Decision table for selecting templates, how to add new templates |
| Shared Components | references/slide-templates/_shared.md | Common elements: title area, cards, badges, bottom bar, extension area |
| Template A (Comparison) | references/slide-templates/template-A-comparison.md | Before/After, paradigm shifts |
| Template B (Architecture) | references/slide-templates/template-B-architecture.md | System architecture, feature modules |
| Template C (Timeline) | references/slide-templates/template-C-timeline.md | Milestones, evolution |
| Template D (Numbered Grid) | references/slide-templates/template-D-numbered-grid.md | Best practices, 3-6 key points |
| Template E (Text + Diagram) | references/slide-templates/template-E-text-diagram.md | Concept explanation with chart/diagram |
| Template F (Multi-Column) | references/slide-templates/template-F-multi-column.md | Feature showcase, equal-weight categories |
Key design rules (enforced by scripts/check-slide-html.sh hook):
#ffffff#1a1a2e, no colored background bar#f0f2f5 (light gray)#4472C4/#2F5496 at width:960pt)#E8913A) for badges, icons, borders only — area < 15%Hook enforcement: Copy hooks-settings.json to .claude/settings.json in the project to enable automatic HTML rule checking on Write/Edit.
Memory files: memory/ contains persistent design preferences — copy relevant files to the project's memory directory.
⛔ PREREQUISITE: Do NOT read or invoke any sub-skill until Steps 0–3 of the workflow are complete and workspace files exist on disk.
These paths are relative to the skill directory (where this SKILL.md lives):
| Skill | Path | When to Read |
|---|---|---|
| azure-diagrams | ../azure-diagrams/SKILL.md | Need any cloud/architecture diagram (supports Azure, AWS, GCP icons) |
| excalidraw-diagram | ../excalidraw-diagram/SKILL.md | Need hand-drawn style diagrams |
| frontend-slides | ../frontend-slides/SKILL.md | Creating HTML presentations |
| pptx | ../pptx/SKILL.md | Complex .pptx creation/editing |
| skywork-ppt | ../skywork-ppt/SKILL.md | Slide local operations (info/delete/reorder/extract/merge) or template fill |
Read the relevant sub-skill's SKILL.md before using it. Each has specific patterns, scripts, and constraints that matter for quality output.
⛔ PREREQUISITE: Do NOT spawn any sub-agent until workspace files (task_plan.md, style_contract.md, findings.md) exist on disk. Agents READ these files as input.
The agents/ directory contains instructions for specialized sub-agents. Read the
relevant agent file before spawning it. All agents use workspace_path as their
primary input parameter pointing to outputs/{project-name}/.
| Agent | File | When to Spawn |
|---|---|---|
| Research Agent | agents/research-agent.md | Phase 1 — gather cloud service docs, features, case studies |
| Diagram Agent | agents/diagram-agent.md | Phase 2 — generate architecture diagrams and visuals |
| Slide Builder Agent | agents/slide-builder-agent.md | Phase 3 — build individual slides (parallelizable) |
| Assembly Agent | agents/assembly-agent.md | Phase 4 — merge slides + diagrams into final deck |
| Review Agent | agents/review-agent.md | Phase 5 — quality review (max 2 rounds; skipped for <5 slides where orchestrator self-checks) |
| Fix Agent | agents/fix-agent.md | Phase 5 — apply fixes from review report |
Agent interaction flow (file-based):
Phase 0: Orchestrator
WRITES → task_plan.md, style_contract.md, progress.md
Phase 1: Research Agent
READS ← task_plan.md
WRITES → findings.md
Phase 2: Diagram Agent
READS ← task_plan.md, style_contract.md
WRITES → diagrams/*.png, diagrams/manifest.md
Phase 3: Slide Builder Agent(s) [parallelizable]
READS ← style_contract.md, findings.md, diagrams/
WRITES → slides/slide-{N}.{pptx|html}, slides/slide-{N}-notes.md, slides/manifest.md
FORMAT CHOICE: .pptx (simple/English) or .html (complex/Chinese/code) per slide
Phase 4: Assembly Agent
READS ← task_plan.md, slides/, diagrams/
WRITES → final/final-deck.{pptx|html}, final/assembly-report.md
Phase 5: Review Agent (Round 1)
READS ← style_contract.md, final/final-deck.*
WRITES → final/review_report.md
Phase 5: Fix Agent
READS ← final/review_report.md, style_contract.md, final/final-deck.*
WRITES → final/final-deck.* (updated), final/fix_summary.md
Phase 5: Review Agent (Round 2)
READS ← style_contract.md, final/final-deck.*, final/review_report.md
WRITES → final/review_report.md (updated)
最高优先级规则:内容完整显示 + 合理布局 > 字体大小
Every .pptx output MUST pass visual validation before delivery — no exceptions.
After ANY generation, editing, or structural modification that produces a .pptx:
$PYTHON_CMD -m pip install -q python-pptx Pillow
# 验证脚本位于 csa-skills 插件根目录:
CSA_SCRIPTS="$HOME/.claude/plugins/marketplaces/csa-skills/scripts"
$PYTHON_CMD "$CSA_SCRIPTS/validate_visual.py" /path/to/output.pptx --output /tmp/ppt_validation.json
If validation FAILS (exit code 1):
$PYTHON_CMD "$CSA_SCRIPTS/fix_overflow.py" /path/to/output.pptx --report /tmp/ppt_validation.json -o /path/to/output.pptx
$PYTHON_CMD "$CSA_SCRIPTS/validate_visual.py" /path/to/output.pptx --output /tmp/ppt_validation.json
脚本位置:
~/.claude/plugins/marketplaces/csa-skills/scripts/validate_visual.py这是插件根目录下的独立脚本,不依赖任何子 skill,任何触发 csa-skills 的场景都能调用。
Do NOT deliver until validation passes.
validate_visual.py 检测溢出、widow line(自动化,速度快)两者都通过才算通过。 算法有盲区(PIL 与 PowerPoint 渲染差异),LLM 看截图能发现算法遗漏的问题。
⚠️ PIL 渲染的已知限制:PIL 不会裁剪溢出文本(全部画出),而 PowerPoint 会在文本框边界截断。 因此无 LibreOffice 时,LLM 看 PIL 截图可能无法发现真实溢出。 强烈建议安装 LibreOffice(跨平台:macOS
brew install --cask libreoffice/ Windowschoco install libreoffice/ Linuxapt install libreoffice)。 有 LibreOffice 时渲染与 PowerPoint 一致,LLM 视觉校验才完全可靠。
LLM 视觉校验流程(模型无关):
# 渲染新建/修改的页面为 PNG
$PYTHON_CMD "$CSA_SCRIPTS/render_slides.py" /path/to/output.pptx \
--output-dir /tmp/slide_renders/ \
--slides <页码>
然后 Agent 直接使用 Read 工具读取 /tmp/slide_renders/slide-*.png 图片,验证:
不绑定特定模型 — coding agent 本身就是多模态 LLM,直接用内置能力读图即可。 不需要额外 API 调用或硬编码模型名称。
Read ../skywork-ppt/workflow_validate.md for the full loop.
Fix priority (applied in order):
Before delivering any presentation, verify:
validate_visual.py exit code 0 (no text overflow, no widow lines)For detailed tips, read
references/orchestration-and-mcp.md
Key principles:
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub huqianghui/csa-ppt-plugin --plugin csa-ppt