跳到正文
cccskills
免费在 GitHub 公开

rechart

Build responsive, readable charts with Recharts using correct data mapping and composition. Use whenever creating charts with Recharts — LineChart, BarChart, AreaChart, PieChart, wrapped in ResponsiveContainer with a fixed-height parent. Not for charts built with other libraries.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md3.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Recharts — Skill

Name: recharts Purpose: Build responsive, readable charts with Recharts using correct data mapping and composition. Use this skill whenever creating charts with Recharts.

Applies when: Using LineChart, BarChart, AreaChart, PieChart, ResponsiveContainer. Do not use when: Charts are not built with Recharts.

Rules

  • Always responsive: Wrap charts in ResponsiveContainer and ensure a fixed height parent.
  • Explicit data model: Normalize data and use stable dataKey values.
  • Pick the simplest chart: Use LineChart for trends, BarChart for comparisons, AreaChart for cumulative/volume, PieChart for part-to-whole.
  • Interactivity: Add Tooltip; add Legend when multiple series exist.
  • Performance: Disable animation for large/static dashboards and reduce point count.

Workflow

  1. Define the data shape and stable keys.
  2. Choose the simplest chart that answers the question.
  3. Wrap in ResponsiveContainer with a height.
  4. Add axes, tooltip, and legend as needed.
  5. Disable animation or aggregate data for large sets.

Checklists

Implementation checklist

  • Chart is wrapped in ResponsiveContainer
  • X/Y axes are present when needed
  • Tooltip shows correct units
  • dataKey matches field names

Review checklist

  • Animations disabled for large datasets
  • Colors are accessible

Minimal examples

Line chart (trend)

import {
  LineChart,
  Line,
  XAxis,
  YAxis,
  CartesianGrid,
  Tooltip,
  Legend,
  ResponsiveContainer,
} from "recharts";

export function SalesChart({
  data,
}: {
  data: Array<{ month: string; sales: number }>;
}) {
  return (
    <div style={{ height: 320 }}>
      <ResponsiveContainer width="100%" height="100%">
        <LineChart
          data={data}
          margin={{ top: 8, right: 16, bottom: 8, left: 8 }}
        >
          <CartesianGrid strokeDasharray="3 3" />
          <XAxis dataKey="month" />
          <YAxis />
          <Tooltip />
          <Legend />
          <Line type="monotone" dataKey="sales" dot={false} />
        </LineChart>
      </ResponsiveContainer>
    </div>
  );
}

Custom tooltip

type TooltipProps = {
  active?: boolean;
  label?: string;
  payload?: Array<{ name?: string; value?: number | string }>;
};

export function CustomTooltip({ active, label, payload }: TooltipProps) {
  if (!active || !payload?.length) return null;
  return (
    <div className="rounded-md border bg-white p-2 text-sm shadow">
      <div className="font-medium">{label}</div>
      <ul className="mt-1 space-y-0.5">
        {payload.map((p, i) => (
          <li key={i}>
            {p.name}: {p.value}
          </li>
        ))}
      </ul>
    </div>
  );
}

Common mistakes / pitfalls

  • Missing ResponsiveContainer or fixed-height parent
  • Mismatched dataKey values
  • Over-animating large dashboards
  • Rendering too many points without aggregation

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Audit and fix accessibility in Core UI. Use when changing or reviewing buttons, links, forms, validation, dialogs, menus, tabs, tables, keyboard interactions, focus management, accessible names, announcements, contrast, touch targets, reduced motion, or WCAG/a11y behavior.

中文简介正在准备中。当前显示原文说明。

Asymmetric-al/core3812026年10月19日 更新

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

中文简介正在准备中。当前显示原文说明。

Asymmetric-al/core3812026年10月19日 更新

Use when building any system where email content triggers actions — AI agent inboxes, automated support handlers, email-to-task pipelines, or any workflow processing untrusted inbound email. Always use this skill when the user wants to receive emails and act on them programmatically, even if they don't mention "agent" — the skill contains critical security patterns (sender allowlists, content filtering, sandboxed processing) that prevent untrusted email from controlling your system.

中文简介正在准备中。当前显示原文说明。

Asymmetric-al/core3812026年10月19日 更新

anim

免费

Tasteful, subtle web UI animation following Emil Kowalski / animations.dev principles. Use when adding or reviewing interface motion — hover and press feedback, entrances and exits, modals, toasts, menus, loading and skeleton states, staggered reveals, page or view transitions — so motion stays refined and purposeful, not decorative. Covers CSS, Web Animations, and React timing/easing. Pair with the motion skill for motion/react API specifics.

中文简介正在准备中。当前显示原文说明。

Asymmetric-al/core3812026年10月19日 更新

animate

免费

Build an animation from scratch, making the decisions in the order that determines whether it feels right — should it animate at all, what purpose, which tool, which properties, which curve and duration, how it interrupts, how it exits. Writes the implementation. Use when asked to animate something, add motion, make a component feel alive, or build a transition. For critiquing existing motion use review-animations; for auditing a whole codebase use improve-animations. Only runs when explicitly invoked; it does not trigger on its own.

中文简介正在准备中。当前显示原文说明。

Asymmetric-al/core3812026年10月19日 更新

Build animations for Expo and React Native only, using Reanimated, Gesture Handler, Expo Router, and expo-haptics. Use when the target runtime is an Expo or React Native app. Do not use it for Core Next.js web motion; use `animate` for web. Only runs when explicitly invoked; it does not trigger on its own.

中文简介正在准备中。当前显示原文说明。

Asymmetric-al/core3812026年10月19日 更新

查看 Asymmetric-al 的全部技能

报告此技能的问题