portaljs-add-chart

portaljs-add-chart is a skill for Claude Code from datopian/portaljs. It costs 63 tokens per session (1,104 once invoked), scanned A, original, MIT.

A development procedure for adding a line, bar, area, pie, or scatter chart to a dataset page in a PortalJS data portal. The chart is a reusable component that reads the same public data file as the page’s existing table.

In plain words
What is it for?
Use it to choose a dataset, x and y columns, and chart type, install the chart dependency, create the reusable component, and place the chart in the dataset’s Views section.
Why use it?
It avoids duplicating dataset data and gives a defined way to display selected columns visually. It also checks that the portal and target dataset are already prepared before making the change.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions Claude Code.

Part of the portaljs plugin — 14 skills, 25 commands shipped together

Good fit Use it to choose a dataset, x and y columns, and chart type, install the chart dependency, create the reusable component, and place the chart in the dataset’s Views section.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/datopian/portaljs/portaljs-add-chart
About the project

PortalJS is a framework for building data portals that present searchable datasets through a home page, catalog, and dataset showcase. It is for teams that want to choose a data backend, scaffold a Next.js portal, load CSV or JSON data, connect services such as CKAN, and deploy the result. The catalogue entries are agent commands, skills, instructions, and a plugin that guide portal creation and data loading.

datopian/portaljs · 2,350 stars · on GitHub · portaljs.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add datopian/portaljs --skill portaljs-add-chart
Clone the repo
git clone --depth 1 https://github.com/datopian/portaljs

Made for: Claude Code.

Or install portaljs, the plugin that ships this one along with the rest of its 14 skills, 25 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for portaljs-add-chart

README.md
[![agentmods](https://agentmods.dev/badge/skills/datopian/portaljs/portaljs-add-chart/github.svg)](https://agentmods.dev/skills/datopian/portaljs/portaljs-add-chart)
Your own site
<a href="https://agentmods.dev/skills/datopian/portaljs/portaljs-add-chart"><img src="https://agentmods.dev/badge/skills/datopian/portaljs/portaljs-add-chart/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for portaljs-add-chart

Your own site · 80×15
<a href="https://agentmods.dev/skills/datopian/portaljs/portaljs-add-chart"><img src="https://agentmods.dev/badge/skills/datopian/portaljs/portaljs-add-chart.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,104 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 51
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 59
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00063 $0.01104
Opus 5 $0.00032 $0.00552
Sonnet 5 $0.00013 $0.00221
Haiku 4.5 $0.00006 $0.00110

Measured 10d ago against content hash 1a9c66104c95, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

portaljs-add-chart scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/portaljs-add-chart/SKILL.md · 97 lines

How it starts

The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PortalJS — Add Chart

Overview

Add a visualization to a dataset's showcase in a PortalJS portal. The skill installs recharts (added directly — never @portaljs/components), writes a reusable client-side Chart component into components/, and renders a <Chart /> into the Views section of the showcase route pages/[owner]/[slug].tsx for one chosen dataset. The chart reads the same /public/data/<file> the showcase <Table /> already uses, so no data is duplicated. Five chart types are supported: line, bar, area, pie, and scatter.

Prerequisites

  • A scaffolded PortalJS portal (see portaljs-new-portal).
  • The target dataset already registered in datasets.json (see portaljs-add-dataset).
  • components/ui/parseCsv.ts present (ships with the template).
  • Node 18+ and npm available in the portal directory.

Instructions

The canonical, full step-by-step workflow is .claude/commands/portaljs-add-chart.md — the single source of truth. Read and follow it when executing. Summary:

  1. Gather input — dataset slug, X column, Y column(s), chart type (default line), portal directory. If any is missing, interview the user; never dead-end on a missing value.
  2. Resolve the dataset from datasets.json (namespace, file, format).
  3. Validate that the X and every Y column exist in the data file's header; warn on non-numeric Y columns (values are coerced with Number()).
  4. Install the chart library: npm install recharts@^2.15.0.
  5. Write components/Chart.tsx (idempotent — do not overwrite a customized component).
  6. Render <Chart /> into the Views section, gated on the dataset's (namespace, slug) so other showcases are unaffected. Extend an existing view-dispatch block, do not overwrite.
  7. Verify with npx tsc --noEmit.
  8. Report the component, route, and dependency added.

Output

  • Created: components/Chart.tsx (recharts wrapper, if absent).
  • Modified: pages/[owner]/[slug].tsx (import + gated <Chart /> in Views); package.json (recharts@^2.15.0).
  • Verified: npx tsc --noEmit passes.
  • Result: the chart renders at /@<namespace>/<slug> under a "Views" heading.

Read the full file on GitHub · 97 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 97 lines · 63 tokens per session scan A 1a9c66104c95

Subscribe to this mod's changes

portaljs-add-chart is a skill published in the GitHub repository datopian/portaljs (2,350 stars, last pushed 2d ago), licensed MIT. It adds 63 tokens to every session and 1,104 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

migrate-radix-to-base

Migrates React projects and components from Radix UI to Base UI. Use when asked to migrate from radix, move to base-ui, convert radix primitives, or switch a shadcn project's base library. Handles single components ("migrate accordion") and whole projects.

shadcn-ui/ui · 61 tokens

a2ui-renderer

Render A2UI (Agent-to-UI declarative surfaces) in CopilotKit v2. Enable the runtime via CopilotRuntime({ a2ui: {...} }), then enable the provider via . Auto-activates via /info — do NOT manually pass renderActivityMessages. createA2UIMessageRenderer ships from @copilotkit/react-core/v2; low-level primitives…

CopilotKit/CopilotKit · 175 tokens

copilotkit-develop

Use when building AI-powered features with CopilotKit v2 -- adding chat interfaces, registering frontend tools, sharing application context with agents, handling agent interrupts, and working with the CopilotKit runtime.

CopilotKit/CopilotKit · 46 tokens

copilotkit-integrations

Use when wiring an external agent framework (LangGraph, CrewAI, PydanticAI, Mastra, ADK, LlamaIndex, Agno, Strands, Microsoft Agent Framework, or others) into a CopilotKit application via the AG-UI protocol.

CopilotKit/CopilotKit · 61 tokens

copilotkit-upgrade

Use when migrating a CopilotKit v1 application to v2 -- updating package imports, replacing deprecated hooks and components, switching from GraphQL runtime to AG-UI protocol runtime, and resolving breaking API changes.

CopilotKit/CopilotKit · 48 tokens

copilotkit-debug

Use when diagnosing CopilotKit issues -- runtime connectivity failures, agent not responding, streaming errors, tool execution problems, transcription failures, version mismatches, and AG-UI event tracing.

CopilotKit/CopilotKit · 42 tokens