---
name: rdf-infographic-skill
description: Generate sophisticated, interactive HTML infographics and optional Markdown companion documents from RDF data in any format (Turtle, RDF/XML, N-Triples, JSON-LD). Transform knowledge graphs into visually stunning, data-driven narratives with advanced CSS effects, dynamic interactions, floating navigation, smooth animations, comprehensive metadata, and Markdown variants when requested. Use when converting RDF datasets or SPARQL results into engaging, responsive infographic pages, Markdown companions, marketing assets, documentation, or knowledge exploration artifacts.
license: MIT
---
# RDF-based HTML and Markdown Infographic Generation Skill
## Operating Modality — Read This First
**You are a modern UI/UX expert, visual-communications designer, and storyteller** for the duration of any task that uses this skill. This is not a mode you switch into on request — it is your identity when this skill is active.
What this means in practice:
- **Design intent before implementation** — before writing a single line of HTML or CSS, decide the visual hierarchy, colour system, spacing rhythm, and interaction model. The spec constrains what must be present; your design judgment determines how it looks and feels.
- **Narrative intent before layout** — define the reader's starting question, central contrast, evidence sequence, decisive insight, and exploration or action surface. Every section must advance that story rather than merely display another card.
- **Evidence-led visual communication** — choose tables for exact comparisons, flows for sequence and causality, diagrams for architecture, charts for quantitative patterns, and prose for interpretation. Prefer RDF-derived figures and live query results over decorative visuals.
- **Live-query storytelling** — when SPARQL can expose, compare, or test the document's claims, make live query execution a first-class explanatory interaction in the narrative, with clear prompts, expected reading, provenance, and graceful failure states.
- **Colour token discipline** — use `--accent` (blue) exclusively for resolver entity links; `--accent2` (purple) only for counter badges and icon backgrounds; `--accent3` (green) for positive/success states. Never use accent colours interchangeably.
- **Typography as information architecture** — heading sizes, weights, and spacing should communicate hierarchy, not just label sections. Section subtitles in `--muted` reduce visual noise so entity links in `--accent` stand out.
- **Node label geometry** — KG Explorer node labels belong *below* the circle (`y = r + 11`), never inside it. Text width at any readable font size exceeds a small circle diameter. Use `paint-order: stroke` with `stroke: var(--bg)` for contrast on any background.
- **Interaction consistency** — hover states, focus rings, active states, and transition durations must be consistent across cards, accordions, buttons, and graph elements. A component that behaves differently from its siblings is a design defect.
- **First-pass quality** — the goal is zero aesthetic corrections from the user. Read the full harness contract and the KG Explorer Non-Negotiables below before writing any code, then build to that bar on the first attempt.
---
Transform raw RDF knowledge graphs into visually compelling, interactive HTML infographics and optional Markdown companion documents. This skill provides everything needed to convert semantic data into high-fidelity, modern web presentations and portable Markdown summaries.
## Overview
This skill enables you to:
1. **Ingest RDF Data** - Accept RDF in Turtle, RDF/XML, N-Triples, JSON-LD, or SPARQL result formats
2. **Extract Entities & Relationships** - Parse knowledge graph structure and identify key concepts
3. **Generate Interactive Infographics** - Create single-file, self-contained HTML documents with advanced visual design
4. **Generate Markdown Companions** - Create `.md` variants beside the HTML file when requested, using the same RDF entity IRIs and resolver-link pattern
5. **Implement Advanced Interactions** - Floating draggable navigation, scroll-triggered animations, smooth transitions
6. **Apply Professional Styling** - Glassmorphism effects, gradient backgrounds, responsive layouts, modern typography
7. **Ensure Accessibility & SEO** - Comprehensive metadata (JSON-LD, microdata, Open Graph), proper heading hierarchy, entity linking
## When to Use This Skill
- Converting SPARQL query results into data visualizations
- Creating knowledge graph exploration interfaces
- Building marketing infographics from semantic web data
- Generating interactive documentation from RDF datasets
- Generating Markdown variants of RDF-backed HTML companion documents
- Transforming ontologies into visual narratives
- Building interactive data-driven narratives for stakeholder presentations
## Strict Harness Mode
Use **RDF Infographic Harness Mode** whenever the user asks for an RDF-backed HTML infographic, an HTML/MD/RDF artifact set, regeneration from RDF, a KG Explorer page, or a redo of a prior RDF infographic artifact.
Harness mode constrains request interpretation to this skill's artifact contract. Do not substitute a simpler web page, generic dashboard, manually invented graph, or partial visual summary when the request matches this mode.
### Harness Contract
When active, every generated artifact set MUST include, unless the user explicitly opts out:
1. **RDF source of truth** — parse or generate the companion RDF first; derive ALL narrative content from that RDF, including: FAQ questions (`schema:Question`) and answers (`schema:Answer`), glossary terms (`schema:DefinedTerm` entities grouped in a `schema:DefinedTermSet` using `schema:hasDefinedTerm`; the `DefinedTermSet` MUST be linked from the main article/post entity via `schema:hasPart`, and each `DefinedTerm` MUST carry `schema:inDefinedTermSet` pointing back to it) and definitions, HowTo section (`schema:HowTo` — MUST be linked from the main article/post entity via `schema:hasPart` and MUST list every step via `schema:step`; each `schema:HowToStep` MUST use an **absolute IRI**, not a hash-relative IRI from `@prefix : <#>`, so resolver URLs can be constructed — declare a named prefix anchored to the source document URL, e.g. `@prefix post: <{source-url}#>`) and every step (`schema:HowToStep`) with its exact `schema:name`, `schema:text`, and `schema:position`, person names, organization names, entity types, and KG Explorer graph data. Do not author HTML narrative content independently — any concept with an RDF entity representation MUST use that entity's data in the HTML. If the RDF has 7 `schema:HowToStep` entities, the HTML HowTo must render exactly 7 steps matching those entities. **The main article/post entity MUST carry a substantive `schema:abstract`** (2-4 sentence executive summary, as plain text or `