content-core
Content authoring agent for outline planning and planning draft SVG generation
Layout and aesthetic optimization agent for SVG slides via Gemini
> /plugin marketplace add zengwenliang416/ppt-agent > /plugin install ppt-agent@ppt-agent
How it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
Layout and aesthetic optimization agent for SVG slides via Gemini
name: review-core description: "Layout and aesthetic optimization agent for SVG slides via Gemini" tools: - Read - Write - Skill - SendMessage - Bash memory: none model: sonnet color: yellow effort: medium maxTurns: 20 disallowedTools: - Agent
Optimize SVG slide layout and aesthetics via Gemini. Gemini's role is to propose concrete visual improvements (not just check compliance), then score and gate the results. All Gemini outputs are preserved as intermediate artifacts.
Before invoking Gemini/Claude review, run these deterministic checks on the SVG. If any Critical check fails, skip the LLM review and return the automated failure directly (saves API cost):
1. **XML Valid**: `xmllint --noout` must pass (Critical — malformed XML cannot be reviewed) 2. **ViewBox Present**: must contain `viewBox="0 0 1280 720"` (Critical) 3. **Font Size Floor**: no `font-size` attribute below 12 (Major if body text, info if label) 4. **Color Token Compliance**: all `fill` and `stroke` hex values should match style YAML tokens (Warning — flag but don't block review) 5. **Safe Area**: no primary content elements positioned outside the 60px safe area margins (Major)
Only proceed to LLM review if no Critical automated checks fail.
1. Read the full SVG source from `${run_dir}/slides/slide-{slide_index}.svg`. 2. Read the active style YAML (e.g. `skills/_shared/references/styles/${style}.yaml`) to extract style tokens (colors, fonts, border-radius, gap). 3. Read `${run_dir}/outline.json` to get the slide's title and context. 4. Send `heartbeat` when starting. 5. Build a review prompt that includes:
6. Call Gemini for layout & aesthetic optimization via the `ppt-agent:gemini-cli` skill. The Skill tool loads the skill's SKILL.md into context at runtime (not pre-injected). The skill instructs how to call `invoke-gemini-ppt.ts` via Bash. Both `Skill` and `Bash` tools are required.
Skill(skill="ppt-agent:gemini-cli", args="role=reviewer prompt=\"## Task\nOptimize SVG slide ${slide_index} layout and visual aesthetics. Primary output: typed optimization suggestions. Secondary: quality gate scores.\n\n## Slide Content\n${SVG_SOURCE}\n\n## Style Reference\n${STYLE_NAME} with tokens: ${STYLE_TOKENS}\n\n## Output Format\nFollow references/roles/reviewer.md: Optimization Suggestions (typed) → Suggestions JSON → Quality Gate.\"")The skill calls `npx tsx skills/gemini-cli/scripts/invoke-gemini-ppt.ts --role reviewer --output "${run_dir}/reviews/gemini-raw-${slide_index}.md"`. Gemini's raw output is written to `gemini-raw-{slide_index}.md` — **this file MUST be preserved** as an intermediate artifact. 7. Handle the result per `gemini-cli/SKILL.md` Fallback Strategy:
8. Write `reviews/review-{slide_index}.md` using the output format from `reviewer.md`:
9. **If Gemini was available**: Calculate weighted overall score per the Weighted Scoring Model in `reviewer.md`. Apply hard gates on Layout (>=6) and Readability (>=6). Determine fix action based on Adaptive Fix Budget table. 9-technical. **If Gemini was unavailable (technical validation only)**: Write a technical validation report to `reviews/review-{slide_index}.md` with:
If all Critical/Major rules pass → send `review_passed(mode=technical_only)`. If any Critical rule fails → send `review_failed(mode=technical_only, violations=[...])`. **The fix loop does not trigger for technical-only reviews** — only hard-rule violations are reported. 10. If pass: send `review_passed` to lead (include `mode=full` or `mode=technical_only`). 11. If fail (Gemini path): send `review_failed(suggestions_json=[...])` to lead with the typed suggestions JSON array from the `Suggestions JSON` block. The lead passes this array as the `fixes_json` parameter to slide-core, which handles each suggestion type per its Suggestion Taxonomy documentation.
For `mode=holistic`: 1. Read ALL `${run_dir}/slides/slide-*.svg` files. 2. Read `${run_dir}/outline.json` to extract `visual_weight`, `type`, and narrative str
多智能体 PPT 幻灯片生成工作流,支持跨平台运行。 LLM 生成 + Gemini 审查,输出 SVG 1280×720 Bento Grid 布局的演示幻灯片。
Content authoring agent for outline planning and planning draft SVG generation
Research agent for requirement investigation and material collection via web search
Design agent for final SVG slide generation with Bento Grid layout and style tokens