
PortalJS New Portal
FreeEasily scaffold a new data portal project.
Free · Opens the source repo
What PortalJS New Portal does
PortalJS New Portal is a skill designed for developers looking to quickly scaffold a production-ready data portal using PortalJS. This interactive tool guides users through the process of creating a new portal based on a brief, ensuring that all necessary components are set up correctly from the start. By answering a series of questions about the project's home, catalog, and showcase surfaces, users can define key aspects of their portal, such as its name, description, and the datasets it will include.
The skill works by copying a canonical template from the examples/portaljs-catalog and substituting project-specific tokens. This means that you can start with a clean slate, and the skill will handle the heavy lifting of setting up the directory structure, installing dependencies, and verifying the setup with a type check. It also allows for the seeding of datasets based on user input, making it a versatile tool for a variety of data portal projects.
This skill is particularly useful for developers and designers who are starting new data portal projects and want to ensure they follow best practices from the outset. It streamlines the initial setup process, allowing users to focus on customizing their portal rather than getting bogged down in boilerplate code. The interactive nature of the skill also means that even users with minimal experience can successfully create a functional data portal.
Overall, PortalJS New Portal is a practical solution for anyone looking to kickstart a data portal project, providing a structured approach that saves time and reduces the potential for errors in the initial setup phase.
When to use it
Use this skill when you are beginning a new data portal project and need a structured way to scaffold it quickly.
When not to use it
This skill may not be suitable for existing projects that require significant customization beyond the provided template.
What you can build with it
Starting a New Data Portal
When you want to create a brand-new data portal from scratch, this skill provides a structured approach to get you started.
Interactive Setup for Beginners
If you're new to data portals, the interactive interview process helps guide you through the necessary configurations.
Rapid Prototyping of Data Portals
Use this skill to quickly prototype a data portal, allowing you to iterate on ideas without getting bogged down in setup.
How to install PortalJS New Portal
View source1. Install with the skills CLI
npx skills add jeremylongshore/claude-code-plugins-plus-skills/portaljs-new-portal --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by jeremylongshorePortalJS — New Portal
Overview
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.
Prerequisites
- Node.js >=22 and npm available on
PATH. - Network access, unless a current local checkout of the portaljs repo is available (the resolver defaults to a remote fetch of the template).
- A destination directory name that does not already contain files (or user consent to overwrite one that does).
Instructions
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:
- Interview the user in up to three rounds — Home/basics, Catalog & discovery
(datasets, namespace mode
themevsowner), Showcase/views — skipping any round already answered by the input brief. Accept "use defaults" at any point. - Confirm a short brief (name, slug, description, namespace, datasets, views) before building.
- Resolve the template source: prefer a remote
tigedfetch ofexamples/portaljs-catalogatmain(orPORTALJS_TEMPLATE_REF); use a local checkout only when it is current (haspages/[owner]/[slug].tsx) and the destination is outside that repo. - Materialize the template into
./PROJECT_SLUG, asking first if the destination already exists and is non-empty. - Substitute
__PROJECT_NAME__,__PROJECT_SLUG__,__DESCRIPTION__tokens across all files withperl -pi, escaping/,\, and&in the values. - Set
NAMESPACE_TYPE('theme'or'owner') inlib/datasets.tsper the interview. - Seed datasets captured in Round 2 (via
/portaljs-add-datasetor by hand), or cleardatasets.jsonto[]if none were named. - Run
npm installinside the scaffolded portal. - Verify with
npx tsc --noEmit(nevernext buildhere — it would corrupt a running dev server's.next/directory). - Report the scaffolded routes, namespace mode, and next steps.
Output
- Created: a new directory
./PROJECT_SLUG/containing the fullexamples/portaljs-catalogtemplate with tokens substituted. - Modified:
lib/datasets.ts(NAMESPACE_TYPE);datasets.json(seeded datasets or cleared to[]). - Verified:
npx tsc --noEmitpasses inside the scaffolded portal. - Result: a runnable portal at
./PROJECT_SLUGwith Home (/), Catalog (/search), and Showcase (/@<namespace>/<slug>) surfaces wired up.
Error Handling
| 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. |
Examples
Example 1 — Full brief up front
/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.
Example 2 — No arguments, full interview
/portaljs-new-portal
Runs all three interview rounds from scratch, accepting "use defaults" for any round, then confirms the brief before scaffolding.
Example 3 — Single-publisher portal with no datasets yet
/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.
Resources
- Full workflow:
.claude/commands/portaljs-new-portal.md - Template and token reference:
references/reference.md - Related skills:
portaljs-add-dataset,portaljs-add-chart,portaljs-add-map,portaljs-connect-ckan - PortalJS documentation: https://portaljs.org
Frequently asked questions about PortalJS New Portal
Similar skills
Rhino 3D Scripting
Streamline your Rhinoceros 3D scripting tasks.
MVVM Toolkit
Streamline ViewModel development with source generators.
FreeCAD Scripts
Generate Python scripts for FreeCAD automation and modeling.
Azure Architecture Builder
Design and deploy Azure infrastructure using natural language.
Command Development
Streamline your command creation for Claude Code.
Create Cowork Plugin
Easily build and package plugins through guided sessions.
