portaljs-define-schema

portaljs-define-schema is a skill for Claude Code from datopian/portaljs. It costs 79 tokens per session (1,630 once invoked), scanned A, original, MIT.

A skill for describing a dataset in datasets.json, including its fields, data types, license, sources, and keywords. It uses the Frictionless Data format, a standard way to document tabular data such as CSV files.

In plain words
What is it for?
Use it to infer a table schema from sample data, add metadata, and apply custom validation rules when a dataset needs more than the standard profile.
Why use it?
It turns a registered dataset from a basic listing into a documented dataset with a typed field table and useful catalog information.

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 infer a table schema from sample data, add metadata, and apply custom validation rules when a dataset needs more than the standard profile.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/datopian/portaljs/portaljs-define-schema
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.

Any agent
npx skills add datopian/portaljs --skill portaljs-define-schema
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-define-schema

README.md
[![agentmods](https://agentmods.dev/badge/skills/datopian/portaljs/portaljs-define-schema/github.svg)](https://agentmods.dev/skills/datopian/portaljs/portaljs-define-schema)
Your own site
<a href="https://agentmods.dev/skills/datopian/portaljs/portaljs-define-schema"><img src="https://agentmods.dev/badge/skills/datopian/portaljs/portaljs-define-schema/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-define-schema

Your own site · 80×15
<a href="https://agentmods.dev/skills/datopian/portaljs/portaljs-define-schema"><img src="https://agentmods.dev/badge/skills/datopian/portaljs/portaljs-define-schema.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,630 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: 3 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 Rogue Agent · line 3
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium MCP Rug Pull · line 71
    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 81
    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.00079 $0.01630
Opus 5 $0.00039 $0.00815
Sonnet 5 $0.00016 $0.00326
Haiku 4.5 $0.00008 $0.00163

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

Security

Grade A, and why

portaljs-define-schema 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 9d 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-define-schema/SKILL.md · 126 lines

How it starts

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

PortalJS — Define Schema

Overview

Define a dataset's metadata profile — the authoring skill for the metadata-profile contract (lib/metadata). Where portaljs-add-dataset registers that a dataset exists, this skill describes what its data means: infer a Frictionless Table Schema (fields, types, constraints) from sampled data, add the Data Package fields a catalog surfaces (title, licenses, sources, keywords), and write them onto the dataset's entry in datasets.json. The showcase at /@<namespace>/<slug> then renders a typed field table instead of a bare preview. The model is Frictionless-native; DCAT is a serialization layer built on top later, not authored here.

The skill runs on a profile ladder — reach for higher levels only when needed:

Level What it is When
L0 Default frictionless-tabular profile; declare schema + metadata. Default. Standard tabular CSV/TSV.
L1 L0 plus extra descriptive package fields. Extra metadata, standard validation is fine.
L2 Fully custom profile (own schema template + validate()). A dataset type needing custom validation rules.
L3 Multiple registered profiles, resolved per dataset. A portal mixing dataset types.

The skill is interactive and never dead-ends: if input is thin it interviews in short rounds, infers defaults from the data, echoes the schema for confirmation, and accepts "use defaults" to proceed with the inferred schema as-is.

Prerequisites

  • A scaffolded PortalJS portal with the metadata contract (lib/metadata/types.ts, pages/[owner]/[slug].tsx); see portaljs-new-portal.
  • The target dataset already registered in datasets.json (see portaljs-add-dataset).
  • For tabular schema inference, the dataset's CSV/TSV file present under PORTAL_DIR/public/data/. JSON/GeoJSON datasets get package metadata only — no fields.
  • Node 18+; tsx optional, used for the schema-validation check.

Instructions

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

Read the full file on GitHub · 126 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. 9d ago First seen · 126 lines · 79 tokens per session scan A f2c5686b8cd4

Subscribe to this mod's changes

portaljs-define-schema is a skill published in the GitHub repository datopian/portaljs (2,349 stars, last pushed yesterday), licensed MIT. It adds 79 tokens to every session and 1,630 once invoked, about $0.0004 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

test-review

You are an expert DataHub test reviewer. Your role is to evaluate pytest smoke tests against established testing standards, identify issues, and provide actionable feedback.

datahub-project/datahub · 0 tokens

varlock

Secure environment variable management with Varlock. Use when handling secrets, API keys, credentials, or any sensitive configuration. Ensures secrets are never exposed in terminal, logs, or LLM context. Provides guidance around integrating varlock into a project, reading/editing .env.schema and other .env files…

dmno-dev/varlock · 109 tokens

rag-knowledge

Work with the RAG knowledge base — ingest documents, run semantic search, manage collections, or add a sync source/connector (Google Drive, S3). Use when populating or debugging the knowledge base, tuning retrieval, or adding a new document source. This project uses {{ cookiecutter.vectorstore }} + {{…

vstorm-co/full-stack-ai-agent-template · 76 tokens

ckan-mcp

MCP server for exploring CKAN-based open data portals (dati.gov.it, data.gov, data.gov.uk, open.canada.ca, demo.ckan.org, and any other CKAN instance). Also covers data.europa.eu via its REST API (not CKAN). Use this skill whenever the user: asks about open data, public datasets, or data portals; mentions a country…

ondata/ckan-mcp-server · 158 tokens

tao-validate-dataset-format

Run tao-daft validate to check NVIDIA TAO DAFT datasets for structure, schema, and cross-reference errors. Do not use for non-DAFT formats. Use when the user asks to validate a DAFT dataset, check DAFT schema, validate a TAO dataset format, or run tao-daft validate.

NVIDIA-TAO/tao-skill-bank · 77 tokens

postgres-semantic-search

PostgreSQL-based semantic and hybrid search with pgvector and ParadeDB. Use when implementing vector search, semantic search, hybrid search, or full-text search in PostgreSQL. Covers pgvector indexing, hybrid FTS/BM25 + RRF, ParadeDB, reranking, halfvec, multilingual search, query translation, and domain evals.…

laguagu/claude-code-nextjs-skills · 228 tokens