Skip to content

bestdeejay-design/agent-skills / skills/presentation-maker

presentation-maker

Verified

End-to-end presentations from a topic — outline -> JSON spec -> 16:9 HTML slides (with mandatory Playwright verification) and real .pptx (full 14-type design system), plus strategy presets, PDF export, and deck-quality audits. One command per stage.

FileKindSize
SKILL.mdskill md20.8 KB
evals/evals.jsonconfig731 B
examples/cases/lovii-pitch/case.jsonconfig581 B
examples/cases/lovii-pitch/deck.jsonconfig7.8 KB
examples/cases/lovii-pitch/slides.htmlother46.2 KB
examples/demo/demo_deck.jsonconfig7.9 KB
examples/demo_deck.jsonconfig7.9 KB
readme.ru.mdmarkdown4.5 KB
references/audit.mdmarkdown7.3 KB
references/bento.mdmarkdown20.4 KB
references/design-system.mdmarkdown7.2 KB
references/pdf.mdmarkdown2.5 KB
references/product-designer.mdmarkdown11.2 KB
references/references.mdmarkdown489 B
references/strategy.mdmarkdown7.7 KB
scripts/build_bento.pyscript61.9 KB
scripts/build_html.pyscript41.2 KB
scripts/build_pdf.pyscript5.9 KB
scripts/build_pptx.pyscript46.4 KB
scripts/cases.pyscript2.7 KB
scripts/composer.pyscript12.4 KB
scripts/content_profile.pyscript4.6 KB
scripts/creative_brief.pyscript7.4 KB
scripts/deck_audit.pyscript17.0 KB
scripts/deck_md.pyscript22.7 KB
scripts/fit_solver.pyscript7.5 KB
scripts/patterns.pyscript3.4 KB
scripts/polish.pyscript4.0 KB
scripts/qa_bento.pyscript34.7 KB
scripts/qa_intern.pyscript5.8 KB
scripts/qa_pptx.pyscript8.6 KB
scripts/strategy.pyscript9.8 KB
scripts/verify_slides.pyscript5.4 KB
scripts/vision_qa.pyscript9.0 KB
skill.jsonconfig2.1 KB
templates/base.htmlother54.7 KB
templates/icons/arrow-right.svgother128 B
templates/icons/award.svgother211 B
templates/icons/bot.svgother212 B
templates/icons/briefcase.svgother233 B
templates/icons/building.svgother171 B
templates/icons/chart.svgother197 B
templates/icons/family.svgother240 B
templates/icons/graduation.svgother163 B
templates/icons/presentation.svgother256 B
templates/icons/users.svgother240 B
templates/icons/zap.svgother188 B
templates/pattern-css/before-after.cssother285 B
templates/pattern-css/big-type.cssother390 B
templates/pattern-css/card-dashboard.cssother552 B
templates/pattern-css/cyclic-process.cssother702 B
templates/pattern-css/data-story.cssother611 B
templates/pattern-css/editorial-asym.cssother787 B
templates/pattern-css/hero-left.cssother697 B
templates/pattern-css/quote-hero.cssother533 B
templates/pattern-css/recap-grid.cssother461 B
templates/pattern-css/soft-shapes.cssother1.0 KB
templates/pattern-css/sparkline-metric.cssother534 B
templates/pattern-css/split-diagonal.cssother547 B
templates/pattern-css/split-frame.cssother841 B
templates/pattern-css/swiss-grid.cssother1.0 KB
templates/pattern-css/vertical-rail.cssother2.1 KB
templates/pattern-css/vertical-stepper.cssother882 B
templates/pattern-css/z-pattern.cssother750 B
templates/pattern-css/zigzag-timeline.cssother312 B
templates/patterns/before-after.jsonconfig1.1 KB
templates/patterns/big-type.jsonconfig1.1 KB
templates/patterns/card-dashboard.jsonconfig1.1 KB
templates/patterns/cyclic-process.jsonconfig990 B
templates/patterns/data-story.jsonconfig1.1 KB
templates/patterns/editorial-asym.jsonconfig1.2 KB
templates/patterns/hero-left.jsonconfig1.2 KB
templates/patterns/quote-hero.jsonconfig1.1 KB
templates/patterns/recap-grid.jsonconfig978 B
templates/patterns/soft-shapes.jsonconfig1.1 KB
templates/patterns/sparkline-metric.jsonconfig1017 B
templates/patterns/split-diagonal.jsonconfig1.2 KB
templates/patterns/split-frame.jsonconfig1.1 KB
templates/patterns/swiss-grid.jsonconfig1.2 KB
templates/patterns/vertical-rail.jsonconfig1.1 KB
templates/patterns/vertical-stepper.jsonconfig1.0 KB
templates/patterns/z-pattern.jsonconfig1.1 KB
templates/patterns/zigzag-timeline.jsonconfig1004 B
templates/themes/dynamic.jsonconfig520 B
templates/themes/executive.jsonconfig526 B
templates/themes/general.jsonconfig515 B
templates/themes/lovii.jsonconfig647 B
templates/themes/modern.jsonconfig546 B
templates/themes/momentum.jsonconfig508 B
templates/themes/neo-consulting.jsonconfig862 B
templates/themes/standard.jsonconfig605 B
templates/themes/swift.jsonconfig552 B

scripts/build_pdf.py

