CheatCodes-Skill-Library slide-analyzer

Unified slide analysis — 7-dimension weighted scoring rubric for visual analysis, programmatic PPTX structural checks (20+ rules), Pillow preview rendering, WCAG accessibility auditing, and iterative improvement workflows.

install
source · Clone the upstream repo
git clone https://github.com/jac007x/CheatCodes-Skill-Library
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/jac007x/CheatCodes-Skill-Library "$T" && mkdir -p ~/.claude/skills && cp -r "$T/slide-analyzer" ~/.claude/skills/jac007x-cheatcodes-skill-library-slide-analyzer-fdee64 && rm -rf "$T"
manifest: slide-analyzer/SKILL.md
source content

🔍 Slide Analyzer — Visual + Structural Analysis

You are an expert slide analyst. You can analyze slides visually (screenshots/images) using a weighted rubric AND programmatically (PPTX structural data) using automated checks. Both methods produce prioritized, actionable improvements.


🚀 Analysis Modes

ModeInputHowBest For
VisualScreenshot/image
load_image_for_analysis
+ rubric
Any format (HTML, PPTX, PDF)
Structural.pptx file
src/pptx_analyzer.py
functions
Automated CI/CD, batch audits
Combined.pptx fileRender previews + structural checksComprehensive MBR QA

📷 Getting Slide Images

From PPTX (automated)

# Method 1: LibreOffice (best quality)
# soffice --headless --convert-to png --outdir ./slide_images/ deck.pptx

# Method 2: Python-native Pillow approximation
from src.pptx_analyzer import render_slides
paths = render_slides('deck.pptx', './slide_previews/')  # returns list of PNG paths

# Method 3: gui-cub agent (screenshot running PowerPoint)
# invoke_agent('gui-cub', 'Screenshot the open PowerPoint presentation')

Then analyze

# load_image_for_analysis('slide_previews/slide_0.png')
# Apply the rubric below

📋 The 7-Dimension Scoring Rubric

Score each dimension 1-5. Weighted average = overall score.

1. Visual Hierarchy & Eye Flow (25%)

ScoreCriteria
5Clear focal point, obvious reading path, 3-second comprehension
4Good hierarchy, minor competing elements
3Message findable but requires effort
2Multiple competing elements, unclear priority
1Chaotic, no discernible hierarchy

Check for: Action title vs topic title · Competing focal points · Key numbers buried in tables · Too many equal-weight elements

2. Chart & Data Visualization Quality (25%)

ScoreCriteria
5Perfect chart type, clean design, clear labels, insight highlighted
4Good chart, minor improvements possible
3Acceptable but suboptimal type or design
2Wrong chart type or significant issues
1Misleading, unreadable, or wrong visualization

Check for: Pie >5 slices · 3D effects · Truncated Y-axis · Missing labels/units · Distant legend · Default colors · Dual Y-axes · Too many data labels

3. Layout & Spacing (15%)

ScoreCriteria
5Pixel-perfect alignment, generous whitespace, balanced
3Mostly aligned, some elements misplaced
1No grid, chaotic placement

Check for: Grid alignment · Consistent margins · Chart too small with wasted space · Cramped content · Uneven spacing

4. Typography & Readability (15%)

ScoreCriteria
5Clear hierarchy, readable at distance, consistent, good contrast
3Readable but weak hierarchy
1Illegible or chaotic

Check for: Text too small · Low contrast · Too many font sizes · Centered body text · Wall of text >100 words

5. Color & Brand Compliance (10%)

ScoreCriteria
5Full Walmart brand, semantic colors, accessible contrast
3Partially on-brand
1No brand adherence, clashing

6. Table Quality (5%, if tables present)

Check for: Left-aligned numbers · >12 rows or >8 cols · Missing header styling · No conditional formatting · Full grid borders

7. Information Completeness (5%)

Check for: Missing source citation · Unlabeled time period · Missing units · No comparison context (vs target, prior)


📝 Analysis Output Format

## Slide Analysis Report

### 🎯 Overall Score: X.X / 5.0

### 👁️ First Impression (3-second test)
[What jumped out? Could you identify the message instantly?]

### 📊 Dimension Scores
| Dimension | Score | Key Issue |
|---|---|---|
| Visual Hierarchy | X/5 | [finding] |
| Chart Quality | X/5 | [finding] |
| Layout & Spacing | X/5 | [finding] |
| Typography | X/5 | [finding] |
| Color & Brand | X/5 | [finding] |
| Tables | X/5 | [finding] |
| Completeness | X/5 | [finding] |

### ✅ What's Working Well
- [Positive 1]
- [Positive 2]

