portaljs CLAUDE.md

portaljs CLAUDE.md is an instructions file for coding agents from datopian/portaljs. It costs 2,466 tokens per session, scanned A, original, MIT.

Repository instructions for PortalJS, a Next.js framework for building data portals and catalogues. They explain its three main screens: a home page, a dataset search page, and an individual dataset page.

In plain words
What is it for?
Use them when building or modifying dataset portals, catalogue search, dataset detail pages, tables, charts, maps, downloads, or data connections.
Why use it?
They show an AI assistant how the repository represents datasets, searches them, displays previews, and organizes its packages and examples.

Instructions file

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.

agentmods
npx agentmods add instructions/datopian/portaljs/claude-md
Clone the repo
git clone --depth 1 https://github.com/datopian/portaljs

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 CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/datopian/portaljs/claude-md.svg)](https://agentmods.dev/instructions/datopian/portaljs/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/datopian/portaljs/claude-md"><img src="https://agentmods.dev/badge/instructions/datopian/portaljs/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,466 This file is loaded in full into every session.
When invoked 2,466 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.02466 $0.02466
Opus 5 $0.01233 $0.01233
Sonnet 5 $0.00493 $0.00493
Haiku 4.5 $0.00247 $0.00247

Measured 4d ago against content hash c0d9cf9dfa5d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

portaljs CLAUDE.md 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 4d 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.

CLAUDE.md · 228 lines

How it starts

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

PortalJS — AI Development Guide

PortalJS is a Next.js framework for building data portals and catalogs. This file teaches AI assistants the conventions, patterns, and idioms used across this repo.

Core concepts — three surfaces

Every data portal is built from three surfaces. The template and routes map directly onto them; reason in these terms:

  1. Home (/, pages/index.tsx) — what the portal is + a search box that routes to the catalog.
  2. Catalog (/search, pages/search.tsx) — find/browse datasets. Static = full-text filter over datasets.json; scales to a search backend (CKAN/Solr) via /portaljs-connect-ckan.
  3. Showcase (/@<namespace>/<slug>, pages/[owner]/[slug].tsx) — one dataset: metadata, a Table preview, download/API, and a Views slot for charts/maps.

Datasets are @-namespaced so they never collide with content pages. See docs/core-concepts.

Repo structure

packages/
  core/                — layout/UI components (@portaljs/core)
  ckan/                — CKAN catalog UI + React components (@portaljs/ckan)
  ckan-api-client-js/  — pure CKAN API client (@portaljs/ckan-api-client-js)
examples/              — reference implementations (read these before building)
.claude/
  commands/     — Claude Code slash commands (OSS skills)
  datopian/     — Datopian-internal skills (require API keys)
  AUTHORING.md  — how to write new skills

Component selection

The template ships its own lightweight components in components/. Do not add @portaljs/components — it bundles leaflet, vega, ag-grid, and pdf.js into a single non-tree-shakeable bundle and is not kept up to date with the local source.

Need Where
Show tabular data (CSV/TSV/JSON) components/Table.tsx — uses papaparse + @tanstack/react-table
Charts Add a chart library directly (e.g. recharts, victory) — do not use @portaljs/components
Map (GeoJSON) Add react-leaflet + leaflet directly if needed
Page layout, nav Plain Tailwind — no layout package needed
CKAN catalog @portaljs/ckan only if connecting to a CKAN backend

Read the full file on GitHub · 228 lines

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. 4d ago First seen · 228 lines · 2,466 tokens per session scan A c0d9cf9dfa5d

Subscribe to this mod's changes

portaljs CLAUDE.md is an instructions file published in the GitHub repository datopian/portaljs (2,348 stars, last pushed 9d ago), licensed MIT. It adds 2,466 tokens to every session, about $0.0123 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 instructions, from other repositories

core CLAUDE.md

Claude Code instructions for module-federation/core, covering claude task parallelization & development guidelines, core principles, maximum parallelization strategy, universal parallel task patterns and for any codebase task.

module-federation/core · 3,933 tokens

mastra AGENTS.md

AGENTS.md instructions for mastra-ai/mastra: Unless asked, don't inspect reference or modify examples. Use the most-specific AGENTS.md; for package work, read packages/ /AGENTS.md first.

mastra-ai/mastra · 411 tokens

souls-directory CLAUDE.md

Instructions for thedaviddias/souls-directory, covering claude.md — project context for ai assistants, project overview, tech stack, critical rules and database is convex.

thedaviddias/souls-directory · 1,675 tokens

nextarter-tailwind AGENTS.md

AGENTS.md instructions for agustinusnathaniel/nextarter-tailwind, covering next.js: always read docs before coding, ai agent guidance: nextarter-tailwind, 1. mental model for agents, implementation delegation and tooling strategy.

agustinusnathaniel/nextarter-tailwind · 1,839 tokens

agentgram CLAUDE.md

Instructions for agentgram/agentgram, covering claude.md — agentgram development guide, project overview, tech stack, monorepo structure and core architecture patterns.

agentgram/agentgram · 4,467 tokens

catatz AGENTS.md

AGENTS.md instructions for kupzed/catatz, covering catatz - codex operating instructions, origin, source of truth, ecc workflow overlay and design contract.

kupzed/catatz · 2,814 tokens