hive.chart-creation-foundations
Skill này làm gì
Skill này dạy AI tạo biểu đồ và sơ đồ rõ ràng từ dữ liệu. Skill dành cho người muốn có hình ảnh giúp xu hướng hoặc so sánh dễ đọc.
Khi nào nên dùng
- ✓Khi dữ liệu của bạn thể hiện xu hướng theo thời gian, một so sánh hoặc độ phân tán của các giá trị.
- ✓Khi bạn muốn vẽ một luồng, cấu trúc phân cấp hoặc cấu trúc dưới dạng sơ đồ.
- ✓Khi một con số đơn hoặc một bảng xếp hạng ngắn kể chuyện tốt hơn dạng văn bản thay vì biểu đồ.
Liên kết skill
https://github.com/aden-hive/hive/blob/main/core/framework/skills/_preset_skills/chart-creation-foundations/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Vẽ biểu đồ doanh thu hàng tháng của tôi trong năm qua để tôi thấy xu hướng ngay lập tức.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
AI gọi một công cụ biểu đồ với dữ liệu. Biểu đồ xuất hiện trong chat, và một bản PNG được lưu vào file để bạn tải về.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Chart creation foundations
These tools render BI/financial-analyst-grade charts and diagrams that show up live in the chat AND save as high-DPI PNGs in the user's queen session dir.
The embedding contract — one rule
To put a chart in chat, call
chart_render. The chat readsresult.specand renders the chart live in the message bubble. The download link isresult.file_url. Do not writeimage markdown by hand — the tool's result drives the UI.
That's it. One tool call, one chart in chat, one file on disk. No two-step "remember to also save it" pattern. The chat's chart-rendering UI is fed by the tool result envelope automatically.
When to chart at all
Chart when the data is visual at heart: trends over time, distributions, comparisons across categories, hierarchies, flows, geo. Skip the chart when:
- The point is one number → just say it. ("Revenue was $4.2M, up 12% YoY.")
- The point is a ranking of 5 things → use a markdown table with bold and emoji indicators.
- The data is so noisy a chart would mislead → describe the takeaway in prose.
A chart costs the user attention. It must repay that cost with a takeaway they couldn't get from prose.
ECharts vs Mermaid — the picking rule
Use ECharts (kind: "echarts") when... |
Use Mermaid (kind: "mermaid") when... |
|---|---|
| You're plotting numbers over categories or time | You're showing structure, not data |
| Bar / line / area / scatter / candlestick / heatmap / treemap / sankey / parallel coordinates / calendar / gauge / pie / sunburst / geo map | Flowchart / sequence / gantt / ERD / state diagram / mindmap / class diagram / C4 architecture |
| The viewer's question is "how much / how many / what's the trend" | The viewer's question is "what calls what / what depends on what / what happens after what" |
If both fit (rare), prefer ECharts — its rasterized output is a proper data chart for slides; Mermaid's diagrams are for technical docs.
The aesthetic baseline (non-negotiable)
These are the rules that turn an Excel-default chart into a Tableau-grade one. Every chart you produce must follow them.
1. Theme & background
chart_renderhas nothemeparameter. The renderer reads the user's UI theme from the desktop env (HIVE_DESKTOP_THEME) so the saved PNG matches what the user is actually looking at. You don't pick; the system does.- Title goes in
option.title.text, NOT in the message body. The chart is self-contained.
2. Palette discipline — DO NOT set color on series
The OpenHive ECharts theme is auto-applied to every chart_render call. It defines:
- An 8-hue categorical palette for multi-series charts (honey orange, slate blue, sage, terracotta, bronze, indigo, olive, rust)
- Cozy spacing (
grid.top: 90,grid.bottom: 56, etc.) - Brand typography (Inter Tight)
- Tasteful axis lines + dashed gridlines
Do not set option.color, option.title.textStyle, option.grid, or option.itemStyle.color on series. The theme covers it. If you do override, you'll fight the brand palette and the chart will look generic.
When you need data-encoded color (NOT category color):
- Sequential (magnitude): use
visualMapwithinRange.color: ['#fff7e0', '#db6f02'](light-to-honey) - Diverging (positive/negative): use
visualMapwithinRange.color: ['#a8453d', '#f5f5f5', '#3d7a4a'](terracotta/neutral/sage) - Semantic up/down (candlestick is auto-themed): for explicit gain/loss bars use
#3d7a4a(gain) and#a8453d(loss), NOT#27ae60/#e74c3c.
3. Typography
The default font (-apple-system, "Inter Tight", system-ui) is already wired in the renderer — don't override unless the user asked. Set option.textStyle.fontSize: 13 for body labels, 16 for axis names, 18 bold for the title.
4. No chartjunk
- No 3D. Ever. 3D pie charts and 3D bar charts are visual lies.
- No drop shadows on bars or lines. The default flat ECharts look is correct.
- No gradient fills unless the gradient encodes data (e.g. heatmap fill).
- No neon colors. Saturation belongs on highlighted bars, not on every series.
- No more than 5 stacked colors in a stacked bar — past that the eye can't separate them.
5. Axis hygiene
- X-axis labels rotate 45° only when they overflow. Otherwise horizontal.
- Y-axis starts at 0 for bar/area charts (truncating misleads). Line charts can start at min - 5%.
- Use
option.yAxis.axisLabel.formatter: '{value} M'to a
Câu hỏi thường gặp
AI chọn loại biểu đồ nào?
AI dùng ECharts cho số liệu theo danh mục hoặc thời gian, và Mermaid cho sơ đồ cấu trúc.
Khi nào AI bỏ qua việc vẽ biểu đồ?
AI bỏ qua khi một con số hoặc danh sách ngắn kể câu chuyện tốt hơn, hoặc khi dữ liệu quá nhiễu để trình bày công bằng.
PNG được lưu ở đâu?
Một PNG độ phân giải cao được lưu trong thư mục phiên làm việc của bạn, và một liên kết tải về được cung cấp.
Chi tiết
Mô tả gốc của tác giả
Required reading whenever any chart_* tool is available. Teaches the one-tool embedding contract (call chart_render → live chart appears in chat AND a downloadable PNG lands in the queen session dir), the ECharts (data viz) vs Mermaid (structural diagrams) decision, the BI/financial-grade aesthetic baseline (no chartjunk, restrained palette, proper typography, single message per chart), and the canonical spec patterns for the 12 most-common chart types. Skipping this leads to 1990s-Excel charts, missing downloads, and the agent writing markdown image links by hand instead of letting chart_rend
repo: aden-hive/hive
Độ phổ biến
- Sao GitHub
- 11k
- Vị trí xếp hạng
- #11810
- Giấy phép
- Apache-2.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
browser-edge-cases
11kGiúp agent của bạn sửa tự động hóa trình duyệt bị lỗi trên các trang khó như LinkedIn, X hoặc trang có nhiều script nặng.
hive.browser-automation
11kDạy agent của bạn điều khiển trình Chrome của chính bạn bằng công cụ hive-browser, dùng ảnh chụp màn hình và các thao tác nhấp chuột.
hive.colony-progress-tracker
11kGiúp agent của bạn nhận tác vụ và ghi lại các bước cùng kiểm tra của nó vào một cơ sở dữ liệu dùng chung, để công việc được theo dõi khi tiến hành.
hive.context-preservation
11kGiúp agent của bạn lưu các dữ kiện quan trọng từ kết quả công cụ dài vào ghi chú trước khi những chi tiết cũ bị xóa khỏi bộ nhớ.
Skill tương tự
gitcrawl
394kCho phép agent của bạn tìm trong kho lưu trữ issue và pull request GitHub, gom các mục trùng lặp và kiểm tra trạng thái hiện tại trên GitHub.
slacrawl
394kCho phép agent của bạn tìm và đếm tin nhắn trong kho lưu trữ Slack cục bộ, kiểm tra kho đó mới đến mức nào và làm mới khi cần.
goplaces
394kGiúp agent của bạn tìm địa điểm, lấy chi tiết và đánh giá, và xác định tên địa điểm bằng Google Places, với đầu ra JSON cho script.