onefile-lint
Checks that an agent-made single-file HTML page is still one portable file: no remote dependencies, a sensible size, print styles and offline use.
- Status
- Live
- Launched
- Licence
- MIT
- Language
- JavaScript
One command, copied from the repo.
Install onefile-lint: npx github:reidifydesign/onefile-lint page.html
reidifydesign/onefile-lint
What it does
It checks that a single-file HTML page, the kind an agent makes, is still one portable file. Portability is what the tool is for, and its rules are remote-dependency, sibling-file, size, offline, print-styles and document-basics. Point it at a file, a folder, a URL, or - for stdin. It exits 0 on a pass, 1 when a page fails and 2 on bad input, so it works in CI and in an agent's own loop. No install, no dependencies, Node 18 or newer.
Two more groups are extras: display (contrast, reduced motion and similar) and robustness (form labels, image alt text, landmarks and similar). They are accessibility-adjacent checks for things agents often get wrong on screen. They are on by default, every one reports at warning level, and --skip display,robustness leaves the portability checks alone. A catalogue lists every rule with its limits and the evidence behind it, graded A to D.
It reads text and does not render the page, so it cannot see URLs that a script builds at run time. Several checks are judgment calls, and warnings do not fail a page unless you pass --strict. It is not a full accessibility audit.
Why it exists
A one-file page stays useful while it stays one file. A CDN script tag, a web font, a relative style.css or a dark theme that prints as white-on-white each break it in a different way, and the agent that wrote it rarely says so. On 30 Sep 2026 a search of GitHub and npm for a linter that checks remote dependencies, offline use and print together did not find one.
Its run on 30 Sep 2026 across 237 single-file pages from Simon Willison's tools repo (github.com/simonw/tools, Apache-2.0), used with thanks, found that 75 (32%) load something from another host, 12 more point at files next to the page, 187 (79%) have no print styles, and 3 pass every rule. These are counts of what a static check can see in one author's pages, not a measure of how agents behave in general, and loading a library from a CDN is often a deliberate choice.