chart-rendering
できること
質問に合ったグラフの種類を選び、タイトルとラベルを付けた画像として描きます。分析の結果を長い表で読むより、絵で見たい人向けです。
使う場面
- ✓数字のグラフや図を頼むとき。
- ✓多くの行を含む結果を、表より絵で読みやすくしたいとき。
- ✓値が時間とともにどう変わるかを見たいとき。
スキルのリンク
https://github.com/agentscope-ai/agentscope-java/blob/main/agentscope-examples/agents/agentscope-dataagent/src/main/resources/shared/agents/data-agent/skills/chart-rendering/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“毎月の新規登録数を、過去1年分の折れ線グラフにしてください。タイトルと軸のラベルを分かりやすく付けてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
スキルは、まず質問をグラフの種類に当てはめます。たとえば、変化には折れ線、カテゴリーの比較には棒を選びます。そのあと、グラフを描いて画像を保存する短いスクリプトを書き、画像とスクリプトを一緒に残します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Chart Rendering Skill
Repeatable SOP for turning a result set into a chart that actually communicates the point.
Steps
Match chart type to question. Decide before drawing:
Question shape Chart "How does X change over time?" Line (single series) or multi-line "Composition / share of total" Stacked bar, or 100% stacked area "Comparison across a small set of categories" Bar (horizontal if labels are long) "Relationship between two numeric variables" Scatter "Distribution of a single variable" Histogram or box plot "Cumulative total" Area If none fit, ask the user which view they want — do not default to "any chart will do".
Prepare the data. The query result from the [[sql-analysis]] Skill should already be tidy (one row per data point, one column per dimension). If not, reshape first using pandas (
pivot,melt,groupby). Save the cleaned frame toknowledge/cache/<topic>.csvso it can be re-rendered.Render with matplotlib. Write the script to a file under
scratch/charts/<topic>.pyand execute it viashell_run. Conventions:- Title — one sentence answering the question (not "Untitled chart").
- Axes — label both, include units (
Active users (count),Date (UTC)). - Legend — include only if there is more than one series.
- Colours — use the matplotlib default palette unless the user has a
stated brand colour in
knowledge/style.md. - Output — save as PNG (
bbox_inches='tight',dpi=150) underknowledge/charts/<topic>.png.
Show and explain. In the assistant reply, link the saved image with a markdown image embed (
) and write 2–3 sentences interpreting it — what the chart shows, the one thing the user should take away, and any caveat (incomplete latest data point, outliers excluded, etc.).Keep the script reproducible. The chart file is the artefact; the script under
scratch/charts/<topic>.pyis the source of truth. If the user asks for a tweak ("can we use a log y-axis?"), edit the script and re-run — do not regenerate from scratch.
Anti-patterns
- ❌ Pie charts with > 5 slices.
- ❌ Charting raw counts when proportions are what the user actually asked.
- ❌ A chart whose axes have no labels or unit.
- ❌ Embedding the image without 2 sentences of interpretation.
When to delegate
If the user wants a multi-chart dashboard with narrative around it (e.g. "build
me a weekly product health deck"), spawn the report-writer sub-agent —
this Skill is for individual charts.
よくある質問
どのグラフの種類を使いますか?
質問に応じて、折れ線、積み上げ棒、棒、散布図、ヒストグラム、箱ひげ図、面グラフを使います。
何を受け取れますか?
画像ファイルと、それを作成したスクリプトを受け取れます。
合うグラフの種類がない場合は?
スキルは推測せず、どの見方を望むかを尋ねます。
詳細
作者による元の説明
Visualise the result of an analysis as a chart (line, bar, area, scatter, etc.). Use when the user asks to "plot...", "chart...", "show me the trend of...", "visualise...", or when a numerical result has more than ~10 rows and would be easier to read as a picture. Produces an image file plus the script that generated it.
人気
- GitHubのスター
- 6.2k
- ランキング
- #14390
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
agentscope-java
6.2kProject Reactorの上に構築されたマルチエージェントフレームワークAgentScopeのために、ノンブロッキングなJavaコードを書くのを支援します。
data-report
6.2kデータセットを、平均、合計、範囲、傾向を含むレポートに要約し、Markdownファイルとして保存するのを支援します。
data-transform
6.2kCSVやJSONなどのデータファイルを形式間で変換し、他のツールで使えるようにするのを支援します。
git-changelog
6.2kGitの履歴から変更履歴やリリースノートを書き、機能、修正、その他の変更にまとめるのを支援します。
似ているスキル
gitcrawl
394k保存されたGitHubのイシューとプルリクエストのアーカイブを検索し、重複をまとめ、GitHub上の現在の状態を確認するようエージェントを支援します。
slacrawl
394kローカルのSlackアーカイブ内のメッセージを検索して件数を数え、アーカイブの新しさを確認し、必要に応じて更新するようエージェントを支援します。
goplaces
394kGoogle Placesを使って、場所を検索し、詳細や口コミを取得し、場所の名前を解決するようエージェントを支援します。スクリプト用にJSON出力もできます。