agentleFS
PostHogKnown publisherPostHog/posthog-foss/.agents/skills/working-with-charts/SKILL.md

working-with-charts

Skill721 starsChanged 2 months agoMITView on GitHub

Guides consumers of @posthog/quill-charts through chart selection, data, themes, sizing, and composition. Use when adding or changing a chart built with the package, including its axes, tooltips, legend, overlays, or interactions. Links to package examples and API docs. Does not cover product integration or library internals.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 10 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the package's components and defaults before writing custom chart code.

    line 11
  2. Distinctive:

    Read only the example or topic needed for the task.

    line 12
  3. Distinctive:

    Use the chart-selection table, then read a matching package story.

    line 17
  4. Very specific:

    Import components and types from @posthog/quill-charts, not internal source paths.

    line 19
  5. Very specific:

    Use stable series keys and typed meta for tooltip or click data.

    line 23
  6. Very specific:

    Use ISO date labels with TimeSeries* charts.

    line 25
  7. Very specific:

    Use NaN for missing numeric series values, not zero.

    line 26
  8. Distinctive:

    Keep series, config, and callbacks stable across unrelated renders.

    line 27
  9. Distinctive:

    Follow the setup and theme docs for tokens and CSS.

    line 32
  10. Distinctive:

    Read the selected chart's props and the Series type for its data contract.

    line 34
  11. Distinctive:

    Prefer the selected chart's built-in tooltip and legend.

    line 38
  12. Distinctive:

    Use config options and exported overlays before custom renderers.

    line 39
  13. Distinctive:

    Check missing values, long labels, and any interactions you changed.

    line 54
  14. Distinctive:

    Keep detailed API behavior in the package docs rather than copying it into this skill.

    line 57

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Consuming quill-charts

Use the package's components and defaults before writing custom chart code. Read only the example or topic needed for the task. For changes inside the library, use CONTRIBUTING.md instead.

Choose a component

Use the chart-selection table, then read a matching package story. For a date axis, start with DateAxis in TimeSeriesLineChart stories. Import components and types from @posthog/quill-charts, not internal source paths.

Supply data, theme, and dimensions

  • Use stable series keys and typed meta for tooltip or click data.
  • For label-based charts, keep labels unique and align each series' data with them.
  • Use ISO date labels with TimeSeries* charts; format ticks through the axis config.
  • Use NaN for missing numeric series values, not zero.
  • Keep series, config, and callbacks stable across unrelated renders.
  • Give charts that fill their container a parent with real dimensions, including a nonzero height.

Reuse the host's existing chart theme setup. For a new host without chart theming, use the package's useChartTheme hook. Follow the setup and theme docs for tokens and CSS. Omit series colors to use the theme palette; resolve CSS variables before passing explicit canvas colors. Read the selected chart's props and the Series type for its data contract.

Configure before customizing

Prefer the selected chart's built-in tooltip and legend. Use config options and exported overlays before custom renderers. Load only the relevant topic:

TaskPackage docs
Axis formatting, ranges, or multiple axesAxes
Bar layouts or per-bar stylingBars
Tooltip formatting or contentTooltips
Legend visibility or interactionLegend
Reference lines, labels, or custom overlaysOverlays
Clicks, zoom, or selectionInteractions

Verify

Render at the intended container sizes and in light and dark themes. Check missing values, long labels, and any interactions you changed. Extend relevant tests and stories; use the consumer testing guide for chart accessors.

Keep detailed API behavior in the package docs rather than copying it into this skill.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.