Scaffold a new PortalJS data portal from a brief. Copies the canonical template from examples/portaljs-catalog and substitutes project tokens. Use when starting a brand-new data portal project from scratch.
npx skills add https://github.com/datopian/portaljs --skill portaljs-new-portal
Scaffold a production-ready PortalJS data portal from a brief. The skill is
interactive: if the brief is thin it interviews the user in three short rounds
(mapped to the template's three surfaces — Home, Catalog, Showcase), echoes a brief
back for confirmation, then copies examples/portaljs-catalog (locally or via a
remote tiged fetch), substitutes placeholder tokens, sets the namespace mode, seeds
any datasets named in the interview, installs dependencies, and verifies the scaffold
with a type check.
PATH.(the resolver defaults to a remote fetch of the template).
to overwrite one that does).
The canonical, full step-by-step workflow is
.claude/commands/portaljs-new-portal.md —
the single source of truth. Read and follow it when executing. Summary:
(datasets, namespace mode theme vs owner), Showcase/views — skipping any round
already answered by the input brief. Accept "use defaults" at any point.
building.
tiged fetch ofexamples/portaljs-catalog at main (or PORTALJS_TEMPLATE_REF); use a local
checkout only when it is current (has pages/[owner]/[slug].tsx) and the
destination is outside that repo.
./PROJECT_SLUG, asking first if the destinationalready exists and is non-empty.
__PROJECT_NAME__, __PROJECT_SLUG__, __DESCRIPTION__ tokensacross all files with perl -pi, escaping /, \, and & in the values.
NAMESPACE_TYPE ('theme' or 'owner') in lib/datasets.ts per theinterview.
/portaljs-add-dataset or by hand), orclear datasets.json to [] if none were named.
npm install inside the scaffolded portal.npx tsc --noEmit (never next build here — it would corrupt arunning dev server's .next/ directory).
10. Report the scaffolded routes, namespace mode, and next steps.
./PROJECT_SLUG/ containing the fullexamples/portaljs-catalog template with tokens substituted.
lib/datasets.ts (NAMESPACE_TYPE); datasets.json (seededdatasets or cleared to []).
npx tsc --noEmit passes inside the scaffolded portal../PROJECT_SLUG with Home (/), Catalog(/search), and Showcase (/@<namespace>/<slug>) surfaces wired up.
| Symptom | Cause | Fix |
| --- | --- | --- |
| DIR_EXISTS | ./PROJECT_SLUG already exists and is non-empty | Ask the user for a different name or consent to remove it; then proceed. |
| Remote fetch fails | Bad PORTALJS_TEMPLATE_REF, network outage, or tiged unavailable | Tell the user plainly and ask to retry, use a different ref, or check network. |
| Stale local scaffold (pages/datasets/[slug].tsx) | Old local clone missing pages/[owner]/[slug].tsx | Resolver already falls back to remote in this case — do not force local mode. |
| npm install fails | Node <22 or no network | Report the error and ask the user to check Node version and connectivity. |
| tsc --noEmit fails | Token substitution or manifest error | Print the log and fix before reporting success — never report success with a failing type check. |
/portaljs-new-portal Auckland Open Data Portal — datasets published by several council
departments (multiple publishers). Start with ./data/parks.csv and ./data/budget.csv.
Infers name + description, picks NAMESPACE_TYPE = 'owner', asks for namespace
values (e.g. parks-dept, finance), confirms the brief, scaffolds the template, and
seeds both datasets at /@parks-dept/parks and /@finance/budget.
/portaljs-new-portal
Runs all three interview rounds from scratch, accepting "use defaults" for any round,
then confirms the brief before scaffolding.
/portaljs-new-portal Reference Data Hub — a single-team reference catalog, no data yet.
Picks NAMESPACE_TYPE = 'theme' with namespace reference, clears datasets.json to
[], and reports /portaljs-add-dataset as the next step.
.claude/commands/portaljs-new-portal.mdreferences/reference.mdportaljs-add-dataset, portaljs-add-chart, portaljs-add-map, portaljs-connect-ckanGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take datopian/portaljs-new-portal from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npm, npx.
Without those the skill loads but fails at the first command.