View on GitHub
#!/usr/bin/env python3
"""Render the themed slides.html (16:9) into a multi-page PDF — one slide per page.

WHY THIS REUSES slides.html (the core of "looks no worse")
----------------------------------------------------------
The HTML deck produced by ``build_html.py`` is the single source of truth for the
visual design: the palette lives in ``:root`` CSS variables, the layout is driven
by the same ``.slide`` / ``.deck`` rules, and the fonts are whatever the deck
loaded. For the PDF we do NOT re-implement any layout, theme, or typography — we
take that exact ``slides.html`` and only *reflow* it for print:

  * every ``.slide`` becomes a static, full-page block (16:9) that breaks to its
    own page, instead of the on-screen "one active slide at a time" carousel;
  * navigation chrome (``.nav-hint``, ``.progress``, ``.slide-head`` page number)
    is hidden;
  * print-color-adjust is forced to ``exact`` so gradients/backgrounds survive;
  * we emulate ``screen`` media so web fonts and colors render exactly as on screen.

Because the PDF is generated from the *same* DOM + *same* CSS, the output is
visually 1:1 with the HTML — same fonts, colors, spacing, and component shapes.

The 16:9 page is achieved by sizing each slide to ``100vw x 56.25vw`` (i.e. the
browser viewport, set to 1600x900) and emitting a ``@page { size: 1600px 900px }``
with zero margins, so one slide == one landscape page.

Usage:
    python3 build_pdf.py slides.html deck.pdf [--viewport 1600x900]

Exit codes:
    0  success (prints page count)
    1  render failure (Playwright launched but pdf() raised)
    2  Playwright not installed
"""
from __future__ import annotations

import argparse
import sys
from pathlib import Path

# --- graceful dependency handling -------------------------------------------
try:
    from playwright.sync_api import sync_playwright
except ImportError:  # pragma: no cover - environment dependent
    print("Playwright not installed: pip install playwright && playwright install chromium")
    sys.exit(2)


# Print stylesheet injected into the live page before pdf(). Plain (no media
# query) so it applies under the emulated "screen" media used for rendering.
PRINT_CSS = """
html, body {
    height: auto !important;
    overflow: visible !important;
    background: var(--background) !important;
}
.deck {
    height: auto !important;
    width: 100% !important;
    position: static !important;
}
.slide {
    position: static !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    width: 100vw !important;
    height: 56.25vw !important;   /* 16:9 at a 1600px-wide viewport -> 900px */
    margin: 0 !important;
    padding: clamp(56px, 6vw, 88px) !important;
    break-after: page !important;
    page-break-after: always !important;
}
.slide:last-child {
    break-after: auto !important;
    page-break-after: auto !important;
}
.slide-head, .nav-hint, .progress {
    display: none !important;
}
* {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}
@page {
    size: 1600px 900px;
    margin: 0;
}
"""


def parse_viewport(s: str) -> tuple[int, int]:
    try:
        w, h = s.lower().split("x")
        return int(w), int(h)
    except ValueError:
        raise argparse.ArgumentTypeError(
            f"--viewport must be WxH (e.g. 1600x900), got {s!r}"
        )


def build_pdf(html_path: Path, pdf_path: Path, viewport: tuple[int, int]) -> int:
    uri = html_path.resolve().as_uri()
    with sync_playwright() as p:
        browser = p.chromium.launch(headless=True)
        try:
            page = browser.new_page(viewport={"width": viewport[0], "height": viewport[1]})
            page.goto(uri, wait_until="networkidle")

            # Make sure web fonts are settled (resolves even if they fall back).
            try:
                page.evaluate("document.fonts && document.fonts.ready")
            except Exception:
                pass

            # Reflow the deck for print: one slide per page, no nav chrome.
            page.add_style_tag(content=PRINT_CSS)

            # Render as "screen" so colors/fonts match the on-screen deck 1:1.
            page.emulate_media(media="screen")

            n = page.evaluate("document.querySelectorAll('.slide').length")
            if not n:
                print(f"error: no .slide elements found in {html_path}")
                return 1

            try:
                page.pdf(
                    path=str(pdf_path),
                    landscape=True,          # ignored because width/height given; kept for clarity
                    width="1600px",
                    height="900px",
                    margin={"top": "0", "bottom": "0", "left": "0", "right": "0"},
                    prefer_css_page_size=True,
                    page_ranges="1-" + str(n),
                )
            except Exception as exc:  # pragma: no cover - runtime dependent
                print(f"error: PDF render failed: {exc}")
                return 1
        finally:
            browser.close()

    size = pdf_path.stat().st_size if pdf_path.exists() else 0
    print(f"PDF written: {pdf_path} ({n} pages, {size} bytes)")
    return 0


def main() -> int:
    ap = argparse.ArgumentParser(
        description="Render themed slides.html into a multi-page 16:9 PDF (one slide per page)."
    )
    ap.add_argument("html", help="input slides.html (themed deck)")
    ap.add_argument("pdf", help="output PDF path")
    ap.add_argument(
        "--viewport",
        default="1600x900",
        type=parse_viewport,
        help="render viewport WxH used to resolve vw/clamp() units (default 1600x900)",
    )
    args = ap.parse_args()

    html_path = Path(args.html)
    if not html_path.exists():
        print(f"error: input not found: {html_path}")
        return 1

    return build_pdf(html_path, Path(args.pdf), args.viewport)


if __name__ == "__main__":
    sys.exit(main())
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall