.agents/skills/charting/SKILL.md
Chart and data visualization libraries. Recharts, Chart.js, D3.js, Victory, Nivo, ECharts. Common chart types, responsive design, and real-time updates. USE WHEN: user mentions "chart", "graph", "data visualization", "Recharts", "Chart.js", "D3", "ECharts", "Victory", "bar chart", "line chart", "dashboard" DO NOT USE FOR: PDF report generation - use `pdf-generation`; data export - use `data-export`
npx skillsauth add d-subrahmanyam/deno-fresh-microservices chartingInstall 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.
import {
LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer,
BarChart, Bar, PieChart, Pie, Cell,
} from 'recharts';
const data = [
{ month: 'Jan', revenue: 4000, users: 240 },
{ month: 'Feb', revenue: 3000, users: 198 },
{ month: 'Mar', revenue: 5000, users: 300 },
];
function RevenueChart() {
return (
<ResponsiveContainer width="100%" height={300}>
<LineChart data={data}>
<CartesianGrid strokeDasharray="3 3" />
<XAxis dataKey="month" />
<YAxis />
<Tooltip />
<Line type="monotone" dataKey="revenue" stroke="#8884d8" strokeWidth={2} />
<Line type="monotone" dataKey="users" stroke="#82ca9d" strokeWidth={2} />
</LineChart>
</ResponsiveContainer>
);
}
// Bar Chart
function SalesChart() {
return (
<ResponsiveContainer width="100%" height={300}>
<BarChart data={data}>
<CartesianGrid strokeDasharray="3 3" />
<XAxis dataKey="month" />
<YAxis />
<Tooltip />
<Bar dataKey="revenue" fill="#8884d8" radius={[4, 4, 0, 0]} />
</BarChart>
</ResponsiveContainer>
);
}
import { Chart, registerables } from 'chart.js';
Chart.register(...registerables);
// With React wrapper
import { Line, Bar, Doughnut } from 'react-chartjs-2';
function SalesChart() {
return (
<Line
data={{
labels: ['Jan', 'Feb', 'Mar'],
datasets: [{
label: 'Revenue',
data: [4000, 3000, 5000],
borderColor: '#8884d8',
tension: 0.3,
}],
}}
options={{
responsive: true,
plugins: { legend: { position: 'top' } },
scales: { y: { beginAtZero: true } },
}}
/>
);
}
import * as d3 from 'd3';
function createBarChart(container: HTMLElement, data: { label: string; value: number }[]) {
const margin = { top: 20, right: 20, bottom: 30, left: 40 };
const width = 600 - margin.left - margin.right;
const height = 400 - margin.top - margin.bottom;
const svg = d3.select(container).append('svg')
.attr('viewBox', `0 0 ${width + margin.left + margin.right} ${height + margin.top + margin.bottom}`)
.append('g').attr('transform', `translate(${margin.left},${margin.top})`);
const x = d3.scaleBand().domain(data.map((d) => d.label)).range([0, width]).padding(0.2);
const y = d3.scaleLinear().domain([0, d3.max(data, (d) => d.value)!]).range([height, 0]);
svg.append('g').attr('transform', `translate(0,${height})`).call(d3.axisBottom(x));
svg.append('g').call(d3.axisLeft(y));
svg.selectAll('rect').data(data).join('rect')
.attr('x', (d) => x(d.label)!)
.attr('y', (d) => y(d.value))
.attr('width', x.bandwidth())
.attr('height', (d) => height - y(d.value))
.attr('fill', '#8884d8')
.attr('rx', 4);
}
| Library | Best For | Learning Curve | |---------|----------|---------------| | Recharts | React dashboards | Low | | Chart.js | Simple charts, any framework | Low | | D3.js | Custom/complex visualizations | High | | ECharts | Large datasets, maps | Medium | | Nivo | React, rich chart types | Low |
| Anti-Pattern | Fix | |--------------|-----| | Not using ResponsiveContainer | Always wrap charts for responsive sizing | | Re-rendering entire chart on data change | Use chart update methods, not re-mount | | Too many data points without aggregation | Aggregate/sample data before charting | | No loading state for async data | Show skeleton/spinner while loading | | Fixed pixel dimensions | Use relative sizing (%, viewBox) |
development
Guidelines for building high-performance APIs with Fastify and TypeScript, covering validation, Prisma integration, and testing best practices
development
FastAPI modern Python web framework. Covers routing, Pydantic models, dependency injection, and async support. Use when building Python APIs. USE WHEN: user mentions "fastapi", "pydantic", "async python api", "python rest api", asks about "dependency injection python", "python openapi", "python swagger", "async endpoints", "python api validation", "fastapi middleware" DO NOT USE FOR: Django apps - use `django` instead, Flask apps - use `flask` instead, synchronous Python APIs without type hints, GraphQL-only APIs
tools
FastAPI integration testing specialist. Covers synchronous TestClient, async httpx AsyncClient, dependency injection overrides, auth testing (JWT, OAuth2, API keys), WebSocket testing, file uploads, background tasks, middleware testing, and HTTP mocking with respx, responses, and pytest-httpserver. USE WHEN: user mentions "FastAPI test", "TestClient", "httpx async test", "dependency override test", "respx mock", asks about testing FastAPI endpoints, authentication in tests, or HTTP client mocking. DO NOT USE FOR: Django - use `pytest-django`; pytest internals - use `pytest`; Container infrastructure - use `testcontainers-python`
development
Expert in FastAPI Python development with best practices for APIs and async operations