Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
hoodini avatar

Analytics Metrics

  • 359 installs
  • 262 repo stars
  • Updated July 11, 2026
  • hoodini/ai-agents-skills

analytics-metrics is a Claude skill that builds Recharts-based KPI dashboards and data visualization components for developers who need analytics charts, metrics displays, and dashboard UI in React applications.

About

analytics-metrics is a hoodini ai-agents-skills module for building analytics dashboards with the Recharts React charting library. The skill triggers on requests involving analytics, dashboards, charts, metrics, KPI displays, and data visualization, guiding installation via `npm install recharts` and composition of responsive chart layouts. It documents LineChart patterns with XAxis, YAxis, CartesianGrid, Tooltip, Legend, and ResponsiveContainer wrappers, plus copy-paste TSX examples for time-series and comparative metrics. Developers reach for analytics-metrics when adding revenue, user, latency, or funnel charts to admin panels, agent observability UIs, or product analytics pages inside React codebases. The skill emphasizes component structure for readable KPI surfaces rather than backend instrumentation pipelines. Use it alongside separate telemetry wiring when you already have metric data and need polished frontend visualization quickly. Chart examples include multi-series monthly revenue and user count datasets rendered inside responsive containers for dashboard panels.

  • Agent KPI definitions
  • Event instrumentation patterns
  • Cost and latency tracking
  • Funnel and retention views
  • Experiment-ready metrics

Analytics Metrics by the numbers

  • 359 all-time installs (skills.sh)
  • +6 installs in the week ending Aug 2, 2026 (Skillselion tracking)
  • Ranked #534 of 2,064 Data Science & ML skills by installs in the Skillselion catalog
  • Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/hoodini/ai-agents-skills --skill analytics-metrics

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs359
repo stars262
Last updatedJuly 11, 2026
Repositoryhoodini/ai-agents-skills

How do you build KPI charts with Recharts in React?

Define, instrument, and review KPIs for AI agents—latency, success rate, cost, retention, and funnel events—so teams can tune prompts, tools, and pricing with evidence.

Who is it for?

Frontend developers adding Recharts metrics dashboards or KPI visualization components to React admin or analytics pages.

Skip if: Teams that need backend event instrumentation, data pipeline ETL, or non-React charting stacks without Recharts.

When should I use this skill?

User asks for analytics dashboards, KPI charts, metrics visualization, or Recharts components in React.

What you get

Recharts dashboard components with line charts, axes, tooltips, and responsive layout TSX code.

  • Recharts chart components
  • Dashboard TSX layouts
  • KPI visualization code

By the numbers

  • Uses Recharts LineChart with 6 core subcomponents: Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend

Files

SKILL.mdMarkdownGitHub ↗

Analytics & Metrics Dashboards

Build data visualization components with Recharts.

Quick Start

npm install recharts

Line Chart

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

const data = [
  { month: 'Jan', revenue: 4000, users: 2400 },
  { month: 'Feb', revenue: 3000, users: 1398 },
  { month: 'Mar', revenue: 2000, users: 9800 },
  { month: 'Apr', revenue: 2780, users: 3908 },
];

function RevenueChart() {
  return (
    <ResponsiveContainer width="100%" height={400}>
      <LineChart data={data}>
        <CartesianGrid strokeDasharray="3 3" />
        <XAxis dataKey="month" />
        <YAxis />
        <Tooltip />
        <Legend />
        <Line
          type="monotone"
          dataKey="revenue"
          stroke="#3b82f6"
          strokeWidth={2}
        />
        <Line
          type="monotone"
          dataKey="users"
          stroke="#10b981"
          strokeWidth={2}
        />
      </LineChart>
    </ResponsiveContainer>
  );
}

Bar Chart

import { BarChart, Bar, XAxis, YAxis, Tooltip, ResponsiveContainer } from 'recharts';

function SalesChart({ data }) {
  return (
    <ResponsiveContainer width="100%" height={300}>
      <BarChart data={data}>
        <XAxis dataKey="name" />
        <YAxis />
        <Tooltip />
        <Bar dataKey="sales" fill="#3b82f6" radius={[4, 4, 0, 0]} />
      </BarChart>
    </ResponsiveContainer>
  );
}

KPI Card

