Blog Chart logo

Blog Chart

CommunityPopular
AgriciDaniel
blog-chart

Generate dark-mode-compatible inline SVG data visualization charts for blog posts. Supports horizontal bar, grouped bar, donut, line, lollipop, area, and radar charts with automatic platform detection (HTML vs JSX/MDX). Enforces chart type diversity, accessible markup (role=img, aria-labelledby), source attribution, and transparent backgrounds. Use when user says "blog chart", "generate chart", "data visualization", "svg chart", "blog graph", or "visualize data".

Overview

PublisherAgriciDaniel
Repositoryclaude-blog
Skill nameblog-chart
Stars
2.2K
Forks
362
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by AgriciDaniel on GitHub. Read the source before you install it.

Installation

Install the Blog Chart AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AgriciDaniel/claude-blog.git /tmp/claude-blog
mkdir -p .claude/skills
cp -r /tmp/claude-blog/skills/blog-chart .claude/skills/blog-chart
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Blog Chart in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Blog Chart on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Blog Chart is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Blog Chart: Built-In SVG Data Visualization

Generates dark-mode-compatible inline SVG charts for blog posts. Invoked internally by blog-write and blog-rewrite when chart-worthy data is identified. Not a standalone user-facing command.

Styling source of truth: skills/blog/references/visual-media.md

For supported chart types, prefer the deterministic CLI:

bash
python3 skills/blog-chart/scripts/generate_chart_svg.py --input chart.json --output chart.html --json

Input Format

The writer or researcher passes a chart request:

Chart Request:
- Type: horizontal bar
- Title: "Quarterly Signups by Product"
- Data: Product A 420, Product B 315, Product C 180
- Source: [Verified source], [publication date]
- Platform: mdx (or html)

Chart Type Selection

Select based on the data pattern. Prefer chart type diversity, but repeat a type when comparability or reader comprehension clearly benefits.

Data PatternBest Chart Type
Before/after comparisonGrouped bar chart
Ranked factors / correlationsLollipop chart
Parts of whole / market shareDonut chart
Trend over timeLine chart
Percentage improvementHorizontal bar chart
Distribution / rangeArea chart
Multi-dimensional scoringRadar chart

Styling Rules (Non-Negotiable)

All charts must work on both dark and light backgrounds:

Text elements:     fill="currentColor"
Grid lines:        stroke="currentColor" opacity="0.08"
Axis lines:        stroke="currentColor" opacity="0.3"
Background:        transparent (no fill on root SVG)
Subtitle text:     fill="var(--chart-muted, currentColor)"
Source text:        fill="var(--chart-muted, currentColor)"
Label text:        fill="currentColor" opacity="0.8"

Set --chart-muted to an accessible text token in the host theme. If no token exists, use #4b5563 on light backgrounds and #d1d5db on dark backgrounds. Do not rely on low-opacity source or subtitle text for visible attribution.

Color Palette

ColorHexUse Case
Orange#f97316Primary / highest value
Sky Blue#38bdf8Secondary / comparison
Purple#a78bfaTertiary / special category
Green#22c55eQuaternary / positive indicator

For text inside approved colored elements: use fill="#111827" with fontWeight="800". Only use white text after checking the contrast ratio is at least 4.5:1 against that specific fill color.

Do not rely on color alone. Add direct labels, patterns, line dashes, marker shapes, or legend text so colorblind readers can distinguish series.

Standard SVG Shell (HTML)

xml
<svg
  viewBox="0 0 560 380"
  style="max-width: 100%; height: auto; font-family: 'Inter', system-ui, sans-serif"
  role="img"
  aria-labelledby="chart-title chart-desc"
>
  <title id="chart-title">Chart Title</title>
  <desc id="chart-desc">Description for screen readers with all key data points and source</desc>

  <!-- Chart content -->

  <text x="280" y="372" text-anchor="middle" font-size="10" fill="var(--chart-muted, currentColor)">
    Source: Source Name (Year)
  </text>
</svg>

JSX/MDX Shell (camelCase attributes)

jsx
<svg
  viewBox="0 0 560 380"
  style={{maxWidth: '100%', height: 'auto', fontFamily: "'Inter', system-ui, sans-serif"}}
  role="img"
  aria-labelledby="chart-title chart-desc"
>
  <title id="chart-title">Chart Title</title>
  <desc id="chart-desc">Description for screen readers</desc>

  {/* Chart content */}

  <text x="280" y="372" textAnchor="middle" fontSize="10" fill="var(--chart-muted, currentColor)">
    Source: Source Name (Year)
  </text>
</svg>

JSX Attribute Conversion (Required for MDX)

HTMLJSX
stroke-widthstrokeWidth
stroke-dasharraystrokeDasharray
stroke-linecapstrokeLinecap
text-anchortextAnchor
font-sizefontSize
font-weightfontWeight
font-familyfontFamily
classclassName
style="..."style={{...}}

Chart Type Construction

Horizontal Bar Chart

Best for: percentage improvements, single-metric comparisons.

  1. Define chart area: x=80, y=40, width=440, height=280
  2. Calculate bar height: chartHeight / dataCount - gap (gap=8)
  3. Calculate bar width: (value / maxValue) * chartWidth
  4. Position bars: y = chartY + index * (barHeight + gap)
  5. Label on left (right-aligned at x=75): category name
  6. Value label at end of bar: percentage or number
  7. Source text at bottom center

Grouped Bar Chart

