This repo is a scaffold for an agent-driven slide workflow that keeps planning and design decisions inside agent skills, instead of hard-coding page-splitting and layout matching in scripts.
The core idea is to split the problem into two prompt transformations, then generate artifacts:
- Material → Content Prompt (content density + intent → per-page plan)
- Input:
materials/<deck>/...(raw notes, images, references) - Output:
prompts/content/<deck>.md - Skill:
.codex/skills/content-prompts/
- Content Prompt → Styled Prompt (design + layout inference at creation time)
- Input:
prompts/content/<deck>.md+styles/<style>.md(style brief) - Output:
prompts/styled/<deck>.md - Skill:
.codex/skills/styled-prompts/- The styled prompt is design-complete: element inventory + positions + shapes, and may add icons/illustrations/tables/diagrams to make content more intuitive.
- Styled Prompt → Images + PDF/PPTX
- Input:
prompts/styled/<deck>.md - Output workdir:
artifacts/<deck>/work*/(intermediate prompts, images, logs) - Final outputs:
artifacts/<deck>/<deck>.pdfandartifacts/<deck>/<deck>.pptx - Skill:
.codex/skills/styled-artifacts/
- No redundant “layout matching” step: the styling skill can infer the best layout while placing content.
- Fewer built-in layouts: styles focus on visual identity and constraints; page structure is decided per slide.
- Workdir keeps everything reproducible and debuggable (
artifacts/<deck>/work*/), without polluting git history.
This repo is designed to be driven by agent skills (see AGENTS.md). When a user asks for “generate prompts” or “export PDF/PPTX”, start with the orchestrator skill:
$slider-plan: produces a plan (in thecreate-plantemplate) that sequences the needed v2 skills.
Then run the individual skills as needed:
$content-prompts→ writesprompts/content/<deck>.md$styled-prompts→ writesprompts/styled/<deck>.md$styled-artifacts→ writesartifacts/<deck>/...
- If you have raw sources: start at
materials/<deck>/...→$content-prompts - If you already have
prompts/content/<deck>.md: start at$styled-prompts - If you already have
prompts/styled/<deck>.md: start at$styled-artifacts
V2 styles are Markdown briefs in styles/*.md (example: styles/blueprint.md).
Recommended:
- Set
style: <name>inconfigs/deck.yaml(example:style: blueprint) - Pass
styles/<name>.mdto$styled-promptswhen styling
See styles/README.md for the suggested style brief format.
Keep generation cheap:
- Review happens on prompts (
prompts/content/*andprompts/styled/*) - Avoid expensive “regenerate + review” loops on final artifacts
Recommended: use Pixi:
pixi install
Alternatively, install the Python deps used by the artifact scripts:
pip install requests Pillow python-pptx
Artifact rendering calls OpenRouter for image generation. Provide an API key via either:
- env var:
OPENROUTER_API_KEY=... - or a local file:
.OPENROUTER_API_KEYat repo root (gitignored)
Given a styled prompts file prompts/styled/<deck>.md, generate images + PDF + PPTX:
OPENROUTER_API_KEY=... python3 .codex/skills/styled-artifacts/scripts/styled_prompts_to_artifacts.py --prompts prompts/styled/<deck>.md --workdir artifacts/<deck>/work --pdf artifacts/<deck>/<deck>.pdf --pptx artifacts/<deck>/<deck>.pptx
- Image PPTX (
--pptx artifacts/<deck>/<deck>.pptx): packs generated slide PNGs into PPTX slides (fast, but not truly editable). - Editable PPTX (
artifacts/<deck>/<deck>.editable.pptx): generated via the fullpptxskill workflow (HTML→PPTX + thumbnail validation), not via a singlestyled-artifactsscript flag.
Editable PPTX workflow (recommended):
- Use
prompts/styled/<deck>.mdas the source of truth for geometry/content. - Write one HTML file per slide under
artifacts/<deck>/work/pptx-html/following.codex/skills/pptx/html2pptx.md(body size720pt Ă— 405pt). - Use the
pptxskill’s html2pptx workflow to createartifacts/<deck>/<deck>.editable.pptx. - Validate with
.codex/skills/pptx/scripts/thumbnail.pyand iterate until there is no cutoff/overlap.
To avoid clobbering previous outputs, the script auto-versions the workdir:
- If
artifacts/<deck>/workexists, it writes toartifacts/<deck>/work-2,work-3, ... - For iterative edits where you want to keep prior slide images, add
--reuse-workdir
After editing prompts/styled/<deck>.md, regenerate only the impacted slides:
OPENROUTER_API_KEY=... python3 .codex/skills/styled-artifacts/scripts/styled_prompts_to_artifacts.py --prompts prompts/styled/<deck>.md --workdir artifacts/<deck>/work --reuse-workdir --only 7... --only 2,5,8... --only 5-8
If you also pass --pdf/--pptx with --only, the script expects the other slide images to already exist in the same reused workdir.
One section per page:
## Page N: <title>Intent,Must include,Suggested representation,Assets,Notes / TODO
See .codex/skills/content-prompts/references/content-prompt-template.md.
-
Deck-level header (required): put a global style/formatting contract before the first slide (palette roles, typography feel, reusable components, icon/illustration rules).
-
One section per slide:
## Slide N: <title>- layout decision (free-form)
- a full element inventory (bbox + content + style for every element)
- asset list (local paths / URLs)
See .codex/skills/styled-prompts/references/element-spec-template.md.
Legacy v1 components (slider CLI, layout catalogs, and earlier artifact skills) are kept under archive/v1/ for reference.
materials/: raw source material (notes, images, scratch docs)configs/: v2 deck preferences (audience/language/style/dimensions)styles/: style briefs (Markdown; v2, no fixed layout catalog)prompts/content/: per-page content prompts (v2)prompts/styled/: per-page styled prompts (v2; input to artifact generation).codex/skills/: agent skills (planning, design, generation, validation)artifacts/: generated workdirs and final outputs (gitignored)references/: optional style references (gitignored; keep only README.md in git)
Legacy v1 folders (e.g. specs/, prompts/generated/, older skills) are under archive/v1/.
references/andartifacts/are gitignored (place local images/pdfs and generated outputs there).- Repo-wide agent guidance lives in
AGENTS.md.