.claude/skills/add-chart/SKILL.md
Add a new chart/visualization to the frontend dashboard. Use when creating P&L charts, price charts, gauges, heatmaps, or any data visualization.
npx skillsauth add HadiAlizade77/poly add-chartInstall 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.
Create chart: $ARGUMENTS[0] (type: $ARGUMENTS[1])
recharts v3.8)lightweight-charts v5.1)<PieChart> adapted<ScatterChart> with color mapping#0a0a0f bg, #12121a surfaces)import { LineChart, Line, XAxis, YAxis, Tooltip, ResponsiveContainer } from 'recharts';
export function $0Chart({ data }: { data: DataPoint[] }) {
return (
<ResponsiveContainer width="100%" height={300}>
<LineChart data={data}>
<XAxis dataKey="timestamp" />
<YAxis />
<Tooltip />
<Line type="monotone" dataKey="value" stroke="#22c55e" />
</LineChart>
</ResponsiveContainer>
);
}
import { createChart, ColorType } from 'lightweight-charts';
import { useEffect, useRef } from 'react';
export function $0Chart({ data }: { data: CandlestickData[] }) {
const chartContainerRef = useRef<HTMLDivElement>(null);
useEffect(() => {
const chart = createChart(chartContainerRef.current!, {
layout: { background: { type: ColorType.Solid, color: '#0a0a0f' } },
grid: { vertLines: { color: '#1e1e2e' }, horzLines: { color: '#1e1e2e' } },
});
const series = chart.addCandlestickSeries();
series.setData(data);
return () => chart.remove();
}, [data]);
return <div ref={chartContainerRef} className="w-full h-[300px]" />;
}
ResponsiveContainer (Recharts) or resize observer (TVLC)development
Wire up a new WebSocket event channel between backend and frontend. Use when adding real-time events like price updates, order fills, alerts, regime changes, etc.
development
Validate risk governor checks and risk configuration changes. Use when modifying risk parameters, adding new risk checks, or reviewing risk logic.
development
Scaffold a new backend service/process for the Polymarket platform. Use when creating a new PM2-managed service like market-scanner, data-ingestion, strategy-runner, etc.
testing
Run tests for the Polymarket platform. Supports unit, integration, and E2E tests. Use after implementing features or fixing bugs.