RS

raxocode/seo-notary

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

3 stars 0 forks 质量 69 趋势 18MIT

验证网页通过HTTP实际返回的内容,这样编码代理和CI就能解决问题并证明修复方法。确定性,无LLM,MCP兼容。

概览

HTTP 和真实浏览器检查 Claude 代码、光标、VS Code 和 CI。确定性。无大型语言模型。一个命令。 尚未发布到 npm。API 和规则输出可能会在 0.1.0 之前发生变化。 编码代理编辑页面代码,但无法看到页面实际服务内容。客户端脚本覆盖标题和规范代码,服务器渲染中断,重定向跳出,代理无证据地报告“完成”。SEO 公证员获取页面,对响应和渲染后的 DOM 运行确定性规则,返回结构化发现和稳定的退出码。 该输出是本仓库中演示的真实运行的删减。移除重写标题和规范的脚本,同样的命令会打印 PASS 并退出 0。 在第一个 npm 发布之前,从一个借出(节点 >=22.19.0)运行: 发布后,这些浏览器分别变为 npx seo-notary 验证和 npx seo-notary 安装浏览器。

概述(AI 翻译)

核实网页真实返回的内容,以便你的编码代理能修复并证明。

HTTP 和真实浏览器检查 Claude 代码、光标、VS Code 和 CI。确定性。无大型语言模型。一个命令。

状态:0.1(早期发布)。 API、规则输出和规则严重程度在0.x版本之间仍可能变化;详见变更日志。

编码代理编辑页面代码,但无法看到页面实际服务内容。客户端脚本覆盖标题和规范代码,服务器渲染中断,重定向跳出,代理无证据地报告“完成”。SEO 公证员获取页面,对响应和渲染后的 DOM 运行确定性规则,返回结构化发现和稳定的退出码。

该输出是本仓库中演示的真实运行的删减。移除重写标题和规范的脚本,同一命令会打印 PASS 并退出 0。

快速开始

需要节点 >=22.19.0。

从结账处跑动时,先按npm install && npm run build,然后按node packages/cli/dist/bin.js verify 。

退出代码:0 通过,1 发现 --fail-on 或以上(默认 error),2 操作失败(输入不良、网络、超时、策略、浏览器)。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

SEO Notary

Verify what a web page really returns, so your coding agent can fix it and prove it.

HTTP and real-browser checks for Claude Code, Cursor, VS Code and CI. Deterministic. No LLM. One command.

Status: 0.1 (early release). APIs, rule output and rule severities may still change between 0.x releases; see the changelog.

Coding agents edit page code but cannot see what the page actually serves. Client-side scripts overwrite titles and canonicals, server rendering breaks, redirects bounce, and the agent reports “done” without evidence. SEO Notary fetches the page, runs deterministic rules over the response and the rendered DOM, and returns structured findings with stable exit codes.

$ seo-notary verify http://127.0.0.1:4173/broken --tier browser
FAIL http://127.0.0.1:4173/broken
tier browser (faithful), 1153 ms, 0 redirects, HTTP 200
  title        Acme Widgets | Handmade widgets for every workshop
  canonical    http://127.0.0.1:4173/broken
  rendered DOM
  title        Loading...
  canonical    https://staging.acme.example/broken

2 errors, 0 warnings, 0 info; 20 rules passed

ERROR   RENDER_TITLE_DIFFERS  head > title
  The title changes after JavaScript runs.
  raw:      Acme Widgets | Handmade widgets for every workshop
  rendered: Loading...
  fix: Make the server-rendered title and the client-rendered title agree.
$ echo $?
1

That output is abridged from a real run of the demo in this repository. Remove the script that rewrites the title and canonical and the same command prints PASS and exits 0.

Quickstart

Requires Node >=22.19.0.

# Tier 1: raw HTTP and HTML. No browser, nothing to download.
npx seo-notary verify http://localhost:3000/

# Tier 2: also render the page in Chromium and compare raw vs rendered.
npx seo-notary install-browser
npx seo-notary verify http://localhost:3000/ --tier browser

To run from a checkout instead: npm install && npm run build, then node packages/cli/dist/bin.js verify .

Exit codes: 0 pass, 1 findings at or above --fail-on (default error), 2 operational failure (bad input, network, timeout, policy, browser). Use --format json for exactly one JSON document on stdout. Details: docs/CLI.md.

Use it from an agent

seo-notary mcp runs a local MCP server over stdio with two tools: verify_url and get_rule_catalog. verify_url returns the full report as structured content plus a short summary, in one call. See docs/MCP.md for what has and has not been tested, and for an AGENTS.md snippet that tells agents to verify after frontend changes.

What it checks

在 GitHub 查看完整 README

安装

npx seo-notary verify http://localhost:3000/
新手?先看 mcpskill.org 教程 →