chart-creation

chart-creation is a skill for Claude Code from claude-office-skills/claude-office-plugin. It costs 25 tokens per session (1,028 once invoked), scanned A, original, MIT.

A set of instructions for creating charts in WPS spreadsheets, including line, column, pie, and stacked-column charts.

In plain words
What is it for?
Use it to turn selected spreadsheet data into appropriately sized charts, such as line charts for trends or separate line and column charts for stock prices and trading volume.
Why use it?
It avoids unsupported chart methods and types that may produce blank charts or errors in WPS.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-wps-excel plugin — 26 skills, 14 commands, 8 agents, 2 MCP servers shipped together

Good fit Use it to turn selected spreadsheet data into appropriately sized charts, such as line charts for trends or separate line and column charts for stock prices and trading volume.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/claude-office-skills/claude-office-plugin/chart-creation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add claude-office-skills/claude-office-plugin --skill chart-creation
Clone the repo
git clone --depth 1 https://github.com/claude-office-skills/claude-office-plugin

Made for: Claude Code.

Or install claude-wps-excel, the plugin that ships this one along with the rest of its 26 skills, 14 commands, 8 agents, 2 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for chart-creation

README.md
[![agentmods](https://agentmods.dev/badge/skills/claude-office-skills/claude-office-plugin/chart-creation/github.svg)](https://agentmods.dev/skills/claude-office-skills/claude-office-plugin/chart-creation)
Your own site
<a href="https://agentmods.dev/skills/claude-office-skills/claude-office-plugin/chart-creation"><img src="https://agentmods.dev/badge/skills/claude-office-skills/claude-office-plugin/chart-creation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for chart-creation

Your own site · 80×15
<a href="https://agentmods.dev/skills/claude-office-skills/claude-office-plugin/chart-creation"><img src="https://agentmods.dev/badge/skills/claude-office-skills/claude-office-plugin/chart-creation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,028 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00025 $0.01028
Opus 5 $0.00013 $0.00514
Sonnet 5 $0.00005 $0.00206
Haiku 4.5 $0.00003 $0.00103

Measured 12d ago against content hash b20a3663ce2b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

chart-creation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/bundled/chart-creation/SKILL.md · 86 lines

What it actually says

图表创建(WPS JS API)

⚠️ 重要:WPS 加载项中创建图表必须使用 ws.Shapes.AddChart2() 方法! ❌ 禁止使用 ws.ChartObjects.Add()(WPS 中不支持此方法)

AddChart2(Style, XlChartType, Left, Top, Width, Height) 参数:

  • Style:图表样式编号(必须用 0 或正整数,禁止 -1)
  • XlChartType:4=xlLine(折线), 51=xlColumnClustered(柱状), 5=xlPie(饼图), 54=xlColumnStacked(堆叠柱状)
  • Left/Top/Width/Height:位置和大小(像素)

不支持的图表类型(会崩溃或空白)

  • ❌ K线图/蜡烛图/OHLC (88/89/90) — WPS 不支持
  • ❌ 股价图 (88/89/90) — WPS 不支持
  • 股价数据请改用折线图(收盘价走势)+ 柱状图(成交量),分两个图表展示

图表最佳实践

  • 每个图表至少 560×320 像素,别太小
  • 多个图表之间留 340px 纵向间距
  • 一个图表只展示一个主题,别把所有数据塞一张图

图表颜色和样式

创建图表后,必须为每条数据系列单独设置颜色,避免默认灰色:

try {
  var dataRange = ws.Range("A1:C20");
  var lastRow = 20;
  var chartTop = (lastRow + 2) * 20;
  var shape = ws.Shapes.AddChart2(0, 4, 20, chartTop, 600, 340);
  var chart = shape.Chart;
  chart.SetSourceData(dataRange);
  chart.HasTitle = true;
  chart.ChartTitle.Text = "趋势分析";

  try {
    chart.SeriesCollection.Item(1).Format.Line.ForeColor.RGB = 0xFF4500;
    chart.SeriesCollection.Item(1).Format.Line.Weight = 2.5;
    chart.SeriesCollection.Item(2).Format.Line.ForeColor.RGB = 0x0000FF;
    chart.SeriesCollection.Item(2).Format.Line.Weight = 2.5;
    chart.SeriesCollection.Item(3).Format.Line.ForeColor.RGB = 0x00AA00;
    chart.SeriesCollection.Item(3).Format.Line.Weight = 2.5;
  } catch(ce) {}

  try {
    chart.SeriesCollection.Item(1).Format.Fill.ForeColor.RGB = 0xE8A040;
  } catch(ce) {}
} catch(e) {
  ws.Range("F1").Value2 = "趋势";
  for (var i = 2; i <= lastRow; i++) {
    var cur = ws.Range("B"+i).Value2, prev = ws.Range("B"+(i-1)).Value2;
    ws.Range("F"+i).Value2 = cur > prev ? "▲" : (cur < prev ? "▼" : "→");
  }
}

图表配色方案(BGR 格式)

用途 BGR 颜色值 视觉效果
系列1(主线/收盘价) 0xFF4500 鲜明蓝
系列2(对比线/开盘价) 0x0000FF 红色
系列3(辅助线/均价) 0x00AA00 绿色
系列4(参考线) 0x00CCFF 橙色
柱状图(成交量) 0xE8A040 金橙色
涨日柱 0x0000FF 红色
跌日柱 0x00AA00 绿色

⚠️ 图表代码必须包裹在 try/catch 中。颜色设置也要 try/catch。

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 86 lines · 25 tokens per session scan A b20a3663ce2b

Subscribe to this mod's changes

chart-creation is a skill published in the GitHub repository claude-office-skills/claude-office-plugin (9 stars, last pushed 5mo ago), licensed MIT. It adds 25 tokens to every session and 1,028 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.