/reflex-xy:reflex-xyfrom reflex-xy
Builds, customizes, troubleshoots, and exports Python charts with reflex-dev/xy, including large-data views, notebook widgets, xy.pyplot migration, and Reflex integration. Use when the user names XY, reflex-xy, reflex_xy, or this library's repository; do not substitute React Flow's xyflow.
Ships in reflex-xy. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use the Python package xy from reflex-dev/xy.
Build an editable Python source and the requested chart artifacts. Keep generated
files outside this skill bundle.
importlib.util.find_spec("xy") safely detects
absence before calling importlib.metadata.version("xy"). Preserve a
working dependency pin.
The tested baseline is XY 0.0.8, Python 3.11+, checked on 2026-10-24.
For a new project, use uv add "xy==0.0.8" or an equivalent explicit pin;
check current official release metadata when the user requests a newer version.
For a standalone script, copy the template's PEP 723 metadata declaring
xy==0.0.8 and run uv run --script app.py in its declared environment.xy for scripts and notebooks. Add xy[reflex] only for a Reflex
application; its Python adapter is imported as reflex_xy.import xy: the import is
lazy and can succeed with a missing native core or render-client asset.
Run the diagnostic below when installation or output behavior is uncertain.Chart objects from
marks and components; xy.Figure is not public in the tested release.For declarative requests to the connected XY renderer, read connected-adapter.md. Use its versioned JSON contract and focused checker; do not translate Python kwargs into guessed wire fields. This route can produce request specs when no live renderer is available.
chart.to_html(path).
The file embeds its data and client; browser hover/pan/zoom work locally.chart as the last expression or display
chart.widget(). chart.show() returns a widget; it does not launch a browser.chart.write_image(path) or the explicit exporters. Read
outputs-and-validation.md for engine,
CSS, dimensions, and snapshot behavior.When authoring or refining presentation, follow craft-by-surface.md for the actual styling owner, supported mechanism, fallback and acceptance checks.
When embedding a chart in a chat component or small application panel, read interaction-design.md. Start with the chart and a primary action; reveal display/export controls on request.
Read chart-recipes.md for arrays, named columns,
multiple series, categorical bars, heatmaps, and facets. Start from
chart.py when an editable, reproducible script is
useful. Preserve supplied data and missing-value semantics; label axes and units.
Prefer xy.chart(...) for mixed marks and a family factory for a single family.
For distributions, uncertainty, field/flow geometry, polar families or layered annotations, read advanced-charts.md. The capability atlas shows every implemented visual family in both palettes and indexes all 105 public exports in the tested release. Its parameter catalogue distinguishes explicit examples from available options; it does not enumerate unbounded combinations. Use compact runtime recipes rather than reading its large fixture.
Read colorsets.md before authoring chart paint.
Default to colorset1 for every new chart. Select colorset2 only when the user
explicitly requests or selects it; multiple categories do not change the default.
Use the bundled helper and exact
palette contract for marks, text, axes,
backgrounds, legends, tooltips and controls. Apply the helper's theme() to
the chart and css() to HTML export. Keep explicit user style when requested.
Assign stable category identities to opaque solid fills, with no decorative outline. Place the legend explicitly in verified empty space; XY's default upper-right legend can cover a high endpoint. Use colorset1's primary red followed by its interleaved neutral sequence; exhaust usable solids before adding another visual encoding. For numeric color, bin values into exact palette colors while retaining the raw measurements. Native XY colormaps interpolate, so exact palette stops alone do not establish an exact-paint result. Inspect rendered HTML and native exports; antialiasing and alpha compositing are derived pixel effects.
Use the six paired published examples for visual reference. The reusable recipe is in the compact reference above; normal runtime work does not need to read the acceptance gallery source. Read the compact pattern recipes to recreate a mechanism with new data while keeping the palette contract.
data= overrides chart-level data=. Convert row-record lists to a mapping
of column names to arrays before using named channels. Valid CSS color strings are constants;
other strings can resolve to data columns. Use one line mark per series;
a line's color is a constant, not a categorical channel.append() calls require a live widget or framework connection. Explain that
boundary when the requested delivery mode cannot perform a backend action.Replace <skill-dir> with this bundle's path. The uv form runs the pinned
baseline; run the same script with the project's Python to diagnose its installed
version. Outputs include real HTML, SVG, PNG, hashes, and a JSON result.
uv run --script <skill-dir>/scripts/diagnose.py --output-dir artifacts/xy-probe --report artifacts/xy-environment.json
Run the final source in the intended environment. Confirm every requested path, parse image dimensions, and inspect the rendered chart for legible labels, correct series, missing-value gaps, and clipping. For interactive HTML, open it with the bundled browser verifier, then inspect its screenshot and exercise any additional requested interaction. It blocks network requests, checks canvas paint and console errors, and uses an installed Edge/Chrome or Playwright Chromium:
uv run --script <skill-dir>/scripts/verify_html.py --html results/chart.html --report artifacts/browser.json --screenshot artifacts/browser.png --label "Chart title"
Replace paths and labels with the actual outputs; repeat --label for expected
case-sensitive DOM text such as title, axis or legend fragments. Inspect canvas
annotations in the screenshot; they need not exist as DOM text. In Windows
shells, prefer ASCII label fragments because Unicode command arguments can be
transcoded; retain the intended Unicode in source files. A successful file
write alone does not establish rendering.
Report which host, package version, output engine, and interactions were verified;
distinguish untested integration or performance claims from measured results.
agents/openai.yaml (opens in a new tab)assets/examples/reflex-xy-capabilities/advanced.py (opens in a new tab)assets/examples/reflex-xy-capabilities/atlas.css (opens in a new tab)assets/examples/reflex-xy-capabilities/build.py (opens in a new tab)assets/examples/reflex-xy-capabilities/core_marks.py (opens in a new tab)assets/examples/reflex-xy-capabilities/data_tools.py (opens in a new tab)assets/examples/reflex-xy-capabilities/gallery.html (opens in a new tab)assets/examples/reflex-xy-capabilities/host_examples.py (opens in a new tab)assets/examples/reflex-xy-capabilities/patterns.json (opens in a new tab)assets/examples/reflex-xy-capabilities/polar_annotations.py (opens in a new tab)assets/examples/reflex-xy-capabilities/utilities.py (opens in a new tab)assets/examples/reflex-xy-colorsets/build.py (opens in a new tab)assets/examples/reflex-xy-colorsets/gallery.html (opens in a new tab)assets/examples/reflex-xy-colorsets/patterns.json (opens in a new tab)assets/palettes/colorsets.json (opens in a new tab)assets/templates/chart.py (opens in a new tab)references/advanced-charts.md (opens in a new tab)references/chart-recipes.md (opens in a new tab)references/colorsets.md (opens in a new tab)references/connected-adapter.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub gvillarroel/plugins --plugin reflex-xy