Best for: before/after, A vs B comparisons.

  1. Define groups along Y axis, bars within each group
  2. Use 2 colors (primary + secondary) for the two series
  3. Add legend at top: colored square + label for each series
  4. Gap between groups > gap within groups

Donut Chart

Best for: parts of whole, market share.

  1. Center: cx=280, cy=180, outer radius=140, inner radius=80
  2. Calculate arc segments using cumulative angles
  3. Each segment: <path d="M... A... L... A... Z" fill="color" />
  4. Center text: total or key label
  5. Legend below chart with color squares + labels + values

Line Chart

Best for: trends over time.

  1. X axis: time periods, evenly spaced
  2. Y axis: value range with 4-5 grid lines
  3. Draw grid lines: stroke="currentColor" opacity="0.08"
  4. Plot data points: <circle cx=... cy=... r="4" fill="color" />
  5. Connect with: <polyline points="..." fill="none" stroke="color" strokeWidth="2" />
  6. Optional: area fill below line with opacity="0.1"

Lollipop Chart

Best for: ranked factors, correlations.

  1. Horizontal orientation (like bar chart but with circles)
  2. Thin line from axis to data point: stroke="currentColor" opacity="0.15" strokeWidth="1"
  3. Circle at data point: r="6" with fill color
  4. Value label next to circle
  5. Categories on Y axis (left-aligned)

Area Chart

Best for: distribution, cumulative data.

  1. Same as line chart but with filled area below
  2. Area fill: <path d="M... L... L... Z" fill="color" opacity="0.15" />
  3. Line on top: stroke="color" strokeWidth="2" fill="none"
  4. Grid lines behind the area

Radar Chart

Best for: multi-dimensional scoring (5-7 axes).

  1. Center: cx=280, cy=190
  2. Draw concentric polygons for grid (3-4 levels)
  3. Calculate axis endpoints at equal angles
  4. Plot data points on each axis proportional to value
  5. Connect data points with filled polygon: fill="color" opacity="0.2" stroke="color"
  6. Label each axis at the outer edge

Label Rules

  • Wrap long labels at word boundaries into <tspan> lines.
  • Truncate only when wrapping would collide with data marks, and keep the full label in <desc> or adjacent prose.
  • Use stable chart dimensions with a responsive max-width: 100%; height: auto style, or choose a justified wider viewBox for dense labels.
  • Check mobile widths so axis labels, legends, and value labels do not overlap.

Output Format

Wrap every chart in a <figure> element:

HTML:

html
<figure>
  <svg viewBox="0 0 560 380" style="max-width: 100%; height: auto; font-family: 'Inter', system-ui, sans-serif" role="img" aria-labelledby="chart-title chart-desc">
    <title id="chart-title">[Chart Title]</title>
    <desc id="chart-desc">[Full description with data points for screen readers]</desc>
    <!-- chart content -->
    <text x="280" y="372" text-anchor="middle" font-size="10" fill="var(--chart-muted, currentColor)">
      Source: [Source Name] ([Year])
    </text>
  </svg>
  <figcaption>Source: <a href="[Source URL]">[Source Name]</a>, [publication date].</figcaption>
</figure>

MDX:

mdx
<figure className="chart-container" style={{margin: '2.5rem 0', textAlign: 'center', padding: '1.5rem', borderRadius: '12px'}}>
  <svg viewBox="0 0 560 380" style={{maxWidth: '100%', height: 'auto', fontFamily: "'Inter', system-ui, sans-serif"}} role="img" aria-labelledby="chart-title chart-desc">
    <title id="chart-title">[Chart Title]</title>
    <desc id="chart-desc">[Full description]</desc>
    {/* chart content with camelCase attributes */}
    <text x="280" y="372" textAnchor="middle" fontSize="10" fill="var(--chart-muted, currentColor)">
      Source: [Source Name] ([Year])
    </text>
  </svg>
  <figcaption>Source: <a href="[Source URL]">[Source Name]</a>, [publication date].</figcaption>
</figure>

Quality Checklist (Verify Before Returning)

  • No hardcoded text colors except contrast-checked labels inside colored elements
  • No white/light backgrounds (transparent or none)
  • Source attribution text present at bottom and semantic <figcaption> present
  • role="img" and aria-labelledby present on <svg>
  • <title id> and <desc id> present inside <svg>
  • Chart type choice supports comprehension and comparability
  • If MDX: all attributes camelCased (no hyphens in attribute names)
  • Data values match the source data exactly
  • Color palette uses only approved colors
  • ViewBox is 0 0 560 380 (standard) or justified alternative
  • Labels, shapes, patterns, or line styles provide redundancy beyond color

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Blog Chart AI skill do?

Generate dark-mode-compatible inline SVG data visualization charts for blog posts. Supports horizontal bar, grouped bar, donut, line, lollipop, area, and radar charts with automatic platform detection (HTML vs JSX/MDX). Enforces chart type diversity, accessible markup (role=img, aria-labelledby), source attribution, and transparent backgrounds. Use when user says "blog chart", "generate chart", "data visualization", "svg chart", "blog graph", or "visualize data".

Why use Blog Chart on TypingMind?

Because you install it once and use it with any model. Blog Chart is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Blog Chart in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/AgriciDaniel/claude-blog/tree/main/skills/blog-chart. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Blog Chart?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Blog Chart?

As many as you like. As long as a model supports skills, you can use Blog Chart with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Blog Chart AI skill free?

Yes. It is published on GitHub by AgriciDaniel under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