@llodev/bi-dashboard 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # @llodev/bi-dashboard
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#121](https://github.com/llodev/skills/pull/121) [`f55b646`](https://github.com/llodev/skills/commit/f55b646f38d0959f503c79c2e45fc943332f5421) Thanks [@lloliveiradev](https://github.com/lloliveiradev)! - feat(bi-dashboard): first release of the bi-dashboard skill
8
+
9
+ New `bi-*` family. `@llodev/bi-dashboard` designs dashboards and charts that
10
+ state one conclusion before the reader checks an axis. `@llodev/bi` installs
11
+ the family. No MCP, no runtime.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 LLDev Information Solutions
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,61 @@
1
- # Temporary Holding Version
1
+ <!-- readme-selector:start -->
2
+ <p align="center">
3
+ <a href="https://github.com/llodev/skills/blob/main/skills/bi-dashboard/README.md"><img src="https://raw.githubusercontent.com/lloliveiradev/public-assets/main/images/usa.svg" width="30" alt="English"></a>&nbsp;&nbsp;
4
+ <a href="https://github.com/llodev/skills/blob/main/skills/bi-dashboard/docs/i18n/README.pt-BR.md"><img src="https://raw.githubusercontent.com/lloliveiradev/public-assets/main/images/brazil.svg" width="30" alt="Português"></a>&nbsp;&nbsp;
5
+ <a href="https://github.com/llodev/skills/blob/main/skills/bi-dashboard/docs/i18n/README.es-ES.md"><img src="https://raw.githubusercontent.com/lloliveiradev/public-assets/main/images/spain.svg" width="30" alt="Español"></a>
6
+ </p>
7
+ <!-- readme-selector:end -->
2
8
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
9
+ # @llodev/bi-dashboard
10
+
11
+ > Design dashboards and charts that state one conclusion before the reader checks an axis.
12
+
13
+ [![npm](https://img.shields.io/npm/v/@llodev/bi-dashboard?label=npm&color=cb3837&logo=npm)](https://www.npmjs.com/package/@llodev/bi-dashboard)
14
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
15
+ [![Node.js >= 24](https://img.shields.io/badge/node-%3E%3D24-43853d?logo=node.js&logoColor=white)](https://nodejs.org)
16
+ [![Agent Skills spec](https://img.shields.io/badge/Agent_Skills-spec-7c5cff)](https://agentskills.io)
17
+
18
+ Part of the `@llodev/bi` family.
19
+
20
+ ## Install
21
+
22
+ ```bash
23
+ # npm (with skillpm or Claude Code marketplace)
24
+ npm i @llodev/bi-dashboard
25
+
26
+ # Vercel CLI
27
+ npx skills add llodev/skills/skills/bi-dashboard
28
+ ```
29
+
30
+ No MCP, no config, no init — it's a pure knowledge skill. Once installed it activates on prompts like the ones below.
31
+
32
+ ## Use
33
+
34
+ | Prompt example | What the agent does |
35
+ | ---------------------------------------- | ------------------------------------------------------------------------- |
36
+ | `"build the revenue dashboard"` | Explores the project, computes one ChartStory per chart, then implements |
37
+ | `"review this dashboard"` | Runs exploration and the final checklist, then proposes prioritized edits |
38
+ | `"this chart title just names the axis"` | Rewrites the title as the conclusion and annotates the highlight |
39
+
40
+ ## Contents
41
+
42
+ | File | Content |
43
+ | ------------------------------ | -------------------------------------------------------------------------- |
44
+ | `SKILL.md` | Phase order, the four chart rules, and when to read each file. |
45
+ | `references/explore.md` | Stack discovery and the token-role map. |
46
+ | `references/story.md` | `ChartStory`, story functions, locale formatting, titles, SQL. |
47
+ | `references/form.md` | Which mark answers which question. |
48
+ | `references/layout.md` | Page hierarchy, KPI card, states, accessibility. |
49
+ | `references/capability-map.md` | The five capabilities, and which library to add when the project has none. |
50
+ | `references/react-recharts.md` | Recharts / shadcn recipe. |
51
+ | `references/echarts.md` | ECharts recipe. |
52
+ | `references/vega-lite.md` | Vega-Lite / Altair recipe. |
53
+ | `references/python.md` | Plotly and matplotlib recipe. |
54
+ | `references/ggplot2.md` | ggplot2 recipe. |
55
+ | `references/bi-tools.md` | Power BI, Looker Studio, Metabase, Superset, Grafana. |
56
+ | `anti-patterns/charts.md` | Titles, color, grid, and untested story logic. |
57
+ | `references/verify.md` | Render, number check, and the final checklist. |
58
+
59
+ ## License
60
+
61
+ MIT — see [LICENSE](LICENSE).
package/SKILL.md ADDED
@@ -0,0 +1,201 @@
1
+ ---
2
+ name: bi-dashboard
3
+ description: >-
4
+ Designs dashboards, charts, and KPI cards that state one conclusion in
5
+ seconds: a conclusion title, a single highlight, and the explanation
6
+ written on the mark. Use when creating, refactoring, or reviewing
7
+ dashboards and charts in any stack — React and shadcn, Recharts, ECharts,
8
+ Vega-Lite, Altair, Plotly, matplotlib, ggplot2, SQL, Power BI, Looker
9
+ Studio, Metabase, Superset, or Grafana. Discover the project design
10
+ system before picking a color. Triggers include dashboard, chart, KPI,
11
+ gráfico, storytelling, conclusion title, annotation, and BI.
12
+ license: MIT
13
+ metadata:
14
+ version: 0.1.0
15
+ tags:
16
+ - agent-skill
17
+ - bi
18
+ - dashboard
19
+ - chart
20
+ family: bi
21
+ role: skill
22
+ compatibility:
23
+ agents:
24
+ - claude-code
25
+ - cursor
26
+ - codex
27
+ - windsurf
28
+ - cline
29
+ - roo-code
30
+ ---
31
+
32
+ # Dashboards that explain themselves
33
+
34
+ This skill guides the design and implementation of dashboards and charts that communicate **one conclusion in seconds**. The quality bar is: a glance reads the title, sees the highlight, and understands the message before reading a single axis.
35
+
36
+ It applies to any project and stack. The visual (colors, fonts, radii, light/dark theme, components) **is not fixed**: it comes from the project's design system, discovered during exploration, or from the direction of whoever invoked the skill. What is fixed are the communication principles and the process.
37
+
38
+ ## How to use this skill
39
+
40
+ Follow the phases in order. Do not skip exploration or the story calculation.
41
+
42
+ | Phase | Output | Read |
43
+ | ---------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
44
+ | 0. Project exploration | Technical context + token map | [`references/explore.md`](references/explore.md) |
45
+ | 1. Brief | Question, audience, decisions, metrics | this file |
46
+ | 2. Story calculation | Verified numbers and one `ChartStory` per chart | [`references/story.md`](references/story.md) |
47
+ | 3. Design | Form of each chart + page layout | [`references/form.md`](references/form.md), then [`references/layout.md`](references/layout.md) when the page has more than one chart |
48
+ | 4. Implementation | Code in the project's pattern | one stack recipe |
49
+ | 5. Verification | Real render + tests + checklist | [`references/verify.md`](references/verify.md) |
50
+
51
+ If the user asks for only one chart, the phases shrink, but they stay in the same order. If they ask for a review of an existing dashboard, read `references/explore.md`, `references/verify.md`, and `anti-patterns/charts.md`, then propose prioritized changes. Do not load a stack recipe for a review that does not ask for an implementation.
52
+
53
+ ## Phase 0 — Explore the project
54
+
55
+ **MANDATORY — READ ENTIRE FILE**: [`references/explore.md`](references/explore.md).
56
+
57
+ **Do NOT load** a stack recipe during exploration.
58
+
59
+ Precedence, copied from that file so it is in force before the read returns: **explicit user direction > the project's design system > libraries/patterns already used in the project > this skill's patterns.**
60
+
61
+ ## Phase 1 — Brief
62
+
63
+ Answer before choosing charts:
64
+
65
+ 1. **What decision or question** does the dashboard support? (e.g. "was the November campaign worth the investment?")
66
+ 2. **Who reads it** and how often? (weekly leadership, real-time operations, end customer)
67
+ 3. **Which metrics** answer the question, with an exact definition (formula, filter, time zone, currency).
68
+ 4. **What is the comparison baseline** for each metric (period median, target, same period last year, peer average).
69
+ 5. **Granularity and period** (day/week/month; last 12 months; closed year).
70
+ 6. **Required interactions** (filters, drill-down, export) — only those that change a decision.
71
+
72
+ A dashboard answers **one main question**. Different questions become different pages or tabs.
73
+
74
+ ## Phase 2 — Compute the story
75
+
76
+ **MANDATORY — READ ENTIRE FILE**: [`references/story.md`](references/story.md) before writing a title, an annotation, or a SQL query.
77
+
78
+ **MANDATORY — READ ENTIRE FILE**: [`anti-patterns/charts.md`](anti-patterns/charts.md) before writing a title or an annotation.
79
+
80
+ **Do NOT load** a stack recipe until the `ChartStory` values exist.
81
+
82
+ ## The four rules of every chart
83
+
84
+ ### Rule 1 — The title is the conclusion
85
+
86
+ | Descriptive (avoid) | Conclusion (use) |
87
+ | ------------------- | ----------------------------------------------------- |
88
+ | Daily sales | Black Friday sold 5 times more than a normal day |
89
+ | Monthly sales | March sold 51% above a normal month |
90
+ | Revenue by channel | The app tripled and accounted for 84% of the growth |
91
+ | Users by plan | Pro grew 5.7 times and passed Basic in week 26 |
92
+ | Costs by category | Payroll consumes 42% of everything the company spends |
93
+
94
+ Three text layers, left-aligned on the same margin:
95
+
96
+ 1. **Title** — the conclusion, 1–2 lines, strong weight.
97
+ 2. **Subtitle** — what is measured + how to read it: "Daily sales in 2025 · each bar is one day"; "Costs by category · each square = 1% of the R$ 3 mi total".
98
+ 3. **Footer** — source and notes, small, discreet.
99
+
100
+ ### Rule 2 — Color leads the eye
101
+
102
+ - Everything that is context goes in `context` (gray). The title's protagonist goes in `highlight`.
103
+ - **One** protagonist per chart. A second highlight is allowed only for the case in Decisions; otherwise split the chart.
104
+ - The highlight is consistent: the bar, the category label, the annotated value, and (optionally) the title keyword use the same color.
105
+ - The same entity has the same color across the whole dashboard.
106
+ - Never one color per series "just because". Many series: all of them thin in `context`, the protagonist in `highlight` with a direct label.
107
+ - Semantic colors (`positive`/`negative`) only for unambiguous good/bad, always with a sign or text alongside.
108
+
109
+ ### Rule 3 — Remove what does not help the reader
110
+
111
+ - No background grid. At most the zero line or a reference line that means something.
112
+ - Hide the Y axis when the key values are annotated; keep it when the reader needs to read arbitrary values (operations, analysis).
113
+ - Minimal ticks: abbreviated months instead of full dates; few values on the axis when it exists.
114
+ - No legend when you can label directly; a long legend is a sign to redesign.
115
+ - No 3D, gradients, heavy shadows, borders on every element, markers on every point.
116
+ - **The form can be noise too**: a noisy daily series as a line becomes a scribble; thin bars (one per day) show each day's volume and make the peak pop. Change the form when it does not answer the question ([`references/form.md`](references/form.md)).
117
+
118
+ ### Rule 4 — Write the explanation on the chart
119
+
120
+ - An important value **beside** the important point, in `highlight-text`: a large value (`R$ 78,4 MIL`) + one line of context (`28 nov · 5 times a normal day`).
121
+ - A reference line labeled on the line itself: `normal day (median) · R$ 15,4 mil` — that is what gives meaning to the "5 times".
122
+ - A direct label at the end of the lines (`Pro 8.550`), values on the bars when there are ≤ 12 categories.
123
+ - Annotate crossings and events at the exact point (`week 26 · Pro passes Basic`).
124
+ - Annotations of ≤ 2 lines, close to the element, without covering data.
125
+
126
+ ## Decisions
127
+
128
+ Refuse a second highlight unless the conclusion names two subjects the reader must compare in one glance: a crossing, or a before/after pair. A second "also important" series is another chart. If the title needs a second finding, split it.
129
+
130
+ When a filter can change a number, entity, rank, or comparison cited in the title, subtitle, highlight, or annotation, recompute all four from the filtered slice before render. An empty slice replaces the title with the empty-state sentence. Never leave the unfiltered conclusion on screen.
131
+
132
+ ## Phase 3 — Design
133
+
134
+ **MANDATORY — READ ENTIRE FILE**: [`references/form.md`](references/form.md) before choosing a mark.
135
+
136
+ Read [`references/layout.md`](references/layout.md) entire when the page has a KPI row or more than one chart.
137
+
138
+ **Do NOT load** `references/layout.md` for a single chart with no page around it.
139
+
140
+ ## Phase 4 — Implement in the project
141
+
142
+ Every recipe implements the same story: daily bars in `context`, the peak in `highlight`, a labeled dashed median, an annotation beside the peak, no grid and no Y axis. Adapt the names and the tokens to the project.
143
+
144
+ 1. **Data layer**: a query/endpoint that already returns the complete series (no gaps), at the right granularity, aggregated in the database when the volume is large.
145
+ 2. **Story layer**: pure functions ([`references/story.md`](references/story.md)) that produce the `ChartStory`. They stay testable and reusable (e.g. `lib/chart-story.ts`, `analytics/story.py`).
146
+ 3. **Visual layer**: components that receive `data` + `story` + formatters and only draw. No business rule inside the component.
147
+ 4. **Tokens**: components read the roles ([`references/explore.md`](references/explore.md)) through CSS variables, the library theme, or project constants — never a loose hex in the component.
148
+ 5. **Composition**: build the page with the existing layout components (grid, card, filters).
149
+ 6. **Tests**: test the story functions (peak, median, crossing, title with fallback) with edge cases (empty series, zero baseline, tie, filter with no data).
150
+
151
+ Typical structure in a React app:
152
+
153
+ ```
154
+ lib/chart-story.ts ← median, peakVsBaseline, shares, growth, firstCrossing, makeFormat, titles
155
+ components/charts/peak-bars.tsx
156
+ components/charts/highlight-line.tsx
157
+ components/charts/ranked-bars.tsx
158
+ components/dashboard/kpi-card.tsx
159
+ app/(dashboard)/sales/page.tsx
160
+ ```
161
+
162
+ **MANDATORY**: read [`references/capability-map.md`](references/capability-map.md) entire when the project has no chart library, or when the library is not one of the recipes below.
163
+
164
+ **MANDATORY**: read exactly one recipe, the library the project already uses.
165
+
166
+ | Signal | Read |
167
+ | ------------------------------------------------------- | -------------------------------------------------------------- |
168
+ | React, shadcn/ui, or Recharts | [`references/react-recharts.md`](references/react-recharts.md) |
169
+ | ECharts | [`references/echarts.md`](references/echarts.md) |
170
+ | Vega-Lite or Altair | [`references/vega-lite.md`](references/vega-lite.md) |
171
+ | Plotly, matplotlib, Streamlit, or Dash | [`references/python.md`](references/python.md) |
172
+ | ggplot2 or R | [`references/ggplot2.md`](references/ggplot2.md) |
173
+ | Power BI, Looker Studio, Metabase, Superset, or Grafana | [`references/bi-tools.md`](references/bi-tools.md) |
174
+
175
+ **Do NOT load** the other recipes for the same chart.
176
+
177
+ ## Phase 5 — Verify
178
+
179
+ **MANDATORY — READ ENTIRE FILE**: [`references/verify.md`](references/verify.md).
180
+
181
+ ## Before a chart title, and before handing off a review
182
+
183
+ **MANDATORY — read [`anti-patterns/charts.md`](anti-patterns/charts.md) entire.**
184
+
185
+ ## References
186
+
187
+ | File | Load when |
188
+ | ------------------------------ | ---------------------------------------------------- |
189
+ | `references/explore.md` | Phase 0, and any review |
190
+ | `references/story.md` | Phase 2, before any title or annotation |
191
+ | `references/form.md` | Choosing a mark |
192
+ | `references/layout.md` | A page with more than one chart or a KPI row |
193
+ | `references/verify.md` | Phase 5, and any review |
194
+ | `references/capability-map.md` | No chart library yet, or a library with no recipe |
195
+ | `references/react-recharts.md` | React / shadcn / Recharts |
196
+ | `references/echarts.md` | ECharts |
197
+ | `references/vega-lite.md` | Vega-Lite or Altair |
198
+ | `references/python.md` | Plotly, matplotlib, Streamlit, Dash |
199
+ | `references/ggplot2.md` | ggplot2 or R |
200
+ | `references/bi-tools.md` | Power BI, Looker Studio, Metabase, Superset, Grafana |
201
+ | `anti-patterns/charts.md` | Before a title, and before a review handoff |
@@ -0,0 +1,14 @@
1
+ ## 12. Anti-patterns
2
+
3
+ NEVER ship these. Each one looks finished and still makes the chart lie or go unread.
4
+
5
+ - NEVER use a generic title ("Chart Title", "Daily sales") or one that only repeats the axes. The title is also the accessible name. A reader trained by restated axes stops reading titles, so the conclusion on the next chart is skipped, and a screen-reader user never hears the finding.
6
+ - NEVER use the library's default palette, a rainbow, or one color per series for no reason. Default categorical palettes put red beside green, so a region is decoded as good or bad. Neighboring hues also collapse under deuteranopia, and the series you meant as the protagonist is not the one that remains distinct.
7
+ - NEVER draw a spaghetti chart with no protagonist, or a long legend far from the marks. Matching a legend swatch back to a thin line is a second fixation. Once hues sit next to each other, that saccade lands on the wrong series and the argument proceeds about the wrong trend. Labels on all twelve lines collide; one highlighted series is the fix.
8
+ - NEVER keep a heavy grid, an axis with dozens of ticks, or full dates on every tick. A grid at the same stroke width as the series creates crossings that read as data points. A full date on every tick is a unique string, so the eye cannot group month starts, and the date in the annotation stops being the only date on the chart.
9
+ - NEVER use a line for a noisy daily series when the question is "which day was different". A line asserts a slope. Tuesday-to-Wednesday is the difference of two noisy totals, not a rate anyone should act on. The peak is then a vertex with no area, so "how much bigger than normal" is harder to see than a bar against the median bar.
10
+ - NEVER show a KPI with no comparison baseline, or red/green with no sign or text. A bare total invites a baseline from memory, and that memory is the wrong period. Color without a sign dies in a screenshot or a chat paste. Red is also unstable across one KPI row: up is bad for cost and not bad for revenue.
11
+ - NEVER put a border and a shadow on every card and every chart, and never use 3D or decorative gradients. People judge a bar's height by its darker edge, so a shadow adds phantom height. Perspective shrinks the back of a 3D chart, and a smaller category drawn behind a larger one can look bigger. A border on every card is a common-region cue, so twelve cards read as twelve unrelated facts.
12
+ - NEVER hardcode colors that ignore the design system, and never ship a broken dark theme. The failure is not "off brand." A hex that cleared 4.5:1 on white drops under 3:1, or matches the context gray, once the surface flips dark, so the protagonist stops popping for the theme you did not open. A second chart that picks its own orange also splits one entity into two.
13
+ - NEVER leave a fixed title that a filter makes false. The title is believed first and checked never. Bars that move feel like the page updated, which makes the stale sentence more trusted, not less. An empty slice is the sharp case: the marks disappear and the title still reports the peak.
14
+ - NEVER hide business logic (median, peak, titles) inside the visual component, untested. The query title and the component median disagree on zeros, nulls, gap-fill, and filter context, so the annotation names a different day than the title. Logic that lives only in the render path never gets imported by a unit test, and the honest fallback ships unexecuted.
@@ -0,0 +1,61 @@
1
+ <!-- readme-selector:start -->
2
+ <p align="center">
3
+ <a href="https://github.com/llodev/skills/blob/main/skills/bi-dashboard/README.md"><img src="https://raw.githubusercontent.com/lloliveiradev/public-assets/main/images/usa.svg" width="30" alt="English"></a>&nbsp;&nbsp;
4
+ <a href="https://github.com/llodev/skills/blob/main/skills/bi-dashboard/docs/i18n/README.pt-BR.md"><img src="https://raw.githubusercontent.com/lloliveiradev/public-assets/main/images/brazil.svg" width="30" alt="Português"></a>&nbsp;&nbsp;
5
+ <a href="https://github.com/llodev/skills/blob/main/skills/bi-dashboard/docs/i18n/README.es-ES.md"><img src="https://raw.githubusercontent.com/lloliveiradev/public-assets/main/images/spain.svg" width="30" alt="Español"></a>
6
+ </p>
7
+ <!-- readme-selector:end -->
8
+
9
+ # @llodev/bi-dashboard
10
+
11
+ > Diseña dashboards y gráficos que afirman una conclusión antes de que el lector consulte un eje.
12
+
13
+ [![npm](https://img.shields.io/npm/v/@llodev/bi-dashboard?label=npm&color=cb3837&logo=npm)](https://www.npmjs.com/package/@llodev/bi-dashboard)
14
+ [![Licencia: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](../../LICENSE)
15
+ [![Node.js >= 24](https://img.shields.io/badge/node-%3E%3D24-43853d?logo=node.js&logoColor=white)](https://nodejs.org)
16
+ [![Agent Skills spec](https://img.shields.io/badge/Agent_Skills-spec-7c5cff)](https://agentskills.io)
17
+
18
+ Parte de la familia `@llodev/bi`.
19
+
20
+ ## Instalación
21
+
22
+ ```bash
23
+ # npm (con skillpm o el marketplace de Claude Code)
24
+ npm i @llodev/bi-dashboard
25
+
26
+ # Vercel CLI
27
+ npx skills add llodev/skills/skills/bi-dashboard
28
+ ```
29
+
30
+ Sin MCP, sin configuración, sin init — es una skill de conocimiento puro. Tras instalarla, se activa con prompts como los de abajo.
31
+
32
+ ## Uso
33
+
34
+ | Ejemplo de prompt | Qué hace el agente |
35
+ | ---------------------------------------- | --------------------------------------------------------------------------- |
36
+ | `"build the revenue dashboard"` | Explora el proyecto, calcula un ChartStory por gráfico y luego implementa |
37
+ | `"review this dashboard"` | Ejecuta la exploración y el checklist final y propone ediciones priorizadas |
38
+ | `"this chart title just names the axis"` | Reescribe el título como la conclusión y anota el destacado |
39
+
40
+ ## Contenido
41
+
42
+ | Archivo | Contenido |
43
+ | ------------------------------ | ---------------------------------------------------------------------------------- |
44
+ | `SKILL.md` | Orden de las fases, las cuatro reglas de gráfico y cuándo leer cada archivo. |
45
+ | `references/explore.md` | Descubrimiento del stack y el mapa de roles de los tokens. |
46
+ | `references/story.md` | `ChartStory`, funciones de la historia, formato de locale, títulos, SQL. |
47
+ | `references/form.md` | Qué marca responde a qué pregunta. |
48
+ | `references/layout.md` | Jerarquía de la página, tarjeta de KPI, estados, accesibilidad. |
49
+ | `references/capability-map.md` | Las cinco capacidades y qué biblioteca añadir cuando el proyecto no tiene ninguna. |
50
+ | `references/react-recharts.md` | Receta de Recharts / shadcn. |
51
+ | `references/echarts.md` | Receta de ECharts. |
52
+ | `references/vega-lite.md` | Receta de Vega-Lite / Altair. |
53
+ | `references/python.md` | Receta de Plotly y matplotlib. |
54
+ | `references/ggplot2.md` | Receta de ggplot2. |
55
+ | `references/bi-tools.md` | Power BI, Looker Studio, Metabase, Superset, Grafana. |
56
+ | `anti-patterns/charts.md` | Títulos, color, cuadrícula y lógica de historia sin pruebas. |
57
+ | `references/verify.md` | Renderizado, comprobación de números y el checklist final. |
58
+
59
+ ## Licencia
60
+
61
+ MIT — consulta [LICENSE](../../LICENSE).
@@ -0,0 +1,61 @@
1
+ <!-- readme-selector:start -->
2
+ <p align="center">
3
+ <a href="https://github.com/llodev/skills/blob/main/skills/bi-dashboard/README.md"><img src="https://raw.githubusercontent.com/lloliveiradev/public-assets/main/images/usa.svg" width="30" alt="English"></a>&nbsp;&nbsp;
4
+ <a href="https://github.com/llodev/skills/blob/main/skills/bi-dashboard/docs/i18n/README.pt-BR.md"><img src="https://raw.githubusercontent.com/lloliveiradev/public-assets/main/images/brazil.svg" width="30" alt="Português"></a>&nbsp;&nbsp;
5
+ <a href="https://github.com/llodev/skills/blob/main/skills/bi-dashboard/docs/i18n/README.es-ES.md"><img src="https://raw.githubusercontent.com/lloliveiradev/public-assets/main/images/spain.svg" width="30" alt="Español"></a>
6
+ </p>
7
+ <!-- readme-selector:end -->
8
+
9
+ # @llodev/bi-dashboard
10
+
11
+ > Projete dashboards e gráficos que afirmam uma conclusão antes de o leitor conferir um eixo.
12
+
13
+ [![npm](https://img.shields.io/npm/v/@llodev/bi-dashboard?label=npm&color=cb3837&logo=npm)](https://www.npmjs.com/package/@llodev/bi-dashboard)
14
+ [![Licença: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](../../LICENSE)
15
+ [![Node.js >= 24](https://img.shields.io/badge/node-%3E%3D24-43853d?logo=node.js&logoColor=white)](https://nodejs.org)
16
+ [![Agent Skills spec](https://img.shields.io/badge/Agent_Skills-spec-7c5cff)](https://agentskills.io)
17
+
18
+ Parte da família `@llodev/bi`.
19
+
20
+ ## Instalação
21
+
22
+ ```bash
23
+ # npm (com skillpm ou marketplace do Claude Code)
24
+ npm i @llodev/bi-dashboard
25
+
26
+ # Vercel CLI
27
+ npx skills add llodev/skills/skills/bi-dashboard
28
+ ```
29
+
30
+ Sem MCP, sem config, sem init — é uma skill de conhecimento puro. Após instalar, ela é ativada por prompts como os abaixo.
31
+
32
+ ## Uso
33
+
34
+ | Exemplo de prompt | O que o agente faz |
35
+ | ---------------------------------------- | ----------------------------------------------------------------------- |
36
+ | `"build the revenue dashboard"` | Explora o projeto, calcula um ChartStory por gráfico e então implementa |
37
+ | `"review this dashboard"` | Roda a exploração e o checklist final e propõe edições priorizadas |
38
+ | `"this chart title just names the axis"` | Reescreve o título como a conclusão e anota o destaque |
39
+
40
+ ## Conteúdo
41
+
42
+ | Arquivo | Conteúdo |
43
+ | ------------------------------ | ---------------------------------------------------------------------------------- |
44
+ | `SKILL.md` | Ordem das fases, as quatro regras de gráfico e quando ler cada arquivo. |
45
+ | `references/explore.md` | Descoberta da stack e o mapa de papéis dos tokens. |
46
+ | `references/story.md` | `ChartStory`, funções da história, formatação de locale, títulos, SQL. |
47
+ | `references/form.md` | Qual marca responde a qual pergunta. |
48
+ | `references/layout.md` | Hierarquia da página, card de KPI, estados, acessibilidade. |
49
+ | `references/capability-map.md` | As cinco capacidades e qual biblioteca adicionar quando o projeto não tem nenhuma. |
50
+ | `references/react-recharts.md` | Receita de Recharts / shadcn. |
51
+ | `references/echarts.md` | Receita de ECharts. |
52
+ | `references/vega-lite.md` | Receita de Vega-Lite / Altair. |
53
+ | `references/python.md` | Receita de Plotly e matplotlib. |
54
+ | `references/ggplot2.md` | Receita de ggplot2. |
55
+ | `references/bi-tools.md` | Power BI, Looker Studio, Metabase, Superset, Grafana. |
56
+ | `anti-patterns/charts.md` | Títulos, cor, grade e lógica de história sem testes. |
57
+ | `references/verify.md` | Renderização, checagem de números e o checklist final. |
58
+
59
+ ## Licença
60
+
61
+ MIT — veja [LICENSE](../../LICENSE).
package/package.json CHANGED
@@ -1,6 +1,34 @@
1
1
  {
2
2
  "name": "@llodev/bi-dashboard",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "description": "Design dashboards and charts that state one conclusion before the reader checks an axis.",
5
+ "license": "MIT",
6
+ "homepage": "https://github.com/llodev/skills/tree/main/skills/bi-dashboard",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/llodev/skills.git",
10
+ "directory": "skills/bi-dashboard"
11
+ },
12
+ "files": [
13
+ "SKILL.md",
14
+ "README.md",
15
+ "LICENSE",
16
+ "CHANGELOG.md",
17
+ "anti-patterns",
18
+ "references",
19
+ "docs"
20
+ ],
21
+ "keywords": [
22
+ "agent-skill",
23
+ "bi",
24
+ "dashboard",
25
+ "chart"
26
+ ],
27
+ "type": "module",
28
+ "publishConfig": {
29
+ "access": "public"
30
+ },
31
+ "engines": {
32
+ "node": ">=24"
33
+ }
6
34
  }
@@ -0,0 +1,34 @@
1
+ ### 9.6 BI tools (Power BI, Looker Studio, Metabase, Superset, Grafana)
2
+
3
+ The same principles, with each tool's native features:
4
+
5
+ - **Dynamic conclusion title**: a measure or calculated field that generates the sentence, bound to the visual title through conditional formatting.
6
+ - **Highlight**: conditional color formatting by rule (is it the maximum? is it the selected category?) with the highlight color and gray for the rest.
7
+ - **Reference line**: a constant or median line from the visual itself or a dedicated measure, with a data label.
8
+ - **Cleanup**: turn off the grid, axis titles, the Y axis, and the legend; data labels only on the highlight.
9
+
10
+ Power BI (DAX) — measures for the title and the color:
11
+
12
+ ```dax
13
+ Daily Median =
14
+ MEDIANX ( ALLSELECTED ( 'Calendar'[Date] ), [Sales] )
15
+
16
+ Daily Peak =
17
+ MAXX ( ALLSELECTED ( 'Calendar'[Date] ), [Sales] )
18
+
19
+ Daily Sales Title =
20
+ VAR factor = DIVIDE ( [Daily Peak], [Daily Median] )
21
+ RETURN
22
+ IF (
23
+ factor >= 1.5,
24
+ "The peak sold " & FORMAT ( factor, "0" ) & " times more than a normal day",
25
+ "Daily sales stayed flat over the period"
26
+ )
27
+
28
+ Sales Bar Color =
29
+ IF ( [Sales] = [Daily Peak], "#E8590C", "#C4C4C4" )
30
+ ```
31
+
32
+ Apply `Daily Sales Title` in _Title → fx_ and `Sales Bar Color` in _Columns → Color → fx (field value)_; replace the hex values with the report theme's. Adjust the `FORMAT` rounding rule to follow [`references/story.md`](story.md) when the factor is not close to an integer.
33
+
34
+ ---
@@ -0,0 +1,17 @@
1
+ ## 9. Recipes by stack
2
+
3
+ Every recipe implements the same story: daily bars in `context`, the peak in `highlight`, a labeled dashed median, an annotation beside the peak, no grid and no Y axis. Adapt the names and the tokens to the project.
4
+
5
+ ### 9.0 Capability map (for any library)
6
+
7
+ Every library has to do five things. If the project's library is not below, look up the equivalent:
8
+
9
+ | Capability | Recharts / shadcn | ECharts | Vega-Lite / Altair | Plotly | matplotlib | ggplot2 | Chart.js | Highcharts |
10
+ | -------------- | -------------------------------------- | ------------------------------------------ | --------------------------- | --------------------------------- | ------------------------------ | ------------------------------------- | ----------------------- | ----------------------- |
11
+ | Color per item | `<Cell fill>` | `itemStyle` per datum | `color` with `condition` | `marker_color` list | `color=` list | `fill` + `scale_fill_manual` | `backgroundColor` array | `point.color` / `zones` |
12
+ | Reference line | `<ReferenceLine>` | `markLine` | `rule` layer | `add_hline` | `axhline` | `geom_hline` | annotation plugin | `plotLines` |
13
+ | Annotated text | `<ReferenceDot label>` / `<LabelList>` | `markPoint.label` | `text` layer | `add_annotation` | `annotate` | `annotate("text")` | annotation plugin | annotations module |
14
+ | Shaded band | `<ReferenceArea>` | `markArea` | `rect` | `add_vrect` | `axvspan` | `annotate("rect")` | annotation plugin (box) | `plotBands` |
15
+ | No grid / axis | omit `<CartesianGrid>`, `<YAxis hide>` | `splitLine.show=false`, `yAxis.show=false` | `axis: null`, `grid: false` | `showgrid=False`, `visible=False` | `spines`, `set_visible(False)` | `theme(panel.grid = element_blank())` | `grid.display=false` | `gridLineWidth: 0` |
16
+
17
+ Choosing a library when the project has none: React + shadcn/ui → **shadcn charts (Recharts)**; web with many points (>10 thousand) or heavy interaction → **ECharts**; a portable spec or notebooks → **Vega-Lite/Altair**; analytical Python → **Plotly** (interactive) or **matplotlib** (static); R → **ggplot2**.