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.
git clone https://github.com/jac007x/CheatCodes-Skill-Library
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"
slide-analyzer/SKILL.md🔍 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
| Mode | Input | How | Best For |
|---|---|---|---|
| Visual | Screenshot/image | + rubric | Any format (HTML, PPTX, PDF) |
| Structural | .pptx file | functions | Automated CI/CD, batch audits |
| Combined | .pptx file | Render previews + structural checks | Comprehensive 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%)
| Score | Criteria |
|---|---|
| 5 | Clear focal point, obvious reading path, 3-second comprehension |
| 4 | Good hierarchy, minor competing elements |
| 3 | Message findable but requires effort |
| 2 | Multiple competing elements, unclear priority |
| 1 | Chaotic, 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%)
| Score | Criteria |
|---|---|
| 5 | Perfect chart type, clean design, clear labels, insight highlighted |
| 4 | Good chart, minor improvements possible |
| 3 | Acceptable but suboptimal type or design |
| 2 | Wrong chart type or significant issues |
| 1 | Misleading, 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%)
| Score | Criteria |
|---|---|
| 5 | Pixel-perfect alignment, generous whitespace, balanced |
| 3 | Mostly aligned, some elements misplaced |
| 1 | No grid, chaotic placement |
Check for: Grid alignment · Consistent margins · Chart too small with wasted space · Cramped content · Uneven spacing
4. Typography & Readability (15%)
| Score | Criteria |
|---|---|
| 5 | Clear hierarchy, readable at distance, consistent, good contrast |
| 3 | Readable but weak hierarchy |
| 1 | Illegible 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%)
| Score | Criteria |
|---|---|
| 5 | Full Walmart brand, semantic colors, accessible contrast |
| 3 | Partially on-brand |
| 1 | No 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
- Load image with
(or extract structure)load_image_for_analysis - Apply rubric → score all 7 dimensions
- Generate analysis report
Phase 2: Extract Data
- Read data values from slide (chart values, table data)
- Confirm with user if vision is ambiguous
Phase 3: Rebuild
- Use
skill for chart selectiondata-viz-expert - Use
skill for layout/design rulespptx-expert - Build improved version
- Apply all Phase 1 improvements
Phase 4: Compare
- Score the rebuilt version
- Document every improvement + rationale
📸 Multi-Slide Deck Analysis
When analyzing a full deck:
- Score each slide individually
- Cross-slide consistency:
- Colors consistent? Fonts/sizes? Margins/grids?
- Chart styles match? Narrative flow logical?
- Deck-level summary:
- Average score + top 3 deck-wide issues
- Slide priority ranking
- Recommend slide order changes if narrative could improve
🎯 Quick Commands
| User Says | Workflow |
|---|---|
| "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" | → 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