| name | build-cfa-deck |
| description | Generate a complete, on-brand Chick-fil-A PowerPoint presentation from a topic using CFA brand guidelines, template layouts, and extracted brand assets. Use when you need a Chick-fil-A branded presentation, want to build a CFA deck with brand compliance, or need an on-brand presentation for a CFA audience. |
| argument-hint | "Topic" [--slides 20] [--audience "CFA Leadership"] [--presenter "Name"] |
| allowed-tools | Bash, Read, Write, Agent, Edit |
| effort | high |
Build CFA Deck
Generate a complete, on-brand Chick-fil-A PowerPoint presentation from a topic prompt. Uses the CFA "Support Now" PPTX template (64 layouts, 194 SVG icons, embedded Apercu fonts), extracted brand assets, and comprehensive brand guidelines.
No API key needed — content generation happens in this Claude Code session using your subscription.
Pre-loaded Context
Asset root: ${CFA_ASSETS_DIR:-~/dev/stratfield/slide-generator/examples}
Brand assets location:
!CFA_ASSETS_DIR=${CFA_ASSETS_DIR:-~/dev/stratfield/slide-generator/examples}; [ -d "$CFA_ASSETS_DIR/cfa-brand-assets/" ] && echo "Assets: OK" || echo "Assets: MISSING at $CFA_ASSETS_DIR/cfa-brand-assets/ — run asset extraction first or set CFA_ASSETS_DIR"
CFA template:
!CFA_ASSETS_DIR=${CFA_ASSETS_DIR:-~/dev/stratfield/slide-generator/examples}; ls -lh "$CFA_ASSETS_DIR/CFA PPT Template2.pptx" 2>/dev/null && echo "Template: OK" || echo "Template: MISSING at $CFA_ASSETS_DIR/CFA PPT Template2.pptx"
Brand guidelines:
!CFA_ASSETS_DIR=${CFA_ASSETS_DIR:-~/dev/stratfield/slide-generator/examples}; [ -f "$CFA_ASSETS_DIR/cfa-brand-guidelines-for-ppt.md" ] && wc -l "$CFA_ASSETS_DIR/cfa-brand-guidelines-for-ppt.md" || echo "Guidelines: MISSING at $CFA_ASSETS_DIR/cfa-brand-guidelines-for-ppt.md"
python-pptx:
!python3 -c "import pptx; print('python-pptx: OK')" 2>/dev/null || echo "python-pptx: NOT INSTALLED — run: pip install python-pptx --break-system-packages"
Prerequisites
python-pptx installed (pip install python-pptx --break-system-packages)
- python-pptx 1.0.2 is the verified version. Slide removal (
references/cfa-deck-helpers.md)
relies on Presentation.slides._sldIdLst and PresentationPart.drop_rel(). _sldIdLst is a
private (leading-underscore) attribute with no documented public equivalent — if a different
python-pptx version is installed, re-verify both calls against a scratch copy of the template
before trusting the build script (see the "Removing Sample Slides" section of the helpers
reference for what to check).
- CFA PPTX template at
${CFA_ASSETS_DIR:-~/dev/stratfield/slide-generator/examples}/CFA PPT Template2.pptx
- Brand guidelines at
${CFA_ASSETS_DIR:-~/dev/stratfield/slide-generator/examples}/cfa-brand-guidelines-for-ppt.md
- Brand assets extracted to
${CFA_ASSETS_DIR:-~/dev/stratfield/slide-generator/examples}/cfa-brand-assets/
- All assets must exist before proceeding. If the Pre-loaded Context preflights above report MISSING for any asset, stop immediately and ask the user to either set
CFA_ASSETS_DIR to the correct path or run the asset extraction first.
Input Validation
Required:
$ARGUMENTS must contain a topic string (quoted). Example: "The Future of Quick-Service Restaurants"
Optional flags (parse from $ARGUMENTS):
--slides <N> — number of slides (default: 20)
--audience <text> — target audience (default: "CFA Leadership Team")
--presenter <text> — presenter name for title/closing slides (default: empty)
--output <path> — output .pptx file path (default: topic-slug in current directory)
If no topic is provided, ask the user for one. Do not proceed without a topic.
Asset Preflight Check
CRITICAL: Before proceeding with any other steps, verify that all CFA assets are present:
- Check the Pre-loaded Context section above. If any preflight reports MISSING, stop immediately.
- Ask the user: "One or more CFA assets are missing. Set
CFA_ASSETS_DIR to the path containing the assets, or run the asset extraction first."
- Do not proceed until all preflights report OK.
Instructions
Follow these steps exactly. Do not skip or reorder.
Step 1: Load Brand Context
Read the brand guidelines file. You need sections 1 (Color System), 5 (Layout System), 7 (Content Density Standards), and 8 (Deck Composition) to generate compliant content.
Read: ${CFA_ASSETS_DIR:-~/dev/stratfield/slide-generator/examples}/cfa-brand-guidelines-for-ppt.md
Internalize these critical rules before generating content:
- Color sequencing: Never more than 3 consecutive white-background slides. Rotate navy, green, teal, red as visual breaks.
- Content density: Every content slide needs 3 layers (primary, supporting, contextual). Minimum word counts per slide type.
- Headlines: Insight-driven, not generic labels. Must contain a specific claim, number, or insight.
- Data enrichment: Every factual claim needs a specific number. No vague qualitative language.
Step 2: Enumerate Template Layouts
Run this to get the exact layout names from the template:
python3 -c "
import os
from pptx import Presentation
cfa_dir = os.path.expanduser(os.environ.get('CFA_ASSETS_DIR', '~/dev/stratfield/slide-generator/examples'))
prs = Presentation(os.path.join(cfa_dir, 'CFA PPT Template2.pptx'))
for i, layout in enumerate(prs.slide_layouts):
phs = ', '.join([f'idx={p.placeholder_format.idx}:{p.placeholder_format.type}' for p in layout.placeholders])
print(f'{i:2d}. {layout.name} [{phs}]')
"
Step 3: Generate the Slide Plan
Using the brand guidelines context and the template layout names, generate a complete slide plan as a JSON array. This is the creative core — you ARE the content engine.
For each slide, produce this structure:
{
"slide_number": 1,
"slide_type": "cover|content|section_divider|stat_callout|data_chart|quote|split|card_grid|timeline|closing|...",
"layout_name": "exact template layout name from Step 2",
"background_color": "#hex or default",
"headline": "Insight-driven headline with a specific claim or number",
"subheadline": "Supporting context or null",
"body_content": ["Substantive bullet 1 with specific data...", "Bullet 2...", "..."] or "Paragraph text...",
"stats": [{"number": "$410B", "label": "QSR Market Size"}, ...] or null,
"speaker_notes"
Content quality rules (enforce strictly):
- Every headline contains a specific insight, number, or claim
- Every bullet point contains a specific fact, percentage, dollar amount, or date
- Content slides have 4-8 bullets OR 2-3 substantive paragraphs (2-3 sentences each)
- Stat callout slides have 2-4 large statistics with labels
- Quote slides have 40+ word quotes with full attribution
- Data slides describe specific chart data (type, axes, series, values)
- Speaker notes add background context not visible on the slide
- Word count minimums: content=80-150, stat=40-60, data=50-80, quote=60-100
Color sequencing rules (enforce strictly):
- Slide 1: Navy or Red background (title)
- Slides 2-3: White background (content)
- Slide 4: Navy or Green (section break)
- Slides 5-7: White with rotating accent colors (teal, then navy, then green)
- Slide 8: Teal or Navy (stat/impact)
- Continue pattern: never 3+ consecutive white slides
- Last slide: Navy or Red (closing)
- Distribution targets: ~25% Navy, ~15% Red, ~10% Green/Teal, ~45% White, ~5% Warm Gray
Layout selection guidance:
- Title: "Title Slide Dark Blue Pattern", "Title Slide Blue Values", "Title Slide Green Pattern"
- Section dividers: "Large Transition Dark Blue", "Large Transition Green", "Transition Pattern"
- Content: "Text Chat", "Text Dots", "Split Slide Medium Titles", "Triple Block Content"
- Stats/callouts: "Circle Callout", "Circle Callout 2", "Circle Callout 3"
- Quotes: "Large Quote Dark Blue", "Quote Green", "Quote White"
- Charts: "Small Title Chart", "Split with Chart"
- Team: "Team Slide Four Column", "Team Slide"
- Closing: "End Slide Dark Blue", "End Slide Green", "Final Words"
Step 4: Write the Build Script
Write a Python script to .tmp/build_cfa_deck.py that:
- Opens the CFA template
- Removes all 28 sample slides (preserve layouts and masters)
- For each slide in your JSON plan:
a. Finds the matching layout by name
b. Adds a new slide with that layout
c. Populates placeholders (idx 0=title, 1=body, 10=footer, 12=slide number)
d. If the layout lacks needed placeholders, adds text boxes at appropriate positions
e. Applies background color if not "default"
f. Adds speaker notes
g. Adds the CFA Script Logo where appropriate (red on light backgrounds from
cfa-brand-assets/logos/)
- Saves the .pptx
python-pptx helper functions:
Read ${CLAUDE_PLUGIN_ROOT}/references/cfa-deck-helpers.md (fall back to
plugins/slide-gen/references/cfa-deck-helpers.md if CLAUDE_PLUGIN_ROOT is unset). It
contains the imports, COLORS palette, and four helper functions to compose into
.tmp/build_cfa_deck.py: remove_all_slides (the single, verified slide-removal
implementation — see Prerequisites), find_layout, set_placeholder, and add_textbox.
Template path in the script:
The script must read the template from ${CFA_ASSETS_DIR:-~/dev/stratfield/slide-generator/examples}/CFA PPT Template2.pptx.
Use os.path.join(os.path.expanduser(os.environ.get('CFA_ASSETS_DIR', '~/dev/stratfield/slide-generator/examples')), 'CFA PPT Template2.pptx')
to construct the path dynamically, so the script respects the environment variable.
Step 5: Run the Build Script
python3 .tmp/build_cfa_deck.py
Verify the output:
python3 -c "
from pptx import Presentation
import sys
prs = Presentation(sys.argv[1])
print(f'Slides: {len(prs.slides)}')
print(f'Dimensions: {prs.slide_width.inches:.3f}\" x {prs.slide_height.inches:.3f}\"')
for i, s in enumerate(prs.slides, 1):
print(f' Slide {i}: {len(s.shapes)} shapes')
" OUTPUT_PATH
Step 6: Report Results
Tell the user:
- Output file path and size
- Slide count and layout distribution
- Color sequence used
- What to polish in PowerPoint (font rendering, real photos, layout tweaks)
Error Handling
| Error | Cause | Fix |
|---|
CFA_ASSETS_DIR not set and default path missing | Assets not found at default location | Set CFA_ASSETS_DIR environment variable to the correct path, or run asset extraction to the default ~/dev/stratfield/slide-generator/examples |
python-pptx not installed | Missing dependency | pip install python-pptx --break-system-packages |
Template not found | Wrong path or CFA_ASSETS_DIR incorrect | Verify CFA PPT Template2.pptx exists at ${CFA_ASSETS_DIR}/; check CFA_ASSETS_DIR environment variable |
Guidelines not found | Wrong path or CFA_ASSETS_DIR incorrect | Verify cfa-brand-guidelines-for-ppt.md exists at ${CFA_ASSETS_DIR}/; check CFA_ASSETS_DIR environment variable |
Layout not found | Layout name mismatch | Script falls back to blank layout — check template layout names |
Slide removal fails | python-pptx version mismatch — _sldIdLst/drop_rel are private APIs verified only on 1.0.2 | Confirm installed version (python3 -c "import pptx; print(pptx.__version__)"); if it differs from 1.0.2, re-verify the two calls in references/cfa-deck-helpers.md against a scratch copy of the template before proceeding |
Font not rendering | Apercu not installed locally | Template embeds fonts — they render on open in PowerPoint |
Output too small (< 30KB) | Slides not built properly | Check for python-pptx errors in script output |
Output
The skill produces:
- A
.pptx file with the specified number of slides
- Uses CFA template layouts (64 available), embedded fonts, and theme colors
- Content is substantive and data-rich (enforced by content density standards)
- Color sequence follows brand guidelines (navy/red/green/teal rotation)
- Ready for final polish in PowerPoint (swap in real photos, verify fonts, adjust layouts)
Notes
- This skill generates content directly in the Claude Code session — no separate API key or API credits needed
- The CFA template embeds Apercu and Rooney fonts — they render correctly when opened in PowerPoint
- 194 SVG icons in the template are theme-aware and auto-recolor with theme changes
- For best results, specify a focused topic and target audience — generic topics produce generic content
- The skill handles all brand compliance automatically: color sequencing, content density, headline style, layout selection