interface KPICardProps {
  title: string;
  value: string | number;
  change: number;
  trend: 'up' | 'down';
  icon?: React.ReactNode;
}

function KPICard({ title, value, change, trend, icon }: KPICardProps) {
  const isPositive = trend === 'up';
  
  return (
    <div className="bg-white rounded-lg p-6 shadow-sm border">
      <div className="flex items-center justify-between">
        <p className="text-sm font-medium text-gray-500">{title}</p>
        {icon && <div className="text-gray-400">{icon}</div>}
      </div>
      
      <div className="mt-2">
        <p className="text-3xl font-semibold text-gray-900">{value}</p>
        
        <div className="mt-2 flex items-center">
          <span
            className={`text-sm font-medium ${
              isPositive ? 'text-green-600' : 'text-red-600'
            }`}
          >
            {isPositive ? '↑' : '↓'} {Math.abs(change)}%
          </span>
          <span className="ml-2 text-sm text-gray-500">vs last period</span>
        </div>
      </div>
    </div>
  );
}

Dashboard Layout

function Dashboard() {
  return (
    <div className="p-6 space-y-6">
      {/* KPI Grid */}
      <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
        <KPICard
          title="Total Revenue"
          value="$45,231"
          change={12.5}
          trend="up"
        />
        <KPICard
          title="Active Users"
          value="2,345"
          change={8.2}
          trend="up"
        />
        <KPICard
          title="Conversion Rate"
          value="3.2%"
          change={-2.1}
          trend="down"
        />
        <KPICard
          title="Avg. Order Value"
          value="$142"
          change={5.4}
          trend="up"
        />
      </div>

      {/* Charts Grid */}
      <div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
        <div className="bg-white rounded-lg p-6 shadow-sm border">
          <h3 className="text-lg font-medium mb-4">Revenue Over Time</h3>
          <RevenueChart />
        </div>
        
        <div className="bg-white rounded-lg p-6 shadow-sm border">
          <h3 className="text-lg font-medium mb-4">Sales by Category</h3>
          <SalesChart data={salesData} />
        </div>
      </div>
    </div>
  );
}

Pie Chart

import { PieChart, Pie, Cell, Tooltip, Legend, ResponsiveContainer } from 'recharts';

const COLORS = ['#3b82f6', '#10b981', '#f59e0b', '#ef4444'];

function DistributionChart({ data }) {
  return (
    <ResponsiveContainer width="100%" height={300}>
      <PieChart>
        <Pie
          data={data}
          cx="50%"
          cy="50%"
          innerRadius={60}
          outerRadius={100}
          dataKey="value"
          label
        >
          {data.map((_, index) => (
            <Cell key={index} fill={COLORS[index % COLORS.length]} />
          ))}
        </Pie>
        <Tooltip />
        <Legend />
      </PieChart>
    </ResponsiveContainer>
  );
}

Formatting Utilities

export function formatNumber(value: number): string {
  if (value >= 1_000_000) {
    return `${(value / 1_000_000).toFixed(1)}M`;
  }
  if (value >= 1_000) {
    return `${(value / 1_000).toFixed(1)}K`;
  }
  return value.toLocaleString();
}

export function formatCurrency(value: number, currency = 'USD'): string {
  return new Intl.NumberFormat('en-US', {
    style: 'currency',
    currency,
    minimumFractionDigits: 0,
    maximumFractionDigits: 0,
  }).format(value);
}

export function formatPercent(value: number): string {
  return `${value >= 0 ? '+' : ''}${value.toFixed(1)}%`;
}

Resources

  • Recharts: https://recharts.org
  • D3.js: https://d3js.org

Related skills

How it compares

Pick analytics-metrics for Recharts React UI; use separate observability tooling when you need backend metric collection rather than chart components.

FAQ

Which chart library does analytics-metrics use?

analytics-metrics builds dashboards with Recharts in React. Install via `npm install recharts`, then compose LineChart components inside ResponsiveContainer wrappers with axes, grids, tooltips, and legends.

When should you invoke analytics-metrics?

Invoke analytics-metrics when creating charts, KPI displays, metrics dashboards, or data visualization components in React. Triggers include analytics, dashboard, charts, metrics, KPI, and Recharts keywords.

Data Science & MLanalyticspipelines

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.