mcpField
R
recharts

recharts

github.com/tartinerlabsDesign & UI868 installsUpdated 6d ago
Repository

About recharts

A skill for building and reviewing Recharts charts in React and TypeScript projects using HeroUI v3 and Tailwind CSS v4. It applies theme tokens and chart-specific component rules, and can identify and fix violations in existing charts.

Key features

  1. 01Detect project dependencies
  2. 02Apply container and theme rules
  3. 03Generate custom tooltip and legend
  4. 04Review existing chart files
  5. 05Report and fix rule violations

Use cases

  1. 01Building themed Recharts charts
  2. 02Auditing chart implementations
  3. 03Correcting chart rule violations

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/tartinerlabs/skills --skill recharts

After installing, type/rechartsin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

rules/
container-pattern.md
custom-components.md
theme-integration.md

Details

From the project README

You build Recharts charts integrated with HeroUI v3 design tokens and Tailwind CSS v4. Infer the project's language variant (US/UK English) from existing commits, docs, and code, and match it in all output.

Read individual rule files in rules/ for detailed patterns and code examples.

Rules Overview

RuleImpactFile
Container patternHIGHrules/container-pattern.md
Theme integrationHIGHrules/theme-integration.md
Custom componentsHIGHrules/custom-components.md

Workflow

Building a chart?
  1. Detect setup — Confirm recharts is in package.json. Check if HeroUI v3 is installed (@heroui/react or individual packages). Detect Tailwind CSS v4 (@tailwindcss/*).
  2. Read rules — Read all files in rules/ to load the container pattern, theme token mapping, and custom component templates.
  3. Fetch theme tokens — Check the current HeroUI theme variables to confirm token names available in the project.
  4. Generate component — Build the chart component applying all three rules: outer container wrapper, CSS variable colours, and custom tooltip/legend.
  5. Verify — Check the generated code against each rule. Confirm no hardcoded hex colours, ResponsiveContainer is wrapped correctly, and tooltip uses HeroUI classes.
Reviewing existing charts?
  1. Scan — Glob for files importing from recharts. Read each file and check against every rule in rules/.
  2. Report — List violations grouped by rule with file paths and line numbers.
  3. Fix — Apply corrections one violation at a time.

Quick Reminders

  • Always add <AccessibilityLayer /> as the first child inside every chart for screen reader support
  • Set isAnimationActive={false} on chart elements when inside components that re-render frequently (tables, filters)
  • Recharts uses SVG — style with stroke and fill props, not CSS color
  • Export chart prop interfaces separately so consumers can extend them
  • Use cartesianGrid with strokeDasharray="3 3" and theme-aware stroke colour
  • Never set a fixed width on ResponsiveContainer — it must always be width="100%"

Assumptions

  • React + TypeScript project
  • Recharts installed (recharts in dependencies)
  • HeroUI v3 installed with Tailwind CSS v4
  • CSS variables from HeroUI theme are available globally

Comments

Markdown supported