Build a Streamlit dashboard and verify every KPI headlessly (verify_app.py): cached loading, sidebar filters, KPI cards, Plotly charts, multipage state and branding. Not for single charts; use charts.
Ships in data-analytics. 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; scripts run unread.
Profile raw inputs via gateway(op="call", capability="data", args={op: "stats", path: "<file>"}) first. Every KPI displayed in a Streamlit dashboard must match an independent calculation for the exact same filters, verified headlessly with streamlit.testing.v1.AppTest before shipping.
Use one file (app.py) for a focused single-view dashboard, or a pages/ layout when views answer distinct questions:
app.py # entrypoint (overview page)
pages/
1_breakdown.py # secondary view
data_helpers.py # cached loader, grain/metric rules, sidebar, brand palette & formatters
logo.png # optional brand mark for st.logo()
.streamlit/config.toml # theme tokens (colors, font)
Put shared theme tokens in .streamlit/config.toml with accessible contrast, and keep custom CSS hacks out:
[theme]
base = "light"
primaryColor = "#1f4e79"
backgroundColor = "#ffffff"
secondaryBackgroundColor = "#f4f6f9"
textColor = "#1a1a1a"
font = "sans serif"
Apply one consistent brand across every page from data_helpers.py: call st.set_page_config(page_title=..., page_icon=..., layout="wide") first on every page; show st.logo("logo.png") when a logo file exists; open each page with a title and st.caption(...) stating scope, currency and date span; group KPIs inside st.columns / st.container(border=True); share one BRAND_COLORS palette, apply_brand_layout(fig) helper (template="plotly_white", matching primaryColor, units on axes/hover) and number formatters so charts and KPIs never clash; close with a short methodology/caveat footer (grain, cancellations, partial periods).
Pass the file's modification timestamp into @st.cache_data so replacing the CSV invalidates the cache, and parse dates and IDs explicitly:
from pathlib import Path
import pandas as pd
import streamlit as st
@st.cache_data
def load_table(path_str: str, mtime_ns: int) -> pd.DataFrame:
return pd.read_csv(path_str, encoding="utf-8", dtype={"InvoiceNo": "string", "StockCode": "string", "CustomerID": "Int64"}, parse_dates=["InvoiceDate"])
def get_data(path: Path) -> pd.DataFrame:
return load_table(str(path), path.stat().st_mtime_ns)
Compute sidebar filters once (multiselect, date_input, checkbox/toggle), guard empty filter results (if filtered.empty: st.warning("No rows match these filters."); st.stop()), and drive every st.metric, st.plotly_chart(fig, width="stretch"), and backing st.expander("Data table") / st.download_button from filtered. Show active row and distinct entity counts beside KPIs so grain stays visible, and format KPI values in full (thousands separators, two decimals, currency symbol or ISO code such as GBP/EUR), never abbreviated like $1.2M, which hides discrepancies.
For multi-page apps (pages/), keep filters alive across page switches by mirroring selections into non-widget st.session_state keys inside render_sidebar(df) (seed the widget from st.session_state["state_country"] and update it via on_change), because Streamlit clears widget keys not rendered on the current page.
Never ship a dashboard without running <base_dir>/scripts/verify_app.py, which drives streamlit.testing.v1.AppTest headlessly, catches uncaught exceptions and st.error banners, applies filter widgets, switches pages (--page or {"type": "switch_page", "value": "pages/1_breakdown.py"} inside --spec widgets to prove cross-page state persists), parses currency symbols and ISO codes (GBP, EUR, USD), and asserts every st.metric equals your independently computed value:
uv run python <base_dir>/scripts/verify_app.py app.py --list
uv run python <base_dir>/scripts/verify_app.py app.py \
--set multiselect:region='["North"]' \
--expect "Total Revenue=123456.78" --expect "Distinct Orders=789" --tol 0.01
uv run python <base_dir>/scripts/verify_app.py app.py --spec out/dashboard_checks.json
Compute expected numbers independently from the raw file (with gateway(op="call", capability="data", args={op: "stats", path: "<file>", where: {...}, aggregates: [...]}) when the filters map to where and aggregates such as sum:Quantity*UnitPrice or count_distinct:InvoiceNo, otherwise a standalone pandas snippet; never import app helpers), verify the default view and at least one filtered state per page (plus a cross-page switch on multi-page apps), and report the command and results.
Once AppTest passes, hand the user the exact launch command to run in their own terminal:
uv run streamlit run app.py --server.headless true --server.port 8501
A server started inside a sandboxed agent shell cannot be reached from the host browser, so verify with AppTest instead of leaving a background server running.
What SKILL.md sets; muted values are Claude Code's defaults
/data-analytics:streamlit-appfrom data-analytics
npx claudepluginhub panstudio/pancode --plugin data-analytics9 skills in this plugin
/analysis-projectStart a pinned uv analysis project or check one is ready (check_workspace.py), then lay out its notebook and prompt appendix. Read-only check; syncs only with the user's go. Not for the analysis itself; use pandas-descriptive./chartsMake and check bar, line, histogram or scatter charts (plotly_chart.py, matplotlib): backing table printed, sorted, labelled, bars from zero. Not for dashboards; use streamlit-app./customer-analyticsCohort retention, top-customer share and RFM (cohort_table.py, pareto_rfm.py) for repeat and best customers, counting customers and orders, not lines. Not for k-means clusters; use modelling.Other plugins' skills for the same job