portaljs-architect

portaljs-architect is a command for Claude Code from datopian/portaljs. It costs 36 tokens per session (3,295 once invoked), scanned A, original, MIT.

An advisory command that recommends a data-portal architecture based on what you are building, what data you have, and who will use it. A data portal is a site or service for storing, describing, finding, and accessing datasets.

In plain words
What is it for?
Use it to choose storage, catalog, data processing, access control, hosting, and metadata approaches, then hand the recommendation to portal-building commands.
Why use it?
It turns an incomplete project brief into a concrete recommendation before any files or services are created. If important details are missing, it asks short questions and offers sensible defaults.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

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

Good fit Use it to choose storage, catalog, data processing, access control, hosting, and metadata approaches, then hand the recommendation to portal-building commands.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/datopian/portaljs/portaljs-architect
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,349 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.

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-architect

README.md
[![agentmods](https://agentmods.dev/badge/commands/datopian/portaljs/portaljs-architect.svg)](https://agentmods.dev/commands/datopian/portaljs/portaljs-architect)
Your own site
<a href="https://agentmods.dev/commands/datopian/portaljs/portaljs-architect"><img src="https://agentmods.dev/badge/commands/datopian/portaljs/portaljs-architect.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,295 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.
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.00036 $0.03295
Opus 5 $0.00018 $0.01648
Sonnet 5 $0.00007 $0.00659
Haiku 4.5 $0.00004 $0.00330

Measured 8d ago against content hash 4e75c6c28918, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

portaljs-architect 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 8d 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/commands/portaljs-architect.md · 247 lines

How it starts

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

/portaljs-architect

The advisory skill. Before scaffolding anything, it works out what to build: given what you're building, what your data is, and what it's for, it recommends a concrete architecture and then hands off to the build skills (/portaljs-new-portal, /portaljs-add-dataset, /portaljs-connect-ckan, …). It decides; it does not build.

The skill is interactive: if the brief is thin it interviews you in short rounds, echoes an architecture brief for confirmation, and never dead-ends on missing input — every question has a sensible default; say "use defaults" to take them.

See the decision framework and ROADMAP.md for the full model this skill encodes.

What it recommends — six slots

Every recommendation fills six slots. The bold option is the default when nothing pulls you off it.

Slot Options (default in bold)
Storage repo files · Git-LFS + R2 · Parquet on R2 · CKAN datastore / warehouse
Catalog datasets.json · git + Frictionless · DuckLake · backend-native
Compute papaparse preview · DuckDB (Wasm → server) · warehouse engine
Access static (public) · runtime + backend RBAC
Hosting Cloudflare Pages (static) · Cloudflare Workers (runtime) · any static host
Metadata Frictionless profile · extended · custom · multi-profile + DCAT

Opinionated default stack: git + giftless/R2 + Parquet + DuckLake + DuckDB, static on Cloudflare Pages, Frictionless metadata. Storage stays S3-compatible, so R2 is the default but never a hard lock-in.

The two build-time knobs this skill sets

Six slots describe the architecture, but two of them resolve to concrete values the build skills read directly. Name both explicitly in the brief — they are what gets built:

  • Data tier — where a dataset's bytes live: inline | LFS | external. This is the Storage slot made concrete, and it is per-dataset routing /portaljs-add-dataset applies (see its source-then-size matrix):
    • inline — bytes committed to public/data/. A fenced exception only: the template's bundled sample data, or an OSS self-host with no R2 creds. Get-started-fast, zero creds.
    • LFS — bytes stream to Cloudflare R2 via Giftless (Git LFS); a ~134 B pointer stays in git. The default for any data the user adds, regardless of size or format.
    • external — bytes already live at a URL (R2 or 3rd-party); the manifest records the absolute URL and copies nothing (passthrough). Parquet-on-R2 queried in place lives here.
  • Query mode — how the showcase computes over a dataset: the DATA_QUERY constant in lib/datasets.ts, flat | duckdb. This is the Compute slot made concrete, and it is portal-wide:
    • duckdb — load the file into in-browser DuckDB-Wasm and expose a SQL query view (filter/aggregate/join, no server). The template default — every portal ships the SQL editor out of the box. A Parquet resource always renders the query view regardless; duckdb renders it for CSV/TSV too.
    • flat — fetch + preview the file with papaparse. Lightest; a downgrade from the default for a preview-only portal that never needs querying.

Read the full file on GitHub · 247 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. 8d ago First seen · 247 lines · 36 tokens per session scan A 4e75c6c28918

Subscribe to this mod's changes

portaljs-architect is a command published in the GitHub repository datopian/portaljs (2,349 stars, last pushed 4d ago), licensed MIT. It adds 36 tokens to every session and 3,295 once invoked, about $0.0002 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.