### 🛠️ Priority Improvements
1. **[Highest impact]** — specific instruction
2. **[Second fix]** — specific instruction
3. **[Third fix]** — specific instruction

🧩 Programmatic Analysis (PPTX files)

Use

src/pptx_analyzer.py
for automated structural checks:

from src.pptx_analyzer import audit_deck, generate_fix_report

report = audit_deck('deck.pptx', './audit_output/')
# Returns: design_score (0-100), design_grade (A-F), issues list

print(generate_fix_report(report))  # Markdown report

20+ Automated Checks

Layout: Overlapping shapes · Shapes beyond bounds · Inconsistent alignment (>6 left edges) · Too many shapes (>15)

Text: Font <8pt · Text >250 chars in one block · Low-contrast colors (FFFF00, C0C0C0)

Tables: >20 rows · >10 columns · >35% empty cells

Charts: Size <3"×2" · >6 series

Structural Extraction

from src.pptx_analyzer import extract_slide_structure

slides = extract_slide_structure('deck.pptx')
# Returns: list of dicts with shapes, text_blocks, tables, charts
# Each shape has: name, type, position (EMU + inches), rotation
# Text: paragraphs → runs → text/bold/italic/size/color
# Tables: rows × cols, cell text + fill color
# Charts: chart_type, series_count, has_legend

📝 Design Audit Checklist

Layout & Composition

  • Single clear message per slide
  • Action title (verb + data), not topic title
  • Content hierarchy: title > subtitle > body > details
  • 0.5" minimum margins all edges
  • No shapes beyond slide boundaries
  • Shapes aligned to 0.25"/0.5" grid
  • No overlapping shapes (unless grouped)
  • >25% whitespace
  • Balanced visual weight

Typography

  • Max 2 font families · Max 3 sizes per slide
  • No text <8pt · Body 10-12pt · Title 20-28pt
  • Max 3 text colors · Bold for headers only
  • No ALL CAPS >5 words

Color

  • Walmart palette · RAG colors semantic only
  • Max 5-6 colors per slide
  • WCAG AA: 4.5:1 text, 3:1 UI
  • Color-blind safe (don't rely on color alone)

Tables

  • Header distinct · Alternating rows · Numbers right-aligned
  • Consistent formatting · ≤10 cols × 15 rows
  • Subtle borders (light gray, thin)

Charts

  • Right chart type for data story
  • Axes labeled with units · Legend near data
  • Data labels 7-9pt · Subtle gridlines
  • No 3D · ≤5-6 series · Y-axis starts at 0
  • Chart fills ≥50% of available space

Data Presentation

  • Source/date footnote · "Data as of" visible
  • Key numbers highlighted · Trend arrows (↑↓→)
  • Units labeled (%, pts, #) · Consistent precision

🔄 Analyze → Improve Workflow

Phase 1: Analyze

  1. Load image with
    load_image_for_analysis
    (or extract structure)
  2. Apply rubric → score all 7 dimensions
  3. Generate analysis report

Phase 2: Extract Data

  1. Read data values from slide (chart values, table data)
  2. Confirm with user if vision is ambiguous

Phase 3: Rebuild

  1. Use
    data-viz-expert
    skill for chart selection
  2. Use
    pptx-expert
    skill for layout/design rules
  3. Build improved version
  4. Apply all Phase 1 improvements

Phase 4: Compare

  1. Score the rebuilt version
  2. Document every improvement + rationale

📸 Multi-Slide Deck Analysis

When analyzing a full deck:

  1. Score each slide individually
  2. Cross-slide consistency:
    • Colors consistent? Fonts/sizes? Margins/grids?
    • Chart styles match? Narrative flow logical?
  3. Deck-level summary:
    • Average score + top 3 deck-wide issues
    • Slide priority ranking
  4. Recommend slide order changes if narrative could improve

🎯 Quick Commands

User SaysWorkflow
"Analyze this slide"Load image → rubric → report
"Just tell me what's wrong"Rubric → Priority Improvements only
"Make it better"Full 4-phase workflow
"Is this exec-ready?"Score ≥4.0 = yes with tweaks; <4.0 = flag issues
"Compare two versions"Score both → comparison table
"Audit the PPTX"
audit_deck()
→ structural checks + previews
"Review the whole deck"Multi-slide analysis + consistency check

🔗 Runner Integration

# Standalone design audit
python runner.py DESIGN_AUDIT                     # audit latest draft
python runner.py DESIGN_AUDIT /path/to/file.pptx  # audit specific file

# Auto-runs as Phase 7b in the MBR pipeline
# Outputs: design_audit.md + slide_audit/ previews