Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add huiliyi37/Tianshu-harness --skill visual-acceptancegit clone --depth 1 https://github.com/huiliyi37/Tianshu-harnessWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/huiliyi37/tianshu-harness/visual-acceptance)<a href="https://agentmods.dev/skills/huiliyi37/tianshu-harness/visual-acceptance"><img src="https://agentmods.dev/badge/skills/huiliyi37/tianshu-harness/visual-acceptance/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/huiliyi37/tianshu-harness/visual-acceptance"><img src="https://agentmods.dev/badge/skills/huiliyi37/tianshu-harness/visual-acceptance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00089 | $0.01444 |
| Opus 5 | $0.00044 | $0.00722 |
| Sonnet 5 | $0.00018 | $0.00289 |
| Haiku 4.5 | $0.00009 | $0.00144 |
Grade A, and why
visual-acceptance scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Visual Acceptance — 视觉终验方法论
你在任意项目中对 UI/视觉改动做交付前的最后一道审视。你可能没写这些代码,项目的主题系统、构建管道你也未必熟——但你必须给出「看得见的部分是对的」这个结论,且结论要有证据形状:截图矩阵、像素值、before/after 对照,而不是「应该没问题」。
分工界线:这是验收技能,不是实现技能。界面怎么做出来是实现者的事; 这里管的是做出来之后,交付前有没有人真的看过、看的方法对不对、证据留没留。
Stage 1: 复现术——不起整个 app 的截图矩阵
完整跑起应用再人肉点到目标界面,慢且不可复跑。正确姿势是搭一个最小 harness:
- 用生产构建的编译 CSS,不用源码 CSS。 找到构建产物里的样式文件(
dist/、build/、.next/等),复制进 harness。源码 CSS 验的是近似,编译产物才是产品——预处理器、压缩、autoprefixer 都可能改变最终层叠。 - harness HTML 用真实类名复刻目标场景。 从产品 DOM 里抄结构和 class,不要手写近似样式。before/after 同页并排——一张截图直接回答「改动好在哪」。
- 主题 token 注入。 读项目的主题定义(CSS variables JSON / theme 文件),用 playwright 的
page.evaluate(或等价手段)把变量批量设到根元素上,与产品的 theme-loader 同语义。 - 多主题矩阵一个不能少。 至少 light/dark 各截一张;若产品有半透明/玻璃/壁纸类主题,它是可读性的极限测试(半透明底 + 任意背景),必须在列。每主题 fullPage 截图。
- 动画冻结成静帧。 shimmer/pulse 类动画用
animation-play-state: paused加负值animation-delay钉在特征帧上,静态截图才可检。 - 截图归档为交付资产。 命名带日期与场景,放进项目的文档资产目录——它们是验收证据,不是临时文件。
Stage 2: 像素真值判据链
目视会骗人,且两个方向都骗:真浅色的图能被显示管道渲成深色(读图工具伪影),真白的底能让人以为「没截到」(实为 CSS 层叠 bug)。判据链逐级下钻,任何一级与上一级矛盾时,信下一级:
目视 → PNG 像素值 → computed style → CSS 层叠来源
读像素(三点采样:角落/中部/目标区域):
python3 -c "from PIL import Image; im=Image.open('shot.png').convert('RGB'); print(im.getpixel((10,10)), im.getpixel((640,400)), im.getpixel((640,780)))"
- 像素与目视矛盾 → 显示管道伪影,截图本身没问题,别为不存在的 bug 改代码。
- 像素证实异常但 computed style 正确 → 问题在渲染层之下,查层叠来源与合成(Stage 3)。
Stage 3: CSS 层叠陷阱
!important只向!important低头。 产品 CSS 里的!important规则会静默压掉 harness/宿主环境的普通规则;对抗它需要同 specificity 的!important且源序更靠后。debug 时单独设 class 一切正常、组合路径才踩中——层叠问题的典型形状。- 宿主底色假设要显式补齐。 产品若假设「外壳提供背景」(透明窗体、iframe 宿主、系统壁纸垫底),harness 必须显式补一层底,否则截图里的白/黑是环境缺失,会被误判成产品缺陷(或掩盖真缺陷)。
Stage 4: 布局漂移审查
typecheck 与单元测试都不报的布局问题,静态截图审查一眼现形。逐行扫截图里每个小元素的归属感——它看起来属于谁:
- flex 容器里
flex: 1的元素会把后续兄弟推到行尾。语义上「紧跟」主元素的小标识(序号、徽记、计数)必须嵌进主元素内部,不能做兄弟节点。 - 同一 DOM 模式在不同 flex 上下文中行为不同——一处对不代表处处对,每个使用场景各截一张。
收灯清单
全部满足才算验收通过:
- 多主题矩阵截齐,半透明主题下所有新元素可辨、可读
- before/after 同页对照存在,能一图回答「好在哪」
- 目视存疑处有像素值证据(不是「看着像对的」)
- 截图归档进项目文档资产目录,命名可溯源
- 布局归属感逐行扫过(没有被 flex 推走的孤儿元素)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago First seen · 65 lines · 89 tokens per session scan A 2a554024263f
visual-acceptance is a skill published in the GitHub repository huiliyi37/Tianshu-harness (591 stars, last pushed today), licensed Apache-2.0. It adds 89 tokens to every session and 1,444 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
qa-testing
Verify your work by actually operating the app or website you changed, instead of assuming it works. Strongly recommended whenever you build, modify, or debug a web app, website, or desktop GUI app. Drive real browsers with the agent-browser CLI and native desktop apps with the cua-driver CLI. These are installed on…
cw-gates
Use before claiming any Codewhale change is done, green, or ready to land: the focused-to-broad verification ladder, the budget checks CI enforces, and the rules for what counts as a passing test.
cw-dogfood
Use when a Codewhale change needs proving in the real product, or when asked to build/install/dogfood the local binaries: stamped release build, atomic install, fresh-shell verification, and the manual QA that gates cannot cover.
codew-release-qa-sweep
Use before claiming Codewhale release work is done: run the full gate sweep and list the manual QA targets.
frontend-design
Produce intentional, responsive, accessible UI work and perform visual QA instead of generic component assembly.
verify
Exercise the real app/API/CLI and collect observable evidence; tests alone do not count as end-to-end verification.