seaworthy-verify
Runs the Seaworthy verify-and-fix loop on a built static site — verify the built output, read the findings by check ID and location, fix the source, re-verify, and stop at the exit-code gate. Use when an agent has just built or changed a website and needs to know what is broken and how to fix it, when the user asks to "verify the site", "run seaworthy", or check a site for broken links, accessibility, or agent-readability problems, or before the agent says a site is done. Do not use it to adopt Seaworthy into CI or to park existing debt; that is a separate skill.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-07
- Stars
- ★ 2
- Forks
- 3
01 前言 Front Matter
- name
- seaworthy-verify
- description
- Runs the Seaworthy verify-and-fix loop on a built static site — verify the built output, read the findings by check ID and location, fix the source, re-verify, and stop at the exit-code gate. Use when an agent has just built or changed a website and needs to know what is broken and how to fix it, when the user asks to "verify the site", "run seaworthy", or check a site for broken links, accessibility, or agent-readability problems, or before the agent says a site is done. Do not use it to adopt Seaworthy into CI or to park existing debt; that is a separate skill.
03 SKILL.md 正文
Seaworthy: the verify-and-fix loop
Seaworthy verifies built output, never source: build first, then point it at the output folder. It reports and suggests; it never edits files. Applying a fix is your move.
The full reference is docs/agent-loop.md — measured timings,
every flag, and what each one costs. This skill is the executable distillation of it:
every command and flag below is what the CLI accepts today.
Setup (pre-alpha: no npm package yet)
Requires Node.js 22+. seaworthy is not published on npm — do not run npm i seaworthy.
Pick one launcher:
- From a built checkout (works today):
git clone https://github.com/arminazimi/seaworthy && cd seaworthy npm ci && npm run build npm link -w @seaworthy/verify # puts `seaworthy` on PATH; or invoke # node packages/verify/dist/src/cli.js directly - Pinned into the site's own repo as a devDependency, installed after the site's
npm ci(a laternpm ciwipes it):npm install --save-dev github:arminazimi/seaworthy#<commit>
Once the npm release lands, the same commands run as npx seaworthy …. Below, seaworthy
means whichever launcher you set up. If a flag is rejected, the CLI's --help is newer
than this skill — trust --help.
The loop
-
Build, then get the whole picture once:
npm run build # or astro build, hugo, jekyll build, … seaworthy verify dist --format llmWith no folder it picks the first of
dist,build,out,public,_site,sitethat exists.--format llmis the reading format for an agent in a context window: one line per finding, fix hint first, thencheckId severity | file:line:col | message, grouped by file. Checks skipped for a reason (browser, network) are listed at the end. -
Fix the source, not the built file. Locations name built output; edit the file that generates it, rebuild. Every finding carries a stable check ID — the rule and the fix in prose live at
docs/checks/<checkId>.md(e.g.meta.description,links.internal). -
Re-verify only what changed:
npm run build && seaworthy verify dist --format llm --changed--changedreports findings in files whose content hash changed since the last run (cache in.seaworthy/cache.json; the first run counts everything as changed). It shrinks the output, not the compute; a link broken from an unchanged file is still real, so CI runs the full check, never--changed. If your build output is committed,--changed-since <git-ref>filters bygit diffinstead (the two are mutually exclusive). -
While iterating, keep one watch open instead of re-spawning:
seaworthy verify dist --watchThe first run prints the full report; each later change to the build folder prints only
+ new/- fixedfindings. It replaces--changed(do not combine them); Ctrl-C stops. -
Gate and stop. Save the machine-readable report and let the exit code decide:
seaworthy verify dist --fail-on warning --format json --out seaworthy-report.json--fail-ontakeserror(the default),warning,note, ornone. Exit codes:0clean at that level ·1findings at or above it ·2usage error ·4a check or the engine crashed ·130Ctrl-C during--watch. A green run means clean, not truncated: even when--max-findingscaps the report, the exit code is decided from all findings.
Reading and acting on findings programmatically
--format jsonis the contract: each finding hascheckId,severity,message,location(file,line,column),fix.summary,fix.edits(exactfind/replaceon aline;needsInput: truemeans a human must supply real content, e.g. alt text), and a self-containedprompt.--out <file>writes the report and prints a one-line summary.--format promptrenders one copy-pasteable instruction that fixes every finding, grouped by file, fewest-findings file first.--format ndjsonstreams one JSON finding per line as each check finishes — for large sites and pipelines; line order follows check completion.- To preview every safe edit at once:
seaworthy fix <dir> --dry-runprints one unified diff (paths relative to the site folder, sogit applyfrom that folder takes it) and lists findings that need a human on stderr.--dry-runis the only mode; passing anything else tofixis a usage error by design.
Keeping the noise down
--update-baseline <file>records all current findings and exits 0;--baseline <file>then reports and fails only on findings the baseline does not accept. The baseline stores fingerprints with counts, so it survives edits that move a finding. The two flags are mutually exclusive, and--update-baselinecannot combine with--changedor--watch.--new-onlyreports only findings the previous run did not have, reading.seaworthy/history; it cannot combine with--no-history, and without a previous run's keys it reports everything and says so.seaworthy diff before.json after.jsoncompares two saved--format jsonreports by fingerprint (new / fixed / unchanged), so the same problem moved to a new line stays "unchanged".
Opt-in checks
By default a run is fully offline and launches nothing. --rendered runs the checks that
need a browser (--browser-path <exe> picks it); --network runs the checks that make
real requests. Both are slow relative to the rest of the loop — keep them off inside the
edit cycle and run them before shipping.
Rules of the road
- Fix the generator's source (templates, front matter, config), never the built HTML, and rebuild before re-verifying — otherwise the next run "fixes" nothing.
- Prefer the smallest safe change per finding; each check page under
docs/checks/explains what "fixed" means for it. - Seaworthy never writes to your site. Do not make it do so by other names: apply an edit only after reading the finding it comes from.
04 同仓库更多 Skills
seaworthy-adopt
Adopt Seaworthy verification in an existing site in four moves - a first honest look that fails nothing, a committed baseline that freezes today's findings, a CI gate that fails only on new ones, and a status badge once the gate is green. Use when a site already has findings and a day-one gate would start the project with red CI.
stale
暂无简介
lint
暂无简介