agentleFS
naingthetnaingthet/tidebreak/skills/charts/SKILL.md

charts

Skill1 starsChanged 48 days agoApache-2.0View on GitHub

Produce charts as interactive native figures (Plotly JSON) in output/, or as matplotlib PNG/SVG when an image file is needed — readable sizing, labels, and legends, validated before delivery.

  • Installs packages

8 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use aminer-data-search, auto-target-tracker and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • dav-niu474Skill

    aminer-data-search

    使用 AMiner 开放平台 API 进行学术数据查询与分析。当用户需要查询学者信息、论文详情、机构数据、期刊内容或专利信息时使用此 skill。 触发场景:提到 AMiner、学术数据查询、查论文/学者/机构/期刊/专利、学术问答搜索、引用分析、科研机构分析、学者画像、论文引用链、期刊投稿分析等。 支持 6 大组合工作流(学者全景分析、论文深度挖掘、机构研究力分析、期刊论文监控、学术智能问答、专利链分析)以及 28 个独立 API 的直接调用。 即使用户只说"帮我查一下 XXX 学者"或"找找关于 XXX 的论文",也应主动使用此 skill。

    Also in 3 projects that use this

  • dav-niu474Skill

    auto-target-tracker

    自动目标进度追踪器。在对话中检测到目标相关图片(笔记、进度、截图、记录)时,自动调用 VLM 识别关键信息并记录到目标日记。适用于学习管理、健身追踪、工作进度、习惯养成、创作记录等所有目标管理场景。

    Also in 3 projects that use this

  • Liang-MHSkill

    stock_analysis

    获取 A 股、基金和港股的实时行情和技术分析数据

    Also in 3 projects that use this

  • +9 more from dav-niu474

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 5 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When a chart is both shown to the user and embedded in a document, produce both: the native figure for the conversation, the image for the …

    line 18
  2. Very specific:

    Write a file named <name>.chart.json in output/.

    line 23
  3. Very specific:

    No library is required. Author the JSON directly when you already know the numbers — with json.dump from a small script, or by writing the …

    line 45
  4. Very specific:

    Use standard Plotly figure attributes — the whole vocabulary is available, including bar, scatter (lines and points), pie, heatmap, …

    line 52
  5. Very specific:

    Use the non-interactive backend — set matplotlib.use("Agg") before importing pyplot — and save with fig.savefig(...).

    line 93
  6. Distinctive:

    Every chart gets a title, axis labels with units, and — whenever more than one series is plotted — a legend with meaningful names.

    line 105
  7. Distinctive:

    Prefer one clear message per chart over a crowded multi-axis figure.

    line 109
  8. Distinctive:

    Use color plus a second cue (marker or line style) to distinguish series, and keep font sizes at 10pt equivalent or larger after export.

    line 111
  9. Distinctive:

    Only declare the chart done after it checks out.

    line 140

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Charts

Charts ship in one of two forms. Pick the form first, then follow that section plus the shared rules at the end.

  • Native chart — an interactive figure the app renders inline, with zoom, hover, and PNG export. Default for anything delivered on screen.
  • Raster chart — a matplotlib PNG or SVG. Use it when the chart must be embedded in a generated document (DOCX, PDF, PPTX) or when the user asks for an image file.

When a chart is both shown to the user and embedded in a document, produce both: the native figure for the conversation, the image for the document.

Native charts

Write a file named <name>.chart.json in output/. It must contain a single JSON object — a Plotly figure — with a data array of traces and an optional layout object:

{
  "data": [
    {
      "type": "bar",
      "name": "Revenue",
      "x": ["Q1", "Q2", "Q3", "Q4"],
      "y": [12400, 15100, 14800, 19300]
    }
  ],
  "layout": {
    "title": { "text": "Revenue by quarter (USD)" },
    "xaxis": { "title": { "text": "Quarter" } },
    "yaxis": { "title": { "text": "Revenue (USD)" } }
  }
}

No library is required. Author the JSON directly when you already know the numbers — with json.dump from a small script, or by writing the file outright. Reach for plotly only when the traces have to be computed from data you are processing anyway; if you do, install it in its own exec call the way matplotlib is installed below (python3 -m pip install --user plotly==6.9.0) and serialize with fig.to_json().

Use standard Plotly figure attributes — the whole vocabulary is available, including bar, scatter (lines and points), pie, heatmap, histogram, box, candlestick, treemap, sunburst, waterfall, and funnel.

Rules for native figures:

  • Self-contained data only. Inline every value in the trace. No external data URLs, no remote sources, no scripts — a figure that fetches something will not render.
  • Stay well under 512 KiB. Aggregate, bucket, or downsample before writing rather than embedding a huge raw series; a chart nobody can read at full resolution does not need full resolution.
  • Title, axis labels with units, and a legend for multi-series figures are mandatory, same as for raster charts.
  • Do not set explicit colors, fonts, or backgrounds unless the user asks for specific ones. The app themes figures to match its light and dark palette, and hardcoded styling fights it.

Raster charts (matplotlib)

Installing the library

Install the pinned dependency with its own exec call — commands have a bounded wall clock, and one pip invocation per package stays inside it:

python3 -m pip install --user matplotlib==3.11.1

Installs work only when this chat's network policy allows package managers, and they persist for the rest of the conversation. If an install is refused by policy, do not retry: tell the user to enable the package-manager network policy for this chat, and offer the closest result you can produce without the library (a native chart figure, the summarized data as a table, or an SVG you write by hand for a simple chart) — only with their knowledge, never as a silent substitution. If a dependency cannot be installed at all, say so plainly instead of quietly delivering a lesser format.

Rendering

  • Use the non-interactive backend — set matplotlib.use("Agg") before importing pyplot — and save with fig.savefig(...); never call plt.show() in the sandbox.
  • Render PNG by default. When the user asks for a vector or print-ready graphic, save SVG (and provide PNG alongside it unless they only want the vector).
  • Size for reading, not for thumbnails: around figsize=(10, 6) at dpi=150 for a standalone PNG, and bbox_inches="tight" so labels are not clipped.

Readability

  • Every chart gets a title, axis labels with units, and — whenever more than one series is plotted — a legend with meaningful names.
  • Rotate or thin dense tick labels rather than letting them collide; format large numbers with thousands separators or scaled units.
  • Prefer one clear message per chart over a crowded multi-axis figure; produce several charts when the data carries several stories.
  • Use color plus a second cue (marker or line style) to distinguish series, and keep font sizes at 10pt equivalent or larger after export.

Saving deliverables

Save finished charts in output/ — files there are published to the user as durable outputs. Writing the same filename again publishes a new version of the same output, so keep the filename stable when revising and change it only when the user asks for a distinct chart. When a chart accompanies a document deliverable (a report embedding the figure), save both files in output/: the document and the standalone chart.

Validation before declaring done

Native charts. You cannot see the render, so validate the file instead. Read it back and check that it parses as JSON, that it is a single object, that data is a non-empty array whose entries are objects, and that each trace carries a plausible type and the fields that type needs. Re-read the numbers against your source too — a figure that renders beautifully from the wrong values is still wrong. Fix the file rather than shipping a figure you have not checked.

Raster charts. PNG and SVG land in output/ where you can see them directly in the exec result flow — inspect the rendered image before presenting it: no clipped or colliding labels, a legend that matches the series, axes that start where you intended, and text large enough to read at natural size. Fix the plotting code rather than accepting a flawed render.

Only declare the chart done after it checks out.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.