blog-chart
ブログ記事に最適な、ダークモード対応のSVG形式データ可視化チャート(棒グラフ、円グラフなど)を自動生成し、多様な表現、アクセシビリティ対応、出典明記、背景透過処理まで行うSkill。
📜 元の英語説明(参考)
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).
🇯🇵 日本人クリエイター向け解説
ブログ記事に最適な、ダークモード対応のSVG形式データ可視化チャート(棒グラフ、円グラフなど)を自動生成し、多様な表現、アクセシビリティ対応、出典明記、背景透過処理まで行うSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o blog-chart.zip https://jpskill.com/download/10516.zip && unzip -o blog-chart.zip && rm blog-chart.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/10516.zip -OutFile "$d\blog-chart.zip"; Expand-Archive "$d\blog-chart.zip" -DestinationPath $d -Force; ri "$d\blog-chart.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
blog-chart.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
blog-chartフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
ブログチャート -- 組み込み SVG データ可視化
ブログ記事用にダークモードに対応したインライン SVG チャートを生成します。チャートに適したデータが識別された際に、blog-write および blog-rewrite によって内部的に呼び出されます。スタンドアロンのユーザー向けコマンドではありません。
スタイリングの信頼できる情報源: references/visual-media.md
入力形式
ライターまたはリサーチャーは、チャートリクエストを渡します。
チャートリクエスト:
- 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)
チャートタイプの選択
データパターンに基づいて選択します。多様性は必須です。1つの投稿内で同じタイプを繰り返さないでください。
| データパターン | 最適なチャートタイプ |
|---|---|
| ビフォー/アフター比較 | グループ化された棒グラフ |
| ランク付けされた要素/相関関係 | ロリポップチャート |
| 全体の部分/市場シェア | ドーナツチャート |
| 時間経過に伴うトレンド | 折れ線グラフ |
| パーセンテージ改善 | 横棒グラフ |
| 分布/範囲 | 面グラフ |
| 多次元スコアリング | レーダーチャート |
スタイリングルール (交渉不可)
すべてのチャートは、ダークとライト両方の背景で動作する必要があります。
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"
カラーパレット
| 色 | Hex | ユースケース |
|---|---|---|
| オレンジ | #f97316 |
プライマリ/最高値 |
| スカイブルー | #38bdf8 |
セカンダリ/比較 |
| 紫 | #a78bfa |
ターシャリ/特別なカテゴリ |
| 緑 | #22c55e |
クォータナリ/ポジティブな指標 |
色付き要素内のテキストの場合: fill="white" と fontWeight="800" を使用します。
標準 SVG シェル (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 シェル (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 属性変換 (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={{...}} |
チャートタイプの構築
横棒グラフ
最適: パーセンテージ改善、単一メトリックの比較。
- チャート領域の定義: x=80, y=40, width=440, height=280
- 棒の高さの計算:
chartHeight / dataCount - gap(gap=8) - 棒の幅の計算:
(value / maxValue) * chartWidth - 棒の位置決め:
y = chartY + index * (barHeight + gap) - 左側のラベル (x=75 で右揃え): カテゴリ名
- 棒の端にある値ラベル: パーセンテージまたは数値
- 下部中央のソーステキスト
グループ化された棒グラフ
最適: ビフォー/アフター、A vs B の比較。
- Y軸に沿ってグループを定義し、各グループ内に棒を定義します
- 2つの系列に2つの色 (プライマリ + セカンダリ) を使用します
- 上部に凡例を追加: 各系列の色付きの正方形 + ラベル
- グループ間のギャップ > グループ内のギャップ
ドーナツチャート
最適: 全体の部分、市場シェア。
- 中心: cx=280, cy=180, 外側の半径=140, 内側の半径=80
- 累積角度を使用して円弧セグメントを計算します
- 各セグメント:
<path d="M... A... L... A... Z" fill="color" /> - 中央のテキスト: 合計またはキーラベル
- チャートの下の凡例: 色の正方形 + ラベル + 値
折れ線グラフ
最適: 時間経過に伴うトレンド。
- X軸: 時間間隔、等間隔
- Y軸: 4〜5本のグリッド線を持つ値の範囲
- グリッド線を描画:
stroke="currentColor" opacity="0.08" - データポイントをプロット:
<circle cx=... cy=... r="4" fill="color" /> - 接続:
<polyline points="..." fill="none" stroke="color" strokeWidth="2" /> - オプション:
opacity="0.1"で線の下の領域を塗りつぶします
ロリポップチャート
最適: ランク付けされた要素、相関関係。
- 水平方向 (棒グラフのようですが、円があります)
- 軸からデータポイントまでの細い線:
stroke="currentColor" opacity="0.15" strokeWidth="1" - データポイントの円:
r="6"と塗りつぶしの色 - 円の隣の値ラベル
- Y軸のカテゴリ (左揃え)
面グラフ
最適: 分布、累積データ。
- 折れ線グラフと同じですが、下の領域が塗りつぶされています
- 領域の塗りつぶし:
<path d="M... L... L... Z" fill="color" opacity="0.15" /> - 上部の線:
stroke="color" strokeWidth="2" fill="none" - 領域の背後にあるグリッド線
レーダーチャート
最適: 多次元スコアリング (5〜7軸)。
- 中心: cx=280, cy=190
- グリッド用に同心円状のポリゴンを描画します (3〜4レベル)
- 等しい角度で軸の終点を計算します
- 値に比例して各軸にデータポイントをプロットします
- 塗りつぶされたポリゴンでデータポイントを接続します:
fill="color" opacity="0.2" stroke="color" - 外側のエッジにある各軸にラベルを付けます
出力形式
すべてのチャートを <figure> 要素でラップします。
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]">
(原文はここで切り詰められています) 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
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