跳到正文
Skillpedia
网站与界面(前端)48k · #3825

assay

它能做什么

Assay 是一个工具,可以自动检查你刚创建或修改的网页上的按钮和其他控件是否正常工作。它会在真实的浏览器中打开页面,与所有元素交互,并报告任何不一致之处。

适用场景

  • ✓创建了一个新的 HTML 页面,想检查其中的控件是否正常工作时。
  • ✓修改了网页、JavaScript 或 CSS 后,想确认一切仍然协调运作时。
  • ✓需要检查或对本地网页进行冒烟测试(smoke test)时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/assay/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/assay/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“检查一下我的 'index.html' 页面,告诉我按钮能不能正常工作。”

每周 5 个新技能,1 分钟读完。

工作原理

你先在电脑上安装 'assay' 工具。然后运行一条简单的命令,指向你的网页文件。工具会打开页面,点击所有元素,并给你一句话的摘要,说明它发现了什么。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Assay

Overview

A page you have just written has no tests yet. assay serves the page locally, opens it in a real Chromium browser through Playwright, finds every control on it, uses all of them, and reports where the page contradicts itself. There are no tests to write, no LLM, no API key, and no network. The same page gives the same result every time.

Use this skill after you create or change a web page, to run assay on that page and report the one line it prints. The skill reports the result and does not change code because of it unless you ask.

When to Use This Skill

  • Use when you have just created an HTML page and want to know whether its controls work before you move on.
  • Use when you changed a page, or the JavaScript or CSS that a page loads, and want to confirm the page still holds together.
  • Use when the user asks you to check, QA, or smoke-test a local web page.
  • Run it once at the end, after the last edit, on each page you changed. Do not run it while you are still making changes.

How It Works

Step 1: Install the CLI once

Install assay from PyPI. The package is named assay-ui and the command it installs is assay.

pip install assay-ui

It needs Python 3.10 or newer. On the first run assay downloads the Chromium build Playwright uses.

Step 2: Run assay on the page you changed

Point assay at the page itself and ask for the one-line summary.

assay <the page you changed> --one-line

Point it at a file such as todo.html or dist/index.html. A folder also works and opens the index.html inside it. The page is often a folder or two above the file you edited, so a change to a script or stylesheet still means running assay on the page that loads it. assay needs no key, network, or configuration. A small page takes seconds, and a busy one can take a minute or more.

Step 3: Report the one line assay printed, verbatim

Put assay's output, word for word, as the last thing in your reply. It is already one line, or one line and a short list. Do not summarize it, reformat it, add to it, or write your own version.

A clean run looks like this, with assay's own numbers and wording.

assay: checked todo/todo.html, 8 checks, nothing flagged.

A run that flagged something looks like this, followed by a short list.

assay: checked notes/index.html, 12 checks, 4 flagged:

Report the line whether it flagged anything or not. Without it, the reader cannot tell a clean page from a check that never ran.

If the command did not run, say so in your own words, name the page, and quote what the shell actually printed. Never describe a check that did not happen as one that passed, and never guess at a cause.

Step 4: Report the finding and stop

Report what assay found and stop. Do not edit code in response to a finding in the same reply. If the user then asks you to fix it, fix it.

Examples

Example 1: A page that checks out clean

User: I added a to-do list at todo/todo.html. Does it work?

assay todo/todo.html --one-line
assay: checked todo/todo.html, 8 checks, nothing flagged.

Report that line as the last thing in the reply, and do not change the page.

Example 2: A page where assay flagged something

assay notes/ --one-line
assay: checked notes/index.html, 12 checks, 4 flagged:
  - draw on canvas twice, then press Undo twice: it reacted one press late

Report the whole line and its short list, say that a finding is a place to look rather than a confirmed bug, and wait for the user to ask before changing anything.

Example 3: The command did not run

assay dist/index.html --one-line
assay: error: dist/index.html does not exist

Say that assay did not run, name the page, and quote the message. Do not report a check that never happened as one that passed.

Best Practices

  • ✅ Run assay once, at the end, on each page you changed.
  • ✅ Point it at the built page, such as dist/index.html, not at a source template.
  • ✅ Print assay's one line exactly as it came out, as the last thing in your reply.
  • ✅ When assay flags something, treat it as a place to look and wait to be asked before changing code.
  • ❌ Do not run assay while you are still editing the page.
  • ❌ Do not summarize, reword, or invent the result, and never report a check that did not run as one that passed.

Limitations

…

常见问题

我需要自己写测试吗?

不需要,Assay 会自动完成所有工作,你无需编写任何测试代码。

它需要联网或 API 密钥吗?

不需要。Assay 在本地运行,不使用互联网,也不需要任何密钥。

“标记”(flagged)是什么意思?

意思是 Assay 发现了某些可能需要关注的地方,比如某个按钮没有按预期响应。这只是提醒你去看一看,不一定是 bug。

详情

作者的原始描述

Run assay on a web page you just wrote or changed. It opens the page in a real browser, drives every control, and reports where the page contradicts itself. Deterministic, no API key, no network.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#3825
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能