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/strategy.py

View on GitHub
#!/usr/bin/env python3
"""Topic -> strategy selector for the presentation-maker pipeline.

Чистый stdlib. Функция select_strategy() превращает цель презентации (goal) в
набор решений уровня «продакт-дизайн»: нарративную дугу (arc), эстетический
режим (mood), плотность контента (density), имя ближайшей темы (palette_name)
и рекомендованный набор лейаутов (layouts).

Рациональность маппинга опирается на references/product-designer.md
(модуль «Продакт-дизайнер»):

  Дуги (product-designer.md, раздел A):
    - Problem->Solution->Proof->CTA : аудитория ещё не знакома с проблемой
      (боль -> решение -> доказательства -> один призыв).
    - Sparkline (Duarte)            : нужно убедить / большая идея,
      чередование «что есть» <-> «что могло бы быть» на протяжении деки.
    - STAR                          : доказать компетенцию кейсом
      (Situation->Task->Action->Result, один слайд = один кейс).
    - S.T.A.R. Moment               : одна шокирующая цифра/поворот.

  Консалтинг vs питч vs кинот (product-designer.md, раздел A):
    - консалтинг — пирамида (Minto) + SCQA, плотные данные, assertion-заголовки,
      аудитория читает сама -> text-heavy, swiss/executive, table/chart/metrics.
    - питч — проблема/решение/рынок/тракция/команда/CTA, 10 минут, метрики ->
      concise, glass/swift, title/metrics/comparison/closing.
    - кинот (keynote) — sparkline, эмоциональная дуга, минимум текста ->
      concise, editorial/dark, big_number/quote/divider.

Эстетические режимы (mood) взяты из references/design-system.md (раздел 5.4):
swiss / editorial / flat / glass / dark. Это и есть валидное перечисление для
поля theme.mood в deck.json. Имена «swift / executive / standard / modern»,
фигурирующие в ТЗ как «mood», на деле являются ИМЕНАМИ файлов тем
(templates/themes/*.json), поэтому они отражены в DEFAULT_THEMES как
palette_name, а не как mood.

Доступные файлы тем (skills/deck-html/templates/themes/):
general, modern, executive, momentum, swift, standard, dynamic.
DEFAULT_THEMES сопоставляет каждый валидный mood с ближайшей по характеру темой.
"""
from __future__ import annotations

import argparse
import json
import sys

# Валидные цели презентации (совпадает с deck.json -> goal).
VALID_GOALS = ("pitch", "consulting", "keynote", "report", "edu")

# Валидные эстетические режимы (design-system.md 5.4; deck.json theme.mood).
VALID_MOODS = ("swiss", "editorial", "flat", "glass", "dark")

# Нарративная дуга по цели (product-designer.md, раздел A).
GOAL_ARC = {
    "pitch": "problem-solution-proof-cta",
    "consulting": "problem-solution-proof-cta",  # пирамида Minto / SCQA
    "keynote": "sparkline",                        # или star-moment
    "report": "problem-solution-proof-cta",
    "edu": "star",                                 # STAR-кейс на слайд
}

# Эстетический режим по цели (design-system.md 5.4).
GOAL_MOOD = {
    "pitch": "glass",       # swift-тема имеет mood "glass"
    "consulting": "swiss",  # executive-тема -> строгая сетка
    "keynote": "editorial", # или dark
    "report": "swiss",      # standard-тема имеет mood "editorial", но отчёт
                            # строже -> swiss; см. DEFAULT_THEMES
    "edu": "flat",          # modern-тема -> ровные карточки/бенто
}

# Плотность контента по цели (deck-outline SKILL.md, verbosity).
GOAL_DENSITY = {
    "pitch": "concise",     # ~20 слов/слайд
    "consulting": "text-heavy",  # аудитория читает сама
    "keynote": "concise",
    "report": "standard",   # ~40 слов/слайд
    "edu": "standard",
}

# Рекомендованный набор лейаутов по цели (зеркалит RENDERERS build_html.py).
GOAL_LAYOUTS = {
    "pitch": ["title", "bullets", "metrics", "comparison", "closing"],
    "consulting": ["table", "chart", "metrics", "bullets"],
    "keynote": ["big_number", "quote", "divider"],
    "report": ["table", "chart", "process"],
    "edu": ["bullets", "process", "feature"],
}

# Ближайшая существующая тема (templates/themes/<name>.json) для каждого mood.
DEFAULT_THEMES = {
    "swiss": "executive",
    "editorial": "standard",
    "flat": "modern",
    "glass": "swift",
    "dark": "dynamic",
}

# Ключевые слова для эвристического вывода цели, если она не задана явно.
_GOAL_KEYWORDS = {
    "pitch": ("pitch", "investor", "инвестор", "стартап", "funding", "раунд", "питч"),
    "consulting": ("consulting", "консалт", "совет", "board", "стратеги", "пирамид", "scqa"),
    "keynote": ("keynote", "конференц", "выступл", "доклад", "тед", "ted"),
    "report": ("report", "отчёт", "отчет", "квартал", "quarterly", "репорт", "дашборд"),
    "edu": ("edu", "обучен", "курс", "урок", "учеб", "lecture", "туториал"),
}


def _infer_goal(audience: str | None, topic: str | None) -> str | None:
    """Эвристический вывод цели по аудитории/теме (только если goal не задан)."""
    hay = " ".join(x for x in (audience, topic) if x).lower()
    if not hay:
        return None
    for goal, kws in _GOAL_KEYWORDS.items():
        if any(kw in hay for kw in kws):
            return goal
    return None


def select_strategy(goal: str | None = None,
                    audience: str | None = None,
                    topic: str | None = None,
                    language: str | None = None) -> dict:
    """Подобрать стратегию презентации по цели.

    Аргументы:
        goal:     одна из VALID_GOALS; если None/неизвестна — выводится по
                  audience/topic, иначе дефолт "pitch".
        audience: описание аудитории (для эвристики и будущих расширений).
        topic:    тема (для эвристики).
        language: "ru"/"en" (пробрасывается в вывод для справки).

    Возвращает dict:
        {
          "goal": str,            # нормализованная цель
          "arc": str,             # нарративная дуга
          "mood": str,            # эстетический режим (из VALID_MOODS)
          "density": str,         # concise|standard|text-heavy
          "palette_name": str,    # имя файла темы (templates/themes/<name>.json)
          "layouts": [str],       # рекомендованные лейауты
        }
    """
    goal = (goal or "").strip().lower()
    if goal not in VALID_GOALS:
        goal = _infer_goal(audience, topic) or "pitch"

    mood = GOAL_MOOD[goal]
    return {
        "goal": goal,
        "arc": GOAL_ARC[goal],
        "mood": mood,
        "density": GOAL_DENSITY[goal],
        "palette_name": DEFAULT_THEMES[mood],
        "layouts": list(GOAL_LAYOUTS[goal]),
        # language пробрасываем отдельно — он не влияет на стратегию,
        # но полезен вызывающей стороне для логов.
        "language": language,
    }


def _preset_row(goal: str) -> dict:
    """One preset summary row for --list / --show."""
    return {
        "goal": goal,
        "arc": GOAL_ARC.get(goal, ""),
        "mood": GOAL_MOOD.get(goal, ""),
        "density": GOAL_DENSITY.get(goal, ""),
        "palette_name": DEFAULT_THEMES.get(GOAL_MOOD.get(goal, ""), ""),
        "layouts": list(GOAL_LAYOUTS.get(goal, [])),
    }


def main() -> int:
    ap = argparse.ArgumentParser(description="Select presentation strategy by goal")
    ap.add_argument("--goal", default=None, help="pitch|consulting|keynote|report|edu")
    ap.add_argument("--audience", default=None, help="audience description (for inference)")
    ap.add_argument("--topic", default=None, help="topic (for inference)")
    ap.add_argument("--language", default=None, help="ru|en")
    ap.add_argument("--list", action="store_true", help="list all strategy presets")
    ap.add_argument("--show", metavar="GOAL", default=None,
                    help="show one preset in detail (pitch|consulting|keynote|report|edu)")
    args = ap.parse_args()

    if args.list:
        print(json.dumps([_preset_row(g) for g in VALID_GOALS],
                         ensure_ascii=False, indent=2))
        return 0
    if args.show:
        goal = (args.show or "").strip().lower()
        if goal not in VALID_GOALS:
            print(f"unknown goal: {args.show} (valid: {', '.join(VALID_GOALS)})")
            return 2
        print(json.dumps(_preset_row(goal), ensure_ascii=False, indent=2))
        return 0

    strat = select_strategy(args.goal, args.audience, args.topic, args.language)
    print(json.dumps(strat, ensure_ascii=False, indent=2))
    return 0


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