Tooluck logoTooluck
SKILL.md

portaljs-add-chart

Agent skill fromdatopian/portaljs

Add a chart (line, bar, area, pie, or scatter) to a dataset's showcase in a PortalJS portal. Installs recharts, writes a reusable Chart component, and renders it in the showcase Views section. Use when visualizing a dataset already registered in datasets.json.

How to install portaljs-add-chart

install portaljs-add-chart
# install the portaljs pack with the skills CLI
npx skills add datopian/portaljs

# or add only this skill to Claude Code: copy the folder

skills/portaljs-add-chart/

# into

~/.claude/skills/portaljs-add-chart/ (all projects)

.claude/skills/portaljs-add-chart/ (one project)

skills/portaljs-add-chart/SKILL.md

MITFull file
1# PortalJS — Add Chart
2
3## Overview
4
5Add a visualization to a dataset's **showcase** in a PortalJS portal. The skill installs
6`recharts` (added directly — never `@portaljs/components`), writes a reusable client-side
7`Chart` component into `components/`, and renders a `<Chart />` into the **Views** section
8of the showcase route `pages/[owner]/[slug].tsx` for one chosen dataset. The chart reads the
9same `/public/data/<file>` the showcase `<Table />` already uses, so no data is duplicated.
10Five chart types are supported: line, bar, area, pie, and scatter.
11
12## Prerequisites
13
14- A scaffolded PortalJS portal (see `portaljs-new-portal`).
15- The target dataset already registered in `datasets.json` (see `portaljs-add-dataset`).
16- `components/ui/parseCsv.ts` present (ships with the template).
17- Node 18+ and npm available in the portal directory.
18
19## Instructions
20
21The canonical, full step-by-step workflow is
22[`.claude/commands/portaljs-add-chart.md`](https://github.com/datopian/portaljs/blob/main/.claude/commands/portaljs-add-chart.md) —
23the single source of truth. Read and follow it when executing. Summary:
24
251. Gather input — dataset slug, X column, Y column(s), chart type (default `line`), portal
26 directory. If any is missing, interview the user; never dead-end on a missing value.
272. Resolve the dataset from `datasets.json` (`namespace`, `file`, `format`).
283. Validate that the X and every Y column exist in the data file's header; warn on
29…

Excerpt shown under the repository's MIT license.

More skills in portaljs

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates