flint-chart-author

flint-chart-author is a skill for Claude Code, Codex from jin-bo/guanlan. It costs 197 tokens per session (2,148 once invoked), scanned A, original, Apache-2.0.

A chart-specification writer that turns existing structured data, tables, or query results into Flint chart blocks. Flint is a visualization format that describes the data, chart type, and visual mappings without requiring detailed charting code.

In plain words
What is it for?
Use it to create, repair, explain, or validate Flint specifications for comparisons, trends, distributions, relationships, composition, flows, or schedules.
Why use it?
It helps choose a chart that matches the question and keeps the specification small and renderable. It can also aggregate detailed data before charting when a summary is more useful.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create, repair, explain, or validate Flint specifications for comparisons, trends, distributions, relationships, composition, flows, or schedules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jin-bo/guanlan/flint-chart-author
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 jin-bo/guanlan --skill flint-chart-author
Clone the repo
git clone --depth 1 https://github.com/jin-bo/guanlan

Made for: Claude Code, Codex.

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 flint-chart-author

README.md
[![agentmods](https://agentmods.dev/badge/skills/jin-bo/guanlan/flint-chart-author/github.svg)](https://agentmods.dev/skills/jin-bo/guanlan/flint-chart-author)
Your own site
<a href="https://agentmods.dev/skills/jin-bo/guanlan/flint-chart-author"><img src="https://agentmods.dev/badge/skills/jin-bo/guanlan/flint-chart-author/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 flint-chart-author

Your own site · 80×15
<a href="https://agentmods.dev/skills/jin-bo/guanlan/flint-chart-author"><img src="https://agentmods.dev/badge/skills/jin-bo/guanlan/flint-chart-author.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 197 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,148 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.00197 $0.02148
Opus 5 $0.00098 $0.01074
Sonnet 5 $0.00039 $0.00430
Haiku 4.5 $0.00020 $0.00215

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

Security

Grade A, and why

flint-chart-author 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 9d 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/flint-chart-author/SKILL.md · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

flint-chart-author — Flint 图表规格作者

你把已经拿到手的结构化数据变成一个合法的 ```flint 围栏块。 Flint 是微软研究院的可视化中间语言:给它 「数据 + 图型 + 编码」,它自己推导刻度、轴、标签、图例、布局——所以你不需要写任何 Vega-Lite / ECharts 的底层配置,写多了反而会被丢弃。

图型清单、通道语义、语义类型表、完整示例与失败模式对照见 references/flint-spec.md按需载入

边界

输入 已有的结构化数据、表格、或查询结果(对象数组形态)
职责 选图型与编码 · 必要时先聚合 · 生成 / 修复 / 解释 / 校验 flint 规格
输出 一个 ```flint 围栏块(JSON),块外配一句人话说明它在说什么
不负责 数据库连接与取数权限 · 知识库/wiki 维护 · markdown 存放在哪一页 · 浏览器端渲染

数据从哪来、图放到哪儿去,都由调用你的那条工作流决定;你只对**「这段 JSON 合法且画出来是对的」**负责。

工作流

1. 先看数据,再选图

看三件事:行数每列的类型(数值 / 类别 / 日期)、你想让读者看出什么。 最后一件决定图型——参考的图型表按用途分组(对比 / 趋势 / 分布 / 相关 / 构成层级 / 流向 / 时间安排)。

拿不准就选最朴素的那个:类别比大小用 Bar Chart,随时间变化用 Line Chart,两个数值的关系用 Scatter Plot朴素的图被读懂的概率远高于花哨的图。

2. 必要时先聚合——这是你的活,不是 flint 的

flint 不做聚合encodings.*.aggregate 只在部分模板生效,别指望)。原始明细表要先自己算成 结论性的聚合结果再内联:GROUP BY 之后的几行、十几行,而不是几百行明细。

判据:这张图要说的那句话,需要几行数据才够? 只要那几行。 搬原始表进来既撞行数上限,也让读者自己去找结论——那是表格的活,不是图的活。

3. 写块

最小形态(semantic_types 可整段省略,flint 会自行推断):

```flint
{"data":{"values":[{"模型":"model-a","评测得分":72.4},{"模型":"model-b","评测得分":81.9}]},
 "chart_spec":{"chartType":"Bar Chart",
               "encodings":{"x":{"field":"模型"},"y":{"field":"评测得分"}}}}
```

写清楚一点(推荐):加 semantic_types 让刻度/格式/排序更合理,加 baseSize 定尺寸。 字段名用数据里的原名(中文列名完全可以)。想让轴上显示得更好看,就在数据里把列名改好—— flint 0.4.1 没有「显示名」这种字段(写了不报错也不生效)。

4. 自校验(每次输出前逐条过,不要跳

  • 整块是合法 JSON(不是 YAML、没有注释、没有尾逗号、没有单引号)
  • 顶层只有 data / semantic_types / chart_spec / options 之内(别的键一律被丢弃)
  • data.values对象数组非空没有 data.url(渲染端一律拒绝,图不会出现)
  • 每个单元格是标量(字符串 / 数字 / 布尔)——不放嵌套对象或数组
  • 行数 ≤ 1000
  • 类别数别太多color / column / row 上的取值超出图表容量时,flint 会整批丢掉多余的, 渲染端据此拒渲并显示「数据被截断」——先做 Top-N 聚合,别把几十个类别硬塞进一张图
  • chart_spec.chartType 与参考里的写法逐字符一致大小写敏感Bar Chart 对,Bar chart 错)
  • 每个 encodings.*.field 都能在数据列里找到(任一行有即可)
  • 数据形状与图型匹配(Histogramx 必须是数值列、Calendar Heatmapx 必须是日期串……见参考)
  • 若写了 baseSize:宽高都是有限正数baseSize基准不是上限——flint 会按类别数/ 分面数把它放大,实测 420×260 在多序列下会长到 657×514)。不必为了栏宽去调它: 渲染端会按正文栏宽让 flint 重新编译一遍;只有大到离谱(宽 >1600 或高 >1200 仍收不住) 才会被判「数据过大」

Read the full file on GitHub · 110 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 110 lines · 197 tokens per session scan A 3041b5e68322

Subscribe to this mod's changes

flint-chart-author is a skill published in the GitHub repository jin-bo/guanlan (11 stars, last pushed 23d ago), licensed Apache-2.0. It adds 197 tokens to every session and 2,148 once invoked, about $0.0010 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-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens