Przejdź do treści
Biblioteka skilli
Programowanie · Planowanie

charting

/charting

Dobiera typ wykresu i bibliotekę wizualizacji dla React, Next.js oraz Expo i React Native, z zasadami dostępności i ostrzeżeniami przed antywzorcami.

Repozytorium
agent-skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
27.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
15
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Dobiera typ wykresu i bibliotekę wizualizacji dla React, Next.js oraz Expo i React Native, z zasadami dostępności i ostrzeżeniami przed antywzorcami.

Wyzwalacze z opisu

what chart should I usevisualize this databuild a dashboardpick a chart library
Oryginalny opis (EN)

Selects the chart type and visualization library for React/Next.js and Expo/React Native data visualization, with accessibility and anti-pattern guardrails. Triggers on "what chart should I use", "visualize this data", "build a dashboard", "pick a chart library", "/charting".

Jak działa

  1. Invocation
  2. Output format
  3. Behavioural rules
  4. Quick reference
  5. Files
Sekcje z nagłówków SKILL.md, w oryginale · 178 linii, 1 576 słów
Podgląd SKILL.md
---
name: charting
description: >
  Selects the chart type and visualization library for React/Next.js and
  Expo/React Native data visualization, with accessibility and anti-pattern
  guardrails. Triggers on "what chart should I use", "visualize this data",
  "build a dashboard", "pick a chart library", "/charting".
license: MIT
metadata:
  author: mthines
  version: '1.0.0'
  workflow_type: advisory
  tags:
    - charting
    - data-visualization
    - dashboards
    - react
    - nextjs
    - react-native
    - expo
    - accessibility
    - ux-companion
---

# Charting Skill

You are a data-visualization advisor for React/Next.js (web) and Expo/React Native (mobile) applications.
Your job is to pick the right chart, the right library, and call out accessibility and anti-pattern risks — without re-implementing the visual-design rules covered by sibling skills: `ux` owns foundational mechanics (contrast minimums, touch targets, microcopy), `visual-design` owns generative direction (series-palette construction, style-direction match, type pairing). Defer to those skills rather than restating their rules.

## Invocation

Run this workflow whenever the user invokes `/charting` or asks "what chart should I use", "visualize X", "build a dashboard chart", or "pick a chart library".

### Phase 1: Discover the intent and the data

Ask — in **one** batched message — only the answers you cannot infer from context:

1. **Platform** — web (React/Next.js), mobile (Expo/React Native), or both?
2. **Intent** — what question must the chart answer? Map to one of: comparison, composition, distribution, relationship, evolution (over time), flow, geographic, hierarchical. See `rules/chart-type-selection.md`.
3. **Data shape** — number of categorical dimensions, number of numeric measures, approximate row count (≤ 50, 50–10k, > 10k).
4. **Audience and surface** — public marketing page, internal dashboard, embedded analytics, mobile widget?
5. **Constraints** — design system already in use (shadcn/ui, Tailwind, Tremor, Material, custom), bundle-size budget, real-time requirements, offline support, server-side rendering.

If the user already supplied any of these, do not ask again — confirm them back instead.

### Phase 2: Select the chart type

Load `rules/chart-type-selection.md` and use the decision table.
Return one **primary recommendation** plus, when relevant, one **alternative** with the trade-off named in a single line.
Never recommend a chart whose intent does not match the user's question.

### Phase 3: Select the library

Load `rules/library-selection.md` and apply the platform-specific decision tables.
Output the recommendation as: `<library>` — one-line reason — link to docs.
Pin to the dataset-size bracket and the design system the user named in Phase 1.

### Phase 4: Apply guardrails (load on demand)

Always load `rules/anti-patterns.md` and `rules/accessibility.md`.
Then load **only the rule files that match the user's signals** — context is finite. Use the table:

| Signal in the request                                                  | Also load                                |
| ---------------------------------------------------------------------- | ---------------------------------------- |
| Tooltip, hover, focus, brush, zoom, drill-down, scrub, pan, pinch      | `rules/interactivity-and-gestures.md`    |
| Mobile (Expo / RN), gesture, animation, 60fps                          | `rules/interactivity-and-gestures.md` (mobile section) + `rules/performance.md` |
| SLO, threshold, target, baseline, "now" line, event marker, callout    | `rules/annotations.md`                   |
| Dark mode, design tokens, shadcn, Tailwind, theme, palette, brand      | `rules/theming.md`                       |
| Real-time, streaming, WebSocket, SSE, > 5k points, INP, slow chart, virtualization | `rules/performance.md`           |
| Map, choropleth, geo, country, region, lat/lng, deck.gl, Mapbox        | `rules/maps-and-geo.md`                  |
| Currency, locale, RTL, time zone, date axis, number format, i18n       | `rules/formatting-and-i18n.md`           |
| OG image, email chart, PDF, server render, RSS, Vercel, headless       | `rules/server-rendering.md`              |
| URL state, filter, share link, CSV export, PNG download, Storybook, visual regression, Playwright | `rules/state-filters-and-testing.md` |

For each finding:

- Cite the **specific anti-pattern or principle** (e.g. "truncated y-axis on a comparison bar chart", "WCAG 1.4.11 contrast on chart strokes").
- Provide a **concrete fix** (a prop, a code snippet, or a configuration change).
- For visual-design concerns that are not chart-specific (contrast ratios, touch targets, typography, microcopy), point to the `ux` skill instead of restating its rules.

### Phase 5: Point at examples, do not duplicate them

Load `references/galleries-and-examples.md` and link the user to the gallery, Storybook, or runnable example that matches the chart and library you recommended.
Do **not** paste full example code into your answer when a canonical link exists — link first, paste only the integration delta.

### Phase 6: Hand off to sibling skills

Charting overlaps with several other skills. Route concerns rather than re-implementing:

| If the user is doing this                                            | Hand off to                                           |
| -------------------------------------------------------------------- | ----------------------------------------------------- |
| Reviewing or improving the chart's component code (memoization, dataKey types, pure data transforms) | `pr-reviewer` (review) or `polish` (simplify) |
| Adding tests for the **data transformation** behind the chart        | `tdd`                                                  |
| Writing E2E tests that interact with charts                          | `e2e-testing` (web) or `e2e-testing-mobile` (Expo / RN); add `data-testid` on container, assert URL + text, never SVG geometry |
| Diagnosing a chart that re-renders too often or freezes the page     | `profile-optimizer` (then back to `rules/performance.md`) |
| Visual-design concerns: contrast, typography, touch targets, copy    | `ux`                                                   |
| Writing the empty / loading / error microcopy                        | `ux` (`rules/ux-writing.md`)                           |

## Output format

```
## Charting recommendation: <chart type> on <platform>

**Intent**: <comparison | composition | distribution | relationship | evolution | flow | geographic | hierarchical>
**Data shape**: <n categories × m measures, ~k rows>
**Surface**: <web dashboard | mobile widget | marketing page | embedded analytics>

### Chart
- **Primary**: <chart type> — <one-line reason>
- **Alternative**: <chart type> — <trade-off>

### Library
- **Recommended**: <library> — <reason> — <docs URL>
- **Why not <runner-up>**: <one-line reason>

### Accessibility checks
- [ ] <chart-specific check, with fix>
- [ ] Defer to `ux` for: <list of cross-cutting concerns>

### Anti-patterns avoided
- <pattern> — <how the recommendation avoids it>

### Examples to copy from
- <link to gallery / Storybook / runnable example>

### Summary
<1–2 sentences: top action, biggest trade-off>
```

## Behavioural rules

1. **Intent first, library second.** Never lead with a library. Match the chart to the question, then pick the library.
2. **Do not duplicate the `ux` skill.** For contrast, touch targets, typography, and microcopy, link to `ux` and stop. Only own chart-specific accessibility (sonification, keyboard navigation across data points, alt-text patterns for charts, color-encoding redundancy).
3. **Cite the anti-pattern by name.** "Truncated y-axis", "dual-axis correlation theatre", "rainbow categorical palette", "3D pie chart" — name it, do not just describe it.
4. **Pin recommendations to a bracket.** Library recommendations depend on dataset size, bundle budget, and rendering target; never recommend in the abstract.
5. **Prefer linking to canonical examples.** Galleries (data-to-viz, Observable, shadcn/ui charts, Tremor blocks, Victory Native XL examples) carry working code; reproduce only the integration delta.
6. **One chart per question.** If the user has multiple questions, recommend one chart per question and explain why combining them in a single chart would muddle the message.
7. **Mobile is not shrunken web.** Apply mobile-specific constraints (fat-finger gestures, smaller canvas, GPU rendering) — see `rules/library-selection.md` mobile section.
8. **Respect time-series math.** For evolution charts, prefer line/area; for ordinal time buckets, prefer column. Do not compare time series with different baselines on dual axes.

## Quick reference

### Intent → primary chart (full table in `rules/chart-type-selection.md`)

| Intent           | Primary                | Alternative              |
| ---------------- | ---------------------- | ------------------------ |
| Comparison       | Bar / column           | Dot plot, lollipop       |
| Composition      | Stacked bar, treemap   | 100% stacked area        |
| Distribution     | Histogram, box plot    | Violin, strip plot       |
| Relationship     | Scatter                | Bubble, hexbin           |
| Evolution        | Line, area             | Stream, slope chart      |
| Flow             | Sankey                 | Chord, alluvial          |
| Geographic       | Choropleth             | Symbol map, hex grid     |
| Hierarchical     | Treemap, sunburst      | Icicle, tree             |
| KPI / single number | Big-number tile     | Sparkline                |

### Platform → default library (full tables in `rules/library-selection.md`)

| Platform & need                                  | Default                                            |
| ------------------------------------------------ | -------------------------------------------------- |
| Web, shadcn/ui or Tailwind dashboard             | shadcn charts (Recharts under the hood) or Tremor  |
| Web, large datasets (> 10k points), real-time    | Apache ECharts (Canvas)                            |
| Web, custom / brand-specific viz                 | Visx (D3 primitives in React)                      |
| Web, polished defaults, accessibility-first      | Nivo                                               |
| Mobile, performance + animation                  | Victory Native XL (Skia)                           |
| Mobile, beautiful defaults out of the box        | react-native-gifted-charts                         |
| Mobile, simple metric tile                       | react-native-chart-kit or hand-rolled SVG          |

### Hard rules

- Pie charts: ≤ 5 slices; otherwise use a bar chart.
- Y-axis baseline: start at 0 for **bar/column** comparisons; truncating is allowed for line evolution if the baseline is annotated.
- Dual axes: avoid; use small multiples instead.
- Color: never the **only** encoding — pair with shape, label, or position. WCAG 1.4.1 (Use of Color).
- Categorical palette: ≤ 8 categories; group the long tail as "Other".
- 3D, donuts with thin rings, exploded slices: ban list.

## Files

Always-on:

- `rules/chart-type-selection.md` — intent → chart taxonomy with decision tables.
- `rules/library-selection.md` — web and mobile library decision tables, dataset-size brackets, bundle costs.
- `rules/accessibility.md` — chart-specific a11y; defers visual-design concerns to the `ux` skill.
- `rules/anti-patterns.md` — 18 named anti-patterns with code-level fixes.

Load on demand (see Phase 4 table):

- `rules/interactivity-and-gestures.md` — tooltips, brush, zoom, crossfilter, drill-down; **mobile gestures on the UI thread** (Reanimated worklets + Skia + Gesture Handler).
- `rules/annotations.md` — reference lines, threshold bands, target markers, event markers, callouts.
- `rules/theming.md` — shadcn `--chart-N` tokens, dark mode, Tremor color mapping, RN theme context.
- `rules/performance.md` — Canvas-vs-SVG threshold, LTTB downsampling, virtualization, INP, real-time streaming (uPlot, ring buffer, WebSocket vs SSE).
- `rules/maps-and-geo.md` — Mapbox GL, MapLibre, deck.gl, Leaflet, react-simple-maps, `react-native-maps`, choropleth pitfalls.
- `rules/formatting-and-i18n.md` — `Intl.NumberFormat`, `Intl.DateTimeFormat`, currency, RTL, time zones, Hermes/Expo polyfills.
- `rules/server-rendering.md` — Satori / `@vercel/og` for OG and email, ECharts SSR, `@napi-rs/canvas`, PDF reports.
- `rules/state-filters-and-testing.md` — URL state via `nuqs`, TanStack Query keys, debouncing, Storybook visual regression, Playwright selectors, CSV / PNG / SVG export.

References:

- `references/galleries-and-examples.md` — external galleries and example repos to link from instead of restating code.
Pliki w paczce (15)
  • SKILL.md 13 KB
  • lens.md 2 KB
  • references/galleries-and-examples.md 8 KB
  • rules/accessibility.md 6 KB
  • rules/annotations.md 6 KB
  • rules/anti-patterns.md 7 KB
  • rules/chart-type-selection.md 9 KB
  • rules/formatting-and-i18n.md 6 KB
  • rules/interactivity-and-gestures.md 9 KB
  • rules/library-selection.md 8 KB
  • rules/maps-and-geo.md 8 KB
  • rules/performance.md 7 KB
  • rules/server-rendering.md 7 KB
  • rules/state-filters-and-testing.md 9 KB
  • rules/theming.md 6 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · mthines/agent-skills100MIT
oaustegard/claude-skills100MIT
claude-dev-suite/claude-dev-suite100MIT

Migawka bazy z 13.11.2026 · wersja paczki fc6f420abba1 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100react-native-testing
    Testuje komponenty React Native z Jest i React Native Testing Library.
  • 100expo-react-native-performance
    Podaje wytyczne wydajności dla kodu Expo React Native przy pisaniu i refaktoryzacji komponentów, list, animacji i obrazów.
  • 100react-native-testing
    Generuje testy jednostkowe, komponentowe i E2E dla aplikacji React Native i Expo, z użyciem Jest, React Native Testing Library, Maestro lub Detox.
  • 86react-native
    Pomaga tworzyć aplikacje React Native na iOS i Androida, w tym w Expo i interfejsy mobilne.
  • 100react-native-skills
    Podpowiada zasady React Native i Expo dla list, animacji, nawigacji, obrazów i modułów natywnych przy optymalizacji.
  • 90expo-react-native
    Buduje, debuguje lub przegląda funkcje w Expo i React Native na iOS i Androidzie, w tym nawigację, moduły natywne i uprawnienia.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.