Blog Cost Chartsのロゴ

Blog Cost Charts

コミュニティ
akitaonrails
blog-cost-charts

LLMベンチマーク結果を比較するブログ記事(またはスコア・コスト・時間のデータがある任意のデータセット)向けに、ダークテーマのコスト対スコアのバブル散布図と、スコア/(コスト*時間)に基づく価値ランキングの棒グラフをポルトガル語と英語で作成します。グラフをS3にアップロードし、Hugoの記事に埋め込みます。akitaonrails.comのランキング表の後に、モデルや選択肢の比較を視覚的に示すチャートやグラフを追加したいとユーザーが依頼した場合に使います。

Add to TypingMind

概要

公開者akitaonrails
リポジトリmy-skills
スキル名blog-cost-charts
スター
268
フォーク
31
同梱ファイル
2
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 2個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    akitaonrailsがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Blog Cost Charts」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/akitaonrails/my-skills/tree/master/blog-cost-charts
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/akitaonrails/my-skills.git /tmp/my-skills
mkdir -p .claude/skills
cp -r /tmp/my-skills/blog-cost-charts .claude/skills/blog-cost-charts
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでBlog Cost Chartsを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にBlog Cost Chartsを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Blog Cost Chartsは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Blog Cost/Value Charts

You help turn a ranking table (score, cost, time, per item) into two companion charts for a blog post on this Hugo site: a cost-vs-score bubble scatter, and a score/(cost×time) value-ranking bar chart. Both are produced dark-themed, one PNG per language the article ships in (normally pt and en), and get embedded right after the ranking table.

This came out of the v4 LLM benchmark article (content/2026/09/15/novo-llm-benchmark-v4-*), which needed exactly this pair of charts to make a 39-row table skimmable. The script here is the generalized version of the one-off script written for that post.

When to use

  • The article has a table with a numeric score, a cost, and a time (or any three comparable numeric axes) per row, and the user wants a visual "which one is the best deal" comparison instead of just the raw table.
  • Explicitly requested: "add graphs/charts after the table", "make this easier to compare visually", "cost-benefit chart", etc.

Workflow

1. Pick the dataset and scope

Not every row in a big table belongs in the chart. Decide, and say so in the chart's own footnote:

  • Which rows have a genuinely comparable cost figure? Exclude free, uncommitted, or flat-rate-plan entries that can't sit meaningfully on a dollar axis (a $0 point breaks a log scale; a flat-rate plan has no per-run dollar figure at all). Call these out by name in the footnote rather than silently dropping them.
  • If costs come from different harnesses/pricing bases (e.g. a real per-token API cost vs. a notional share of a flat subscription), don't hide that — color-code by group (see below) and say so in the footnote and in the article's own prose, the same way the source table already should.
  • A curated subset (15-25 points) reads far better than cramming all 39+ rows in; prefer restricting to the tier/category the article's own prose is actually discussing (e.g. "Tier A only") over trying to fit everything.

2. Build the JSON config

Copy scripts/config.example.json and edit it. Shape:

jsonc
{
  "slug": "v4",                    // filename prefix for the output PNGs
  "x_log": true,                    // log-scale cost axis (usually yes: cost ranges span 100x+)
  "x_lim": [0.7, 160],               // tune to the actual data range with a little padding
  "y_lim": [84.5, 102.2],
  "x_ticks": [1, 3, 10, 30, 100],
  "x_tick_fmt": "${}",
  "group_colors": { "codex": "#5fd35f", "claude": "#e8965a", "...": "..." },
  "models": [
    {"name": "GPT-6 Astra", "score": 100.0, "cost": 30.55, "minutes": 100, "group": "codex"}
  ],
  "text": {
    "pt": { "scatter_title": "...", "scatter_subtitle": "...", "scatter_xlabel": "...",
            "scatter_ylabel": "...", "groups": {"codex": "Codex (OpenAI)"},
            "footnote": "...", "ranking_title": "...", "ranking_subtitle": "...",
            "ranking_xlabel": "...", "ranking_footnote": "..." },
    "en": { /* same keys, English copy */ }
  }
}

