devlab-web-echarts-usage

devlab-web-echarts-usage is a skill for Claude Code, Codex from seed-forge/harness-ai-kit. It costs 60 tokens per session (883 once invoked), scanned A, original, Apache-2.0.

An integration guide for Apache ECharts, a JavaScript library for drawing interactive charts and diagrams, in Astro and other front-end projects. It explains selective loading, delayed loading, custom chart types, and passing data through Astro Islands, which are server-rendered components that add client-side behaviour.

In plain words
What is it for?
Use it to add radar, scatter, force-directed topology, or custom charts to Astro, React, or Vue projects; reduce chart loading work; load charts when they enter the viewport; and pass data from Astro components to browser scripts.
Why use it?
It helps avoid loading the entire chart library when only a few chart types are needed and handles charts that appear after the page loads. It also addresses common data and integration issues in Astro applications.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/seed-forge/harness-ai-kit/devlab-web-echarts-usage
Any agent
npx skills add seed-forge/harness-ai-kit --skill devlab-web-echarts-usage
Clone the repo
git clone --depth 1 https://github.com/seed-forge/harness-ai-kit

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 devlab-web-echarts-usage

README.md
[![agentmods](https://agentmods.dev/badge/skills/seed-forge/harness-ai-kit/devlab-web-echarts-usage.svg)](https://agentmods.dev/skills/seed-forge/harness-ai-kit/devlab-web-echarts-usage)
Your own site
<a href="https://agentmods.dev/skills/seed-forge/harness-ai-kit/devlab-web-echarts-usage"><img src="https://agentmods.dev/badge/skills/seed-forge/harness-ai-kit/devlab-web-echarts-usage.svg" alt="Measured on agentmods" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 883 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00060 $0.00883
Opus 5 $0.00030 $0.00441
Sonnet 5 $0.00012 $0.00177
Haiku 4.5 $0.00006 $0.00088

Measured 4d ago against content hash 156410b1f5ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

devlab-web-echarts-usage 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 4d 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/devlab-web-echarts-usage/SKILL.md · 100 lines

How it starts

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

devlab-web-echarts-usage

用途

ECharts 在 Astro/前端项目中的完整集成指南,包含 tree-shaking、IntersectionObserver 按需加载、自定义系列集成、拓扑图实现、雷达图配置、调试经验。

适用场景

  • 在 Astro/React/Vue 项目中引入 ECharts 图表
  • 需要 tree-shaking 以避免全量 300KB 加载
  • 需要 IntersectionObserver 按需加载(视口进入才加载)
  • 实现 force-directed 拓扑图、雷达图、散点图等
  • 处理 ECharts 在 Astro Islands 模式下的数据传递

核心概念

Tree-Shaking 导入

ECharts 必须使用 tree-shaking 导入,否则会加载全量 ~300KB:

// ✅ 正确:只导入需要的子模块
import * as echarts from "echarts/core";
import { RadarChart, ScatterChart, EffectScatterChart } from "echarts/charts";
import { TooltipComponent, LegendComponent, GridComponent } from "echarts/components";
import { CanvasRenderer } from "echarts/renderers";

echarts.use([RadarChart, ScatterChart, EffectScatterChart, TooltipComponent, LegendComponent, GridComponent, CanvasRenderer]);

// ❌ 错误:全量导入
import * as echarts from "echarts";

Astro Islands 数据传递

Astro 组件通过 data-* 属性传递数据到客户端脚本:

<div class="chart" data-scores={JSON.stringify(scores)}></div>

<script>
const container = document.querySelector('.chart');
const scores = JSON.parse(container.dataset.scores);
// 使用 scores 初始化 ECharts...
</script>

IntersectionObserver 按需加载

图表不在首屏时,延迟加载以减少首屏 JS payload:

export function observeChart(container, onReady) {
  const observer = new IntersectionObserver((entries) => {
    for (const entry of entries) {
      if (entry.isIntersecting) {
        observer.unobserve(container);
        const chart = echarts.init(container);
        if (chart) onReady(chart);
      }
    }
  }, { rootMargin: "200px" });
  observer.observe(container);
}

实现流程

  1. 确定目标图表类型(雷达图/拓扑图/折线图等)
  2. 配置 tree-shaking imports(echarts/charts + echarts/components)
  3. 设置 IntersectionObserver 按需加载
  4. 实现图表渲染 + 响应式 resize
  5. 处理 Astro Islands 集成(客户端脚本 + 数据传递)
  6. 处理 prefers-reduced-motion 降级

推荐输出格式

执行完毕后输出极简回执:状态(✅ 成功 / ⚠️ 部分成功 / ❌ 失败)+ 关键结果(1-2 行,如操作对象、产出位置、下一步)。无需强制套用大表格。

约束

  • MUST 使用 ECharts tree-shaking(非全量 300KB)
  • MUST IntersectionObserver 按需加载
  • MUST 处理 prefers-reduced-motion 降级(显示静态数据或简化图表)
  • MUST NOT 在 SSR 阶段执行 ECharts 初始化(仅 client-side)

Read the full file on GitHub · 100 lines

Files

What ships with it

6 files 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. 4d ago First seen · 100 lines · 60 tokens per session scan A 156410b1f5ca

Subscribe to this mod's changes

devlab-web-echarts-usage is a skill published in the GitHub repository seed-forge/harness-ai-kit (21 stars, last pushed 3d ago), licensed Apache-2.0. It adds 60 tokens to every session and 883 once invoked, about $0.0003 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

auth-web-cloudbase

CloudBase Web Authentication Quick Guide for frontend integration after auth-tool has already been checked. Provides concise and practical Web authentication solutions with multiple login methods and complete user management.

TencentCloudBase/CloudBase-AI-Toolkit · 38 tokens

browse-and-evaluate

Use when exploring the ai-agent-skills catalog to find, compare, and evaluate skills before installing. Always use --fields to limit output size and --dry-run before committing to an install.

MoizIbnYousaf/Ai-Agent-Skills · 43 tokens

loop-engineering

Shared loop-engineering reference for COG skills - the agent loop, deterministic verifiers, termination conditions, in-loop context management, and named patterns. Invoke when designing or debugging a skill that iterates (search-verify-retry, scan-until-dry, fetch-retry-gate).

huytieu/COG-second-brain · 63 tokens

telnyx-messaging-hosted-curl

Set up hosted SMS numbers, toll-free verification, and RCS messaging. Use when migrating numbers or enabling rich messaging features. This skill provides REST API (curl) examples.

team-telnyx/ai · 45 tokens

render-airdrop-carousel

Assemble a viral iOS "AirDrop" notification-carousel video ad (≈6–8s, 9:16) from a brand line plus 6–16 real product photos — a native AirDrop share-sheet card ("Brand would like to share a · Decline / Accept") springs up and its preview window CYCLES through the products, landing on a range/lineup payoff with an…

gooseworks-ai/goose-skills · 207 tokens

render-3d-product-showcase

Assemble a premium 3D product-showcase ad from a config — four beat clips (an orbiting hero rotation, a macro push-in, a physics reveal, a typographic close) normalized to the brand-color canvas, hard-concatenated in order, closed on a deterministic Playwright brand end card, and mixed under one instrumental bed at…

gooseworks-ai/goose-skills · 159 tokens