Portaljs check data quality
Audit a local or remote tabular file (CSV/TSV) for common data quality issues — schema, nulls, types, duplicates. Read-only. Use when a dataset needs a quality check before publishing, or a showcase renders wrong (blank cells, garbled numbers, an unsortable date column) and the cause needs isolating.From its SKILL.md
npx -y skills add jeremylongshore/claude-code-plugins-plus-skills --skill portaljs-check-data-qualityAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- runs commandsInstructs the agent to run 1 command, including `bash scripts/check-data-quality.sh ./data/emissions.tsv > /tmp/emissions-quality.json`.
- fetches URLsInstructs the agent to fetch 1 URL, including https://github.com/datopian/portaljs/blob/main/.claude/commands/portaljs-check-data-quality.md.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
5.8 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it
PortalJS — Check Data Quality
Overview
Run a read-only quality audit of one CSV or TSV file, local or remote, and return a
structured JSON report. The audit profiles every column — null/blank counts, inferred
value types, numeric ranges, likely year/date fields — and flags duplicate rows,
duplicate values in identifier-like columns, ambiguous overlapping year columns (e.g.
calendar year vs fiscal year), and mixed-type columns. It never edits the source
file, datasets.json, or any other project file; it only reads the target file (a
remote URL is downloaded to a temp file that is deleted before the run ends) and
prints a report. Use it before publishing a dataset with portaljs-add-dataset, or to
diagnose why a showcase renders wrong.
Prerequisites
python3onPATH— the audit logic runs as an embedded Python script; nothing is installed.- One CSV or TSV file, given as a local path or an
http/httpsURL. Only one file per run.
Instructions
The canonical, full step-by-step workflow is
.claude/commands/portaljs-check-data-quality.md —
the single source of truth. Read and follow it when executing. Summary:
- Gather input — the file path or URL to audit. If missing, ask for it; never dead-end.
- Resolve the source: if it's an
http/httpsURL, download it to a temp file first; otherwise use the local path as given. - Validate the extension is
.csvor.tsv. If not, or the file is missing, or the header row is empty, stop and surface the error JSON as-is — do not guess a fix. - Profile every column: null/blank counts, distinct values, sample values, inferred per-value type (boolean/integer/float/date/string), numeric min/max, and year range for columns whose name looks year-like.
- Derive findings from the profiles — duplicate rows, missing-value ratios, invalid
year values, mixed types, suspect negative values, duplicate identifier values, and
ambiguous overlapping year columns — each tagged
critical,warning, orinfo. - Assemble the JSON report (
status, file metadata,findings,recommendations,column_profiles), print it, and clean up the temp file if one was created. - Relay the report to the user as-is; do not modify the source file,
datasets.json, or any other project file based on the findings — that's a separate, explicit step.
Output
A single JSON object printed to stdout:
status—ok,warning, orcritical.file,file_name,source_type(localorurl),row_count,column_count.findings— structured issues, most severe first.recommendations— de-duplicated suggested next steps.column_profiles— per-column summary (nulls, blanks, distinct count, sample values, inferred types, numeric/year ranges).
No files are created or modified. A remote URL's temp download is removed on exit, success or failure alike.
Error Handling
| Symptom | Cause | Fix |
|---|---|---|
"File ... is not available." | Local path is wrong, or the URL download failed | Verify the path or URL is reachable and retry. |
"Only CSV and TSV files are supported right now." | File extension isn't .csv/.tsv | Convert the file, or point to its tabular source instead. |
"... does not contain tabular headers." | File is empty or the header row is malformed | Open the file and confirm it has a valid, non-empty header line. |
| Command hangs on a URL | Remote host is slow or blocks non-browser requests | Download the file manually and audit the local copy instead. |
python3: command not found | Python 3 isn't installed or not on PATH | Install Python 3, or run the audit where it's available. |
| Report looks truncated in the terminal | Large report wrapped/paginated by the shell | Redirect to a file (> report.json) and open it separately. |
Examples
Example 1 — Audit a local CSV before publishing
/portaljs-check-data-quality ./public/data/trash.csv
Example 2 — Audit a remote CSV over HTTPS
/portaljs-check-data-quality https://example.com/trash.csv
Example 3 — Audit a TSV and save the report for review
bash scripts/check-data-quality.sh ./data/emissions.tsv > /tmp/emissions-quality.json
Example 4 — Read a critical status report
{
"status": "critical",
"findings": [
{ "severity": "critical", "check": "duplicate_rows", "message": "42 duplicate rows found." }
],
"recommendations": ["Review and deduplicate repeated rows if they are not intentional."]
}
Fix the flagged rows/columns, then re-run the audit before publishing.
Resources
- Full workflow:
.claude/commands/portaljs-check-data-quality.md - Detailed check catalog and troubleshooting:
references/reference.md - Related skills:
portaljs-add-dataset,portaljs-define-schema - Python
csvmodule (parsing behavior this audit relies on): https://docs.python.org/3/library/csv.html
What ships with it: 1 file
4.2 KB alongside SKILL.md
references/
- reference.md4.2 KB
Gives 0 of the 12 instructions most quality gates skills give in ~1.3k tokens
Counted across 1,524 of the 2,830 authors here whose files we hold, read 2026-09-06
- Read full output and check exit codein 45 of 1524, across 40 files
- Verify output confirms the claimin 44 of 1524, across 39 files
- Identify the command that proves the claimin 43 of 1524, across 39 files
- Execute the full verification commandin 36 of 1524, across 30 files
- Produce a verification reportin 34 of 1524, across 18 files
- Review git diff changesin 30 of 1524, across 16 files
- Fix build failures immediatelyin 29 of 1524, across 9 files
- Group findings by severityin 28 of 1524
- State claim only with evidencein 27 of 1524, across 22 files
- Verify regression tests with red-green cyclein 26 of 1524, across 22 files
- Run the full test suitein 26 of 1524, across 25 files
- Run test suite with coveragein 25 of 1524, across 10 files
Said here and by no other author read
- Download remote files to a temporary location
- Validate file extension is CSV or TSV
- Stop if file is missing or header is empty
- Profile every column for types and ranges
- Derive findings from column profiles
- Relay the report to the user as-is
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.