notes · 2026-09-11
One validator, three interfaces
How this portfolio’s content check became a runnable demo and a reusable agent skill.
This portfolio keeps published articles and notes in separate English and Portuguese files. Slugs must match across languages even when titles differ. A missing counterpart is easy to overlook while reviewing a single page.
The original check lived inside a repository script. Its rules were extracted into a pure JavaScript function: it accepts data and returns a report, without reading files, modifying input, or depending on React. The same function now serves the check:content command, the browser demo, and the CLI distributed with the skill.
The demo uses fictional data and includes an example with a missing translation. The CLI returns exit code 1 for that example and 0 for the complete example. Malformed JSON or a missing file produces exit code 2. These outcomes can be reproduced using the package in Skills & Tools.
The skill adds guidance that the validator cannot decide: separating drafts from publications, preparing an export, and interpreting findings. Passing the check does not establish factual accuracy, translation quality, or working links. Those reviews remain separate.