Every key under text.<lang> must be filled per language — there's no translation step in the script, it just renders whatever string you give it. Match the site's voice rules for both languages (PT-BR: Akita's direct, skeptical voice, no em dashes; EN: New Yorker tone, same rules) — these strings are visible chart copy, not throwaway labels.

3. Tune label offsets to avoid overlap

Bubble charts with several models at a similar cost/score WILL collide on first render. Run the script once, actually look at the output image (Read tool, not just "it ran without error"), and add a label_offsets map to the config for any name whose label overlaps another:

jsonc
"label_offsets": { "GPT 5.6 sol": [14, -22], "GPT 5.6 terra": [-14, 20] }

Values are [dx, dy] in points from the bubble center. Expect 2-3 iterations of render → look → nudge before it's clean. This is the single most time-consuming part of the workflow; budget for it rather than shipping the first render.

4. Generate

bash
python3 scripts/make_charts.py path/to/config.json --outdir /path/to/scratchpad/charts

Outputs <slug>-cost-score-<lang>.png and <slug>-value-ranking-<lang>.png per language key in text. Read each image back before moving on — check for: overlapping labels, title/subtitle collisions, a legend sitting on top of data, and that the value-ranking numbers look sane (spot-check one or two by hand: score / (cost * minutes) * 1000).

5. Upload to S3 — do not skip this

Static blog posts can't reference local files. Every PNG must go up before it's embeddable:

bash
set -a; source ~/.config/zsh/secrets 2>/dev/null; set +a
for f in <slug>-cost-score-pt.png <slug>-cost-score-en.png <slug>-value-ranking-pt.png <slug>-value-ranking-en.png; do
  aws s3 cp "/path/to/scratchpad/charts/$f" "s3://new-uploads-akitaonrails/YYYY/MM/DD/$f" \
    --region us-east-2 --content-type image/png
done

Use the article's own publish date for the YYYY/MM/DD path, matching the convention already used for post images. After uploading, verify each URL actually resolves (don't just trust the upload exit code):

bash
curl -s -o /dev/null -w "%{http_code}\n" \
  "https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/YYYY/MM/DD/<file>.png"

Expect 200 for all four.

6. Embed in the article

Insert right after the ranking table's own footnotes/caveats (before moving on to narrative sections), one language-appropriate image per post, with a short lead-in sentence and a plain-language alt text describing the axes:

markdown
![Bubble chart: dollar cost on the X axis (log scale) against score on the Y axis, bubble size is wall-clock time, color is the harness](https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/YYYY/MM/DD/<slug>-cost-score-en.png)

Do this in both the index.md (PT) and index.en.md (EN) siblings in the same turn, each pointing at its own language's PNG — never mix languages in one post's images.

7. Rebuild and verify before committing

bash
hugo --minify
grep -o 'https://new-uploads-akitaonrails.s3[^")]*' public/<pt-path>/index.html
grep -o 'https://new-uploads-akitaonrails.s3[^")]*' public/en/<en-path>/index.html

Confirm the build has no errors and each language's page references its own PNG. Then commit both markdown files together (they're a translation pair — see the site's bilingual-editing rule) and push per the user's usual publish flow.

Design notes (why the script looks like this)

  • Dark theme, log-scale cost axis, bubble size = time: mirrors a reference chart style the user has used before (#0d1117 background, colored bubbles, muted gridlines). Cost in a benchmark context routinely spans two-plus orders of magnitude ($0.90 to $120+), so linear cost axes make cheap options indistinguishable — always log-scale it.
  • Color = group, not score: coloring by cost basis/harness (real API $ vs. notional subscription $ vs. free) visually carries the "these aren't directly comparable" caveat that the article's prose already has to state in words. Don't color by score/tier instead; that duplicates the Y axis.
  • Value index = score / (cost × time), scaled ×1000 for readable numbers: this combined ranking routinely surprises — a model with a merely-good score but very low cost AND fast wall time can out-rank the single highest-score cheap model. Call that out explicitly in the article's prose next to the chart; it's usually the actual news, not filler.
  • Never automate the "which rows to include" decision: that's an editorial judgment about the article's argument, not a data-cleaning step.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Blog Cost Charts」では何ができますか?

LLMベンチマーク結果を比較するブログ記事(またはスコア・コスト・時間のデータがある任意のデータセット)向けに、ダークテーマのコスト対スコアのバブル散布図と、スコア/(コスト*時間)に基づく価値ランキングの棒グラフをポルトガル語と英語で作成します。グラフをS3にアップロードし、Hugoの記事に埋め込みます。akitaonrails.comのランキング表の後に、モデルや選択肢の比較を視覚的に示すチャートやグラフを追加したいとユーザーが依頼した場合に使います。

TypingMindでBlog Cost Chartsを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Blog Cost Chartsはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにBlog Cost Chartsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/akitaonrails/my-skills/tree/master/blog-cost-chartsを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Blog Cost Chartsを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Blog Cost Chartsで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもBlog Cost Chartsを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Blog Cost Charts」は無料ですか?

akitaonrailsがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