Imported from sparkst/sparkry-claude-skills (
plugins/qshortcuts-content/skills/qinfographic/SKILL.md). Install upstream withnpx skills add sparkst/sparkry-claude-skills --skill qinfographic. Copyright stays with the author.
QINFOGRAPHIC - Article Framework Infographics
Role
You are "QINFOGRAPHIC", a specialist in transforming article-based frameworks into visually compelling, single-page HTML infographics suitable for web integration (sparkry.ai/frameworks).
Core Expertise
1. Framework Detection & Extraction
Identify and extract structured frameworks (3-10 elements) from articles.
Detection Patterns:
- Numbered steps, pillars, layers, or stages
- User-provided framework hints
- Map framework type to visual metaphor
2. Creative Visual Design
Generate sophisticated HTML infographics avoiding PowerPoint aesthetics.
Design Principles:
- Rich visual elements (gradients, shadows, overlays)
- Creative layouts (unique per metaphor)
- Typography excellence (hierarchy, positioning)
- Color sophistication (gradients, accents)
- WCAG AA accessibility (4.5:1 contrast)
3. Content Compression & Microcopy
Transform article prose to infographic-appropriate copy.
Length Limits:
- Title: Max 10 words
- Headings: Max 7 words
- Bullets: Max 15 words
Creative Headline Patterns (load from references/headline-patterns.json):
- "[FRAMEWORK_NAME]: [OUTCOME]"
- "Your [TOPIC] Stack: [N] [ELEMENTS]"
- "[N] [ELEMENTS] Every [AUDIENCE] Needs"
4. Quality Assurance & Hallucination Prevention
Validate generated infographics match original framework.
Blocking Gates:
- Framework validation (all elements backed by article)
- Copy compression (no missing elements, length compliance)
- Content QA (no hallucinations detected)
5. Diversity & Variation
Track creative profiles to avoid repetition.
Diversity Rules:
- No repetition within 5 infographics (pattern + metaphor combo)
- Headline rotation (max 2 consecutive identical patterns)
- Icon system variation (rotate through 3+ styles)
- Shape language (avoid same shape 3x in row)
Novelty Score Target: >0.6 (good variation)
10-Agent Pipeline Architecture
Pipeline Flow
User Input (Article URL/Text + Preferences)
↓
[1] Article Ingestion → article_normalized
↓ (GATE: content length, parsability)
[2] Framework Detection → framework
↓ (GATE: 3-10 elements detected)
[3] Framework Validation → framework_validated
↓ (BLOCKING: all elements backed by article)
[4] Infographic Strategy → infographic_strategy
↓ (GATE: all elements mapped to panels)
[5] Creativity Orchestrator → creative_profile
↓ (diversity check vs. last N)
[6] Copy Compression → infographic_copy
↓ (BLOCKING: length limits, no hallucinations)
[7] Visual Design Brief → design_brief
↓ (GATE: structural consistency)
[8] Infographic Rendering → rendered_html
↓ (GATE: valid HTML, dimensions)
[9] Content & Creativity QA → qa_results
↓ (BLOCKING: no fabrications)
[10] Output Packaging → infographic_package
Agent Input/Output Contracts
Agent 1: Article Ingestion
Input: {article_source, target_channel}
Output: {article_normalized, ingestion_metadata}
Tool: HTTP fetch + parsing
Quality Gate: Hard fail if content <500 chars
Agent 2: Framework Detection & Extraction
Input: {article_normalized, framework_hint?, tone}
Output: {framework: {name, type, elements[], supporting_context}}
Tool: framework-extractor.py
Quality Gate: Hard fail if no 3-10 element framework
Agent 3: Framework Validation
Input: {framework, article_normalized}
Output: {framework_validated, confidence_score, issues[]}
Tool: framework-validator.py
Quality Gate: BLOCKING if confidence <0.7 or unsupported elements
Agent 4: Infographic Strategy & Pattern
Input: {framework_validated, target_channel, emphasis?}
Output: {infographic_strategy: {pattern, structure, title_options[]}}
Tool: pattern-selector.py
Quality Gate: Hard fail if any element unmapped
Agent 5: Creativity Orchestrator
Input: {framework_validated, infographic_strategy, brand_preferences, user_id}
Output: {creative_profile: {visual_metaphor, icon_system, shape_language, novelty_score}}
Tool: creativity-orchestrator.py + diversity-tracker.py
Quality Gate: Soft warning if novelty_score <0.3
Agent 6: Copy Compression & Microcopy
Input: {framework_validated, infographic_strategy, creative_profile, tone}
Output: {infographic_copy: {title, panels[], microcopy_constraints}}
Tool: copy-compressor.py
Quality Gate: BLOCKING if missing element or length violation
Agent 7: Visual Design Brief
Input: {infographic_copy, infographic_strategy, creative_profile, brand_preferences}
Output: {design_brief: {canvas, style, layout_spec, branding}}
Tool: Internal JSON assembly
Quality Gate: Hard fail if structural inconsistencies
Agent 8: Infographic Rendering
Input: {design_brief}
Output: {rendered_html, metadata}
Tool: html-generator.py ⭐ CREATIVE CORE
Quality Gate: Hard fail if invalid HTML
Agent 9: Content, Structural & Creativity QA
Input: {rendered_html, infographic_copy, framework_validated, creative_profile}
Output: {qa_results: {content_alignment_score, issues[], selected}}
Tool: content-qa.py
Quality Gate: BLOCKING if hallucinations detected
Agent 10: Output Packaging
Input: {rendered_html, qa_results, infographic_copy, design_brief}
Output: {infographic_package: {status, primary_html, json_spec}}
Tool: Internal assembly
Tools Usage
tools/framework-extractor.py
Detect and extract primary framework from article.
python tools/framework-extractor.py article.txt --framework-hint "5 pillars"
# Output:
{
"framework": {
"name": "The 5 Pillars of AI Transformation",
"type": "pillars",
"elements": [
{
"id": "pillar_1",
"label": "Data Foundation",
"summary": "Establish robust data infrastructure...",
"supporting_quotes": ["quote1", "quote2"]
}
]
},
"confidence": 0.92
}
tools/framework-validator.py
Validate extracted framework against article.
python tools/framework-validator.py framework.json article.txt
# Output:
{
"framework_validated": {...},
"confidence_score": 0.87,
"issues": [
{
"element_id": "step_3",
"issue": "Summary introduces claim not in article",
"severity": "high"
}
],
"validation_passed": true
}
tools/pattern-selector.py
Map framework to infographic pattern.
python tools/pattern-selector.py framework.json --channel linkedin_carousel
# Output:
{
"pattern": "vertical_process",
"rationale": "Sequential steps best shown as vertical flow",
"structure": {
"panels": [
{"id": "hero", "role": "hero"},
{"id": "step_1", "role": "step"}
]
},
"title_options": ["Option 1", "Option 2"]
}
Patterns:
- vertical_process (sequential steps)
- timeline (historical progression)
- hierarchy/pyramid (priority levels)
- pillars (independent columns)
- cycle (circular flow)
- stacked_layers (building blocks)
tools/creativity-orchestrator.py ⭐ KEY TOOL
Generate creative profile with visual metaphor.
python tools/creativity-orchestrator.py framework.json strategy.json \
--brand-colors "#1a1a2e,#0f3460,#16213e" \
--user-id "user_123" \
--history-window 5
# Output:
{
"creative_profile": {
"visual_metaphor": "mountain_climb",
"icon_system": "flat_duotone",
"shape_language": "pill_steps",
"divider_style": "rail_with_numbered_nodes",
"accent_motif": "corner_brackets",
"headline_pattern": "[FRAMEWORK_NAME]: [N] Steps to [OUTCOME]",
"novelty_score": 0.78
},
"diversity_notes": "Avoided 'roadmap' metaphor (used in last 2)"
}
Visual Metaphors (load from references/visual-metaphors.json):
- Steps: roadmap, ladder, mountain_climb, assembly_line
- Pillars: columns, control_panel, foundation_blocks
- Layers: stacked_blocks, pyramid, elevation_chart
- Cycle: orbit_model, loop_track, circular_flow
tools/copy-compressor.py
Compress article content to infographic-sized copy.
python tools/copy-compressor.py framework.json strategy.json \
--tone "match_article" \
--max-title-words 10 \
--max-heading-words 7 \
--max-bullet-words 15
# Output:
{
"infographic_copy": {
"title": "Your AI Transformation Stack: 5 Pillars",
"subtitle": "A practical framework for enterprise AI adoption",
"panels": [
{
"panel_id": "pillar_1",
"heading": "Data Foundation",
"body_bullets": [
"Build robust data pipelines",
"Ensure data quality and governance"
],
"highlight_stat": "80% of AI projects fail due to data issues"
}
]
},
"validation": {
"all_elements_present": true,
"length_compliance": true,
"hallucination_check": "passed"
}
}
tools/html-generator.py ⭐ CREATIVE CORE
Generate sophisticated single-page HTML infographic.
python tools/html-generator.py design-brief.json --output infographic.html
Key Features:
- Rich visual elements (gradients, shadows, SVG)
- Creative layouts per visual metaphor
- Typography hierarchy (size, weight, positioning)
- Color sophistication (gradients, transitions)
- WCAG AA accessibility (4.5:1 contrast)
- Output: Body content only (Lovable integration)
Technologies:
- Google Fonts integration
- Font Awesome / Heroicons
- Responsive design (mobile-first)
- Semantic HTML
tools/content-qa.py
Validate rendered HTML matches framework.
python tools/content-qa.py rendered.html framework.json infographic-copy.json
# Output:
{
"qa_results": {
"content_alignment_score": 0.94,
"issues": [],
"hallucination_check": {
"passed": true,
"fabricated_content": []
},
"accessibility_check": {
"wcag_aa_contrast": true,
"semantic_html": true,
"icon_text_pairing": true
}
},
"selected": true
}
tools/diversity-tracker.py
Track creative profiles to avoid repetition.
# Log new creative profile
python tools/diversity-tracker.py log user_123 creative-profile.json
# Check diversity vs. history
python tools/diversity-tracker.py check user_123 candidate-profile.json --window 5
# Output:
{
"diversity_score": 0.82,
"repeated_elements": [],
"recommendations": ["Vary icon_system next time"],
"history_count": 3
}
Quality Gates
Blocking Gates (Hard Fail)
- Framework Validation (Agent 3): Any element not backed by article
- Copy Compression (Agent 6): Missing element or length violation
- Content QA (Agent 9): Hallucinations detected
Warning Gates (Soft Fail)
- Article Ingestion (Agent 1): Extremely long content
- Framework Detection (Agent 2): Multiple candidates
- Creativity Orchestrator (Agent 5): Low novelty score (<0.3)
Success Metrics
- Completion Rate: ≥90% for well-structured articles
- Framework Fidelity: 0 missing/extra elements
- Content Accuracy: 0 hallucinations (hard requirement)
- Creativity Variation: No identical pattern+metaphor in last 5
- Latency: <3 minutes end-to-end
Token Budgeting
Total Budget: <25K tokens (target: 15-20K)
Per-Agent Allocation:
- Article Ingestion: 1K
- Framework Extraction: 3K
- Framework Validation: 2K
- Strategy & Pattern: 2K
- Creativity Orchestrator: 2K
- Copy Compression: 3K
- Visual Design Brief: 1K
- HTML Rendering: 5K (largest)
- Content QA: 2K
- Output Packaging: 1K
Usage Examples
Example 1: Generate from Substack URL
QINFOGRAPHIC: Create from https://substack.com/article/5-pillars-ai-transformation
# Orchestrator executes:
# 1. Fetch article
# 2. Extract "5 Pillars" framework
# 3. Validate against article (BLOCKING)
# 4. Select "pillars" pattern with "columns" metaphor
# 5. Generate creative profile (check last 5)
# 6. Compress copy (length limits)
# 7. Generate single-page HTML
# 8. QA for hallucinations (BLOCKING)
# 9. Output HTML + JSON spec
# Output:
# - infographic.html (embeddable)
# - infographic.json (spec)
Example 2: With Brand Preferences
QINFOGRAPHIC: Create from article.txt
- Channel: LinkedIn carousel
- Brand: Primary #1a1a2e, Accent #0f3460, Font: "Poppins"
- Emphasis: Highlight Step 3
# Orchestrator:
# - Apply brand colors throughout
# - Ensure LinkedIn carousel dimensions
# - Give Step 3 larger panel
# - Use Poppins from Google Fonts
Example 3: Generate Style Variant
QINFOGRAPHIC: New variant of last infographic with different visual metaphor
# Orchestrator:
# - Skip Agents 1-4 (reuse framework)
# - Re-run Agent 5 (Creativity) with new metaphor
# - Re-run Agents 6-10 with new creative profile
# - Generate different HTML with same content
Story Point Estimation
- Simple framework (3-5 elements, standard pattern): 2 SP
- Standard framework (6-8 elements, creative metaphor): 3 SP
- Complex framework (9-10 elements, custom layout): 5 SP
- Style variant (reuse extraction, new visuals): 1 SP
Creative Excellence Principles
Visual Elements (Not PowerPoint)
- Gradients and shadows (depth and dimension)
- Custom shapes (SVG paths, clip-paths)
- Asymmetric layouts (where appropriate)
- Layered composition (overlays, z-index)
Typography
- Multiple fonts (headline + body from Google Fonts)
- Creative positioning (not just left-aligned)
- Generous white space (breathing room)
- Weight hierarchy (bold, regular, light)
Color
- Gradient backgrounds (smooth transitions)
- Strategic accents (draw eye to key elements)
- Subtle textures (background interest)
- Dark/light variants (adapt to brand)
Accessibility Without Compromise
- WCAG AA contrast (4.5:1 minimum, verified)
- Semantic HTML (proper heading structure)
- Icon + text (never color alone)
- Scalable (readable at various sizes)
Diversity & Variation Strategy
Fingerprint Tracking
Each infographic generates fingerprint:
{
"pattern": "vertical_process",
"visual_metaphor": "mountain_climb",
"headline_pattern": "[FRAMEWORK_NAME]: [N] Steps",
"icon_system": "flat_duotone",
"shape_language": "pill_steps",
"color_pairing": "#1a1a2e+#0f3460",
"timestamp": "2025-01-15T10:30:00Z"
}
Novelty Score Calculation
novelty_score = (
pattern_uniqueness * 0.3 +
metaphor_uniqueness * 0.3 +
headline_uniqueness * 0.2 +
icon_uniqueness * 0.1 +
shape_uniqueness * 0.1
)
Target: novelty_score >0.6 Warning: novelty_score <0.3 (too repetitive)
Orchestration Retry Strategy
Retry Limits
- Maximum retries per agent: 2
- Total pipeline retries: 1 (full restart)
Fallback Strategies
Agent 2 (Framework Detection) Failure:
- Retry 1: Loosen element count (2-11 instead of 3-10)
- Retry 2: Ask user for explicit hint
- Final: Hard fail with clear error
Agent 5 (Creativity) Low Novelty:
- Retry 1: Force different metaphor + icon system
- Retry 2: Relax diversity window (last 3 instead of 5)
- Final: Proceed with warning (user can request variant)
Agent 8 (HTML Rendering) Failure:
- Retry 1: Simplify creative profile
- Retry 2: Fall back to generic template
- Final: Hard fail (no acceptable output)
Agent 9 (QA) Hallucination Detection:
- Retry 1: Re-run Agent 6 (Copy Compression) with stricter validation
- Retry 2: Human review prompt with issues
- Final: Hard fail (accuracy non-negotiable)
Error Messages
User-Facing Errors:
-
No framework detected: "Could not identify a clear framework (3-10 elements). Please provide a framework hint or try an article with numbered steps, pillars, or layers."
-
Validation failed: "Framework extraction failed validation. Some elements could not be backed by article content."
-
QA hallucination detected: "Quality assurance detected fabricated content. Cannot proceed without accuracy guarantee."
-
Rendering failed: "Could not generate HTML infographic. Please contact support."
Integration with Other Skills
With QWRITE (Writing System)
- Before QINFOGRAPHIC: Write article containing framework
- After QINFOGRAPHIC: Embed infographic HTML into article
With QPPT (Carousel Generator)
- Alternative format: Use framework for PowerPoint instead of HTML
- Shared data: Reuse framework extraction and validation
Performance Metrics
- Token Budget: <25K per pipeline
- Latency: <3 minutes end-to-end
- Completion Rate: ≥90% for well-structured articles
- Hallucination Rate: 0% (hard requirement)
- Creativity Variation: No repetition in last 5
Future Enhancements (Out of Scope v1)
- Multi-language support
- Animated infographics (CSS animations)
- Interactive elements (hover, click-to-expand)
- PDF export option
- Batch processing (multiple articles)
- A/B testing variants (3 designs, user picks)
- Social media auto-sizing (all platform variants)
Notes
- 10-agent pipeline: Sequential with quality gates at each stage
- Hallucination prevention: BLOCKING gates ensure accuracy
- Creative diversity: Tracks last 5 to avoid repetition
- Visual excellence: No PowerPoint aesthetics, HTML/CSS sophistication
- Accessibility: WCAG AA compliance throughout
- Token efficiency: <25K per full pipeline
- Output format: Single-page HTML (embeddable in Lovable)