.agents/skills/rechart/SKILL.md
# 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
npx skillsauth add asymmetric-al/core .agents/skills/rechartInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
ResponsiveContainer and ensure a fixed height parent.dataKey values.LineChart for trends, BarChart for comparisons, AreaChart for cumulative/volume, PieChart for part-to-whole.Tooltip; add Legend when multiple series exist.ResponsiveContainer with a height.ResponsiveContainerdataKey matches field namesimport {
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>
);
}
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>
);
}
ResponsiveContainer or fixed-height parentdataKey valuesdevelopment
Use when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.
testing
Use when CI tests fail on main branch after PR merge, or when investigating flaky test failures in CI environments
tools
Use when new translation keys are added to packages to generate new translations strings
data-ai
Pointer to the canonical agent instruction and skill system for this monorepo