Agent skill
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-label), source attribution, and transparent backgrounds. Use when user says "blog chart", "generate chart", "data visualization", "svg chart", "blog graph", "visualize data", or when the blog-write workflow identifies chart-worthy data points (3+ comparable metrics, trends, before/after data).
Install this agent skill to your Project
npx add-skill https://github.com/AgriciDaniel/claude-blog/tree/main/skills/blog-chart
SKILL.md
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: references/visual-media.md
Input Format
The writer or researcher passes a chart request:
Chart Request:
- Type: horizontal bar
- Title: "AI Citation Sources by Platform"
- Data: ChatGPT 43.8%, Perplexity 6.6%, Google AI Overviews 2.2%, Reddit 7.15%
- Source: Ahrefs, December 2025
- Platform: mdx (or html)
Chart Type Selection
Select based on the data pattern. Diversity is mandatory - never repeat a type within one post.
| Data Pattern | Best Chart Type |
|---|---|
| Before/after comparison | Grouped bar chart |
| Ranked factors / correlations | Lollipop chart |
| Parts of whole / market share | Donut chart |
| Trend over time | Line chart |
| Percentage improvement | Horizontal bar chart |
| Distribution / range | Area chart |
| Multi-dimensional scoring | Radar 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="currentColor" opacity="0.45"
Source text: fill="currentColor" opacity="0.35"
Label text: fill="currentColor" opacity="0.8"
Color Palette
| Color | Hex | Use Case |
|---|---|---|
| Orange | #f97316 |
Primary / highest value |
| Sky Blue | #38bdf8 |
Secondary / comparison |
| Purple | #a78bfa |
Tertiary / special category |
| Green | #22c55e |
Quaternary / positive indicator |
For text inside colored elements: fill="white" with fontWeight="800".
Standard SVG Shell (HTML)
<svg
viewBox="0 0 560 380"
style="max-width: 100%; height: auto; font-family: 'Inter', system-ui, sans-serif"
role="img"
aria-label="Chart description with key data point"
>
<title>Chart Title</title>
<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="currentColor" opacity="0.35">
Source: Source Name (Year)
</text>
</svg>
JSX/MDX Shell (camelCase attributes)
<svg
viewBox="0 0 560 380"
style={{maxWidth: '100%', height: 'auto', fontFamily: "'Inter', system-ui, sans-serif"}}
role="img"
aria-label="Chart description"
>
<title>Chart Title</title>
<desc>Description for screen readers</desc>
{/* Chart content */}
<text x="280" y="372" textAnchor="middle" fontSize="10" fill="currentColor" opacity="0.35">
Source: Source Name (Year)
</text>
</svg>
JSX Attribute Conversion (Required for MDX)
| HTML | JSX |
|---|---|
stroke-width |
strokeWidth |
stroke-dasharray |
strokeDasharray |
stroke-linecap |
strokeLinecap |
text-anchor |
textAnchor |
font-size |
fontSize |
font-weight |
fontWeight |
font-family |
fontFamily |
class |
className |
style="..." |
style={{...}} |
Chart Type Construction
Horizontal Bar Chart
Best for: percentage improvements, single-metric comparisons.
- Define chart area: x=80, y=40, width=440, height=280
- Calculate bar height:
chartHeight / dataCount - gap(gap=8) - Calculate bar width:
(value / maxValue) * chartWidth - Position bars:
y = chartY + index * (barHeight + gap) - Label on left (right-aligned at x=75): category name
- Value label at end of bar: percentage or number
- Source text at bottom center
Grouped Bar Chart
Best for: before/after, A vs B comparisons.
- Define groups along Y axis, bars within each group
- Use 2 colors (primary + secondary) for the two series
- Add legend at top: colored square + label for each series
- Gap between groups > gap within groups
Donut Chart
Best for: parts of whole, market share.
- Center: cx=280, cy=180, outer radius=140, inner radius=80
- Calculate arc segments using cumulative angles
- Each segment:
<path d="M... A... L... A... Z" fill="color" /> - Center text: total or key label
- Legend below chart with color squares + labels + values
Line Chart
Best for: trends over time.
- X axis: time periods, evenly spaced
- Y axis: value range with 4-5 grid lines
- Draw grid lines:
stroke="currentColor" opacity="0.08" - Plot data points:
<circle cx=... cy=... r="4" fill="color" /> - Connect with:
<polyline points="..." fill="none" stroke="color" strokeWidth="2" /> - Optional: area fill below line with
opacity="0.1"
Lollipop Chart
Best for: ranked factors, correlations.
- Horizontal orientation (like bar chart but with circles)
- Thin line from axis to data point:
stroke="currentColor" opacity="0.15" strokeWidth="1" - Circle at data point:
r="6"with fill color - Value label next to circle
- Categories on Y axis (left-aligned)
Area Chart
Best for: distribution, cumulative data.
- Same as line chart but with filled area below
- Area fill:
<path d="M... L... L... Z" fill="color" opacity="0.15" /> - Line on top:
stroke="color" strokeWidth="2" fill="none" - Grid lines behind the area
Radar Chart
Best for: multi-dimensional scoring (5-7 axes).
- Center: cx=280, cy=190
- Draw concentric polygons for grid (3-4 levels)
- Calculate axis endpoints at equal angles
- Plot data points on each axis proportional to value
- Connect data points with filled polygon:
fill="color" opacity="0.2" stroke="color" - Label each axis at the outer edge
Output Format
Wrap every chart in a <figure> element:
HTML:
<figure>
<svg viewBox="0 0 560 380" style="max-width: 100%; height: auto; font-family: 'Inter', system-ui, sans-serif" role="img" aria-label="[description]">
<title>[Chart Title]</title>
<desc>[Full description with data points for screen readers]</desc>
<!-- chart content -->
<text x="280" y="372" text-anchor="middle" font-size="10" fill="currentColor" opacity="0.35">
Source: [Source Name] ([Year])
</text>
</svg>
</figure>
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-label="[description]">
<title>[Chart Title]</title>
<desc>[Full description]</desc>
{/* chart content with camelCase attributes */}
<text x="280" y="372" textAnchor="middle" fontSize="10" fill="currentColor" opacity="0.35">
Source: [Source Name] ([Year])
</text>
</svg>
</figure>
Quality Checklist (Verify Before Returning)
- No hardcoded text colors (all use
currentColor) - No white/light backgrounds (transparent or none)
- Source attribution text present at bottom
-
role="img"andaria-labelpresent on<svg> -
<title>and<desc>present inside<svg> - Chart type not already used in this post
- 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
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
blog-brief
Generate detailed content briefs for blog posts with target keywords, content outlines, competitive analysis, recommended statistics, image and chart suggestions, word count targets, internal linking architecture, template recommendations (12 types), TL;DR drafts, citation capsule planning, information gain prompts, and multi-channel distribution plans. Briefs are optimized for Google rankings and AI citations (GEO/AEO). Use when user says "content brief", "blog brief", "write brief", "outline blog", "plan blog post", "blog outline", "content outline".
blog
Full-lifecycle blog engine with 21 commands, 12 content templates, 5-category 100-point scoring, and 4 specialized agents. Optimized for Google rankings (December 2025 Core Update, E-E-A-T) and AI citations (GEO/AEO). Writes, rewrites, analyzes, outlines, audits, and repurposes blog content with answer-first formatting, sourced statistics, Pixabay/Unsplash/Pexels images, AI image generation via Gemini, built-in SVG chart generation, JSON-LD schema generation, and freshness signals. Supports any platform (WordPress, Next.js MDX, Hugo, Ghost, Astro, Jekyll, 11ty, Gatsby, HTML). Use when user says "blog", "write blog", "blog post", "blog strategy", "content brief", "editorial calendar", "analyze blog", "rewrite blog", "update blog", "blog SEO", "blog optimization", "content plan", "blog outline", "seo check", "schema markup", "repurpose", "geo audit", "blog audit", "citation readiness".
blog-persona
Create and manage writing personas with NNGroup 4-dimension tone framework (Funny-Serious, Formal-Casual, Respectful-Irreverent, Enthusiastic-Matter-of-fact). Personas define readability targets, sentence length distribution, vocabulary tier, contraction frequency, and summary box label. Used by blog-write and blog-rewrite to enforce consistent voice. Use when user says "persona", "voice", "tone", "writing style", "brand voice", "create persona", "use persona".
blog-analyze
Audit and score blog posts on a 5-category 100-point scoring system covering content quality, SEO optimization, E-E-A-T signals, technical elements, and AI citation readiness. Includes AI content detection (burstiness, phrase flagging, vocabulary diversity). Supports export formats (markdown, JSON, table) and batch analysis with sorting. Generates prioritized recommendations (Critical/High/Medium/Low) with specific fixes. Works with any format (MDX, markdown, HTML, URL). Use when user says "analyze blog", "audit blog", "blog score", "check blog quality", "blog review", "rate this blog", "blog health check".
blog-taxonomy
Extract, suggest, and sync tags and categories for blog posts across all major CMS platforms. Supports WordPress REST API, Shopify GraphQL, Ghost Content API, Strapi REST/GraphQL, and Sanity GROQ. Generates tag suggestions from content analysis (keyword frequency, heading extraction, semantic grouping), enforces minimum post-count thresholds to prevent thin tag archives, and syncs taxonomy via authenticated API calls. Use when user says "tags", "categories", "taxonomy", "tag suggestions", "sync tags", "WordPress tags", "Shopify tags".
blog-audit
Full-site blog health assessment scanning all blog files for quality scores, orphan pages, topic cannibalization, stale content, and AI citation readiness. Spawns parallel subagents for comprehensive analysis. Produces per-post scores and a prioritized action queue. Use when user says "audit blog", "blog audit", "site audit", "blog health", "audit all posts", "check all blogs".
Didn't find tool you were looking for?