agentleFS
MorningStar0709MorningStar0709/trae-agent-enhancements/skills/chart-visualization/SKILL.md

chart-visualization

Skill18 starsChanged 7 months agoMITView on GitHub

Visualize data in Trae by selecting the most suitable chart type, extracting parameters, and generating a chart image with the local JavaScript script. Use for Chinese or English requests such as 数据可视化, 生成图表, 画折线图, 柱状图, 饼图, 漏斗图, 词云, 地图, 组织架构图, or 把这些数据做成图.

7 other projects use a version of this, 4 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use data-analysis.

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.
  • shanggqmSkill

    data-analysis

    数据分析技能,提供结构化的数据查询、统计分析和报告生成工作流。当用户需要查询数据库、进行数据统计分析、生成分析报告时使用。按规范输出原始数据、计算结果、Markdown报告和HTML可视化报告。

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 4 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When the user writes in Chinese, explain chart choices and results in Simplified Chinese.

    line 10
  2. Distinctive:

    Treat this as an agent execution workflow, not end-user documentation.

    line 14
  3. Very specific:

    Run commands from this skill directory or use an absolute script path so scripts/generate.js resolves reliably.

    line 15
  4. Very specific:

    If the user writes in Chinese, ask clarifying questions, explain chart choices, and report results in Simplified Chinese.

    line 17
  5. Distinctive:

    Do not invent missing data.

    line 18
  6. Distinctive:

    Do not use this skill when:

    line 22
  7. Very specific:

    Time Series: Use generate_line_chart (trends) or generate_area_chart (accumulated trends).

    line 37
  8. Very specific:

    Comparisons: Use generate_bar_chart (categorical) or generate_column_chart.

    line 38
  9. Very specific:

    Part-to-Whole: Use generate_pie_chart or generate_treemap_chart (hierarchical).

    line 39
  10. Very specific:

    Relationships & Flow: Use generate_scatter_chart (correlation), generate_sankey_chart (flow), or generate_venn_chart (overlap).

    line 40
  11. Very specific:

    Maps: Use generate_district_map (regions), generate_pin_map (points), or generate_path_map (routes).

    line 41
  12. Very specific:

    Hierarchies & Trees: Use generate_organization_chart or generate_mind_map.

    line 42

“Common” is measured: kept by at least 6 in 10 of the 4 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

Chart Visualization Skill

This skill provides a comprehensive workflow for transforming data into visual charts. It handles chart selection, parameter extraction, and image generation.

When the user writes in Chinese, explain chart choices and results in Simplified Chinese. Keep chart tool names, JSON keys, and script arguments in English.

Trae and Windows Notes

  • Treat this as an agent execution workflow, not end-user documentation.
  • Run commands from this skill directory or use an absolute script path so scripts/generate.js resolves reliably.
  • On Windows Trae, prefer PowerShell-compatible commands and avoid shell quoting that only works in Unix shells.
  • If the user writes in Chinese, ask clarifying questions, explain chart choices, and report results in Simplified Chinese. Keep tool, args, JSON keys, URLs, and file paths in their original form.
  • Do not invent missing data. If required chart fields are absent or ambiguous, ask one concise clarification before running the script.

Do Not Use

Do not use this skill when:

  • The user only wants a conceptual explanation of chart types and does not need a generated chart artifact.
  • The task is spreadsheet editing, data cleaning, or statistical analysis without chart generation.
  • The user asks for frontend chart component code instead of generating an image through this script.
  • The request depends on live data retrieval, database queries, or web scraping that has not already produced chart-ready data.
  • The user needs manual visual design of an infographic, poster, or dashboard rather than structured chart generation.

Workflow

To visualize data, follow these steps:

1. Intelligent Chart Selection

Analyze the user's data features to determine the most appropriate chart type. Use the following guidelines (and consult references/ for detailed specs):

  • Time Series: Use generate_line_chart (trends) or generate_area_chart (accumulated trends). Use generate_dual_axes_chart for two different scales.
  • Comparisons: Use generate_bar_chart (categorical) or generate_column_chart. Use generate_histogram_chart for frequency distributions.
  • Part-to-Whole: Use generate_pie_chart or generate_treemap_chart (hierarchical).
  • Relationships & Flow: Use generate_scatter_chart (correlation), generate_sankey_chart (flow), or generate_venn_chart (overlap).
  • Maps: Use generate_district_map (regions), generate_pin_map (points), or generate_path_map (routes).
  • Hierarchies & Trees: Use generate_organization_chart or generate_mind_map.
  • Specialized:
    • generate_radar_chart: Multi-dimensional comparison.
    • generate_funnel_chart: Process stages.
    • generate_liquid_chart: Percentage/Progress.
    • generate_word_cloud_chart: Text frequency.
    • generate_boxplot_chart or generate_violin_chart: Statistical distribution.
    • generate_network_graph: Complex node-edge relationships.
    • generate_fishbone_diagram: Cause-effect analysis.
    • generate_flow_diagram: Process flow.
    • generate_spreadsheet: Tabular data or pivot tables for structured data display and cross-tabulation.

2. Parameter Extraction

Once a chart type is selected, read the corresponding file in the references/ directory (e.g., references/generate_line_chart.md) to identify the required and optional fields. Extract the data from the user's input and map it to the expected args format.

3. Chart Generation

Invoke the scripts/generate.js script with a JSON payload.

Payload Format:

{
  "tool": "generate_chart_type_name",
  "args": {
    "data": [...],
    "title": "...",
    "theme": "...",
    "style": { ... }
  }
}

Execution Command:

node ".\scripts\generate.js" '{ "tool": "generate_chart_type_name", "args": { "data": [], "title": "..." } }'

For complex payloads in PowerShell, prefer storing compact JSON in a variable before invoking Node:

$payload = '{"tool":"generate_line_chart","args":{"data":[],"title":"..."}}'
node ".\scripts\generate.js" $payload

4. Result Return

The script will output the URL of the generated chart image. Return the following to the user:

  • The image URL.
  • The complete args (specification) used for generation.

Failure Handling

  • Missing or ambiguous data -> ask for the smallest missing detail needed to choose the chart or fill required fields.
  • Unknown chart type -> select the closest supported chart type from references/ and explain the mapping briefly.
  • Script path not found -> verify the current working directory and rerun with the absolute path to scripts/generate.js.
  • JSON parse or shell quoting error -> rebuild a compact JSON payload and pass it as one PowerShell argument.
  • Script returns no URL -> report the failure, include the tool name used, and do not fabricate an image URL.

Reference Material

Detailed specifications for each chart type are located in the references/ directory. Consult these files to ensure the args passed to the script match the expected schema.

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.