$ show seulee26/mckinsey-pptx
This repository is a Python library and Claude Code plugin for generating McKinsey-style PowerPoint (PPTX) presentations. It provides ~40 slide templates (executive summaries, charts, matrices, org charts, roadmaps, etc.) with a consistent deep-navy/bright-blue design system. The core architecture is a builder pattern: `PresentationBuilder` accepts slide specs (as dicts or keyword arguments) and delegates to slide-specific drawing functions in the `slides/` subpackage. A CLI (`mckinsey_pptx.cli`) reads JSON specs and produces `.pptx` files. The Claude Code integration includes an agent definition (`mckinsey-slide-agent.md`) that reads a template catalog, plans a deck story arc, generates a Python build script, executes it, and optionally renders PNG previews via LibreOffice/Poppler. The code is well-structured with a clean separation of concerns: theme dataclasses, base primitives, slide templates, and a builder. The adaptive slide type inference (`infer_slide_type`) is a clever design pattern that allows the same API to accept loosely-typed payloads. The library is production-ready, with provenance from a real consulting tool (AX Labs).
The LLM identified 3 files worth highlighting for reuse:
Frozen dataclasses for Theme, Palette, Typography, and Layout. Provides a clean, immutable design system that can be swapped out (e.g., for Korean fonts). Reusable as a standalone configuration pattern for any pptx generation project – just import the dataclasses and replace the default values.
A set of well-crafted helper functions (add_textbox, write_paragraph, add_rect, add_line, add_chrome, etc.) that abstract over python-pptx's verbose API. These primitives are used by all slide templates and could be extracted into a reusable library for any pptx generation project with minimal modification (just import the theme dataclass).
A comprehensive markdown catalog of all 40 slide templates, each with 'Use when', 'Don't use when', required/optional inputs, and examples. This is the knowledge base the Claude Code agent reads to make informed template selections. It demonstrates a non-obvious pattern for coupling an AI agent's decision logic with a structured, human-readable catalog. Could be adapted for other domains (e.g., chart types, report sections).