t00-playwright-test

t00-playwright-test is a command for Claude Code from maysunAI/T00-zh. It costs 46 tokens per session (603 once invoked), scanned A, original, MIT.

A command for testing a locally running web app in a real browser with Playwright, a browser automation and testing tool. It checks normal user flows and selected edge cases, then reports results with screenshots.

In plain words
What is it for?
Use it to test a local app’s login, AI chat, memo creation and editing, or all listed flows at once.
Why use it?
It catches failures in page loading, login, chat, memos, empty input, long input, and network-loss behavior without changing the app automatically.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to test a local app’s login, AI chat, memo creation and editing, or all listed flows at once.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/maysunai/t00-zh/t00-playwright-test
Install

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.

Clone the repo
git clone --depth 1 https://github.com/maysunAI/T00-zh

Made for: Claude Code.

Wrote 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.

agentmods badge for t00-playwright-test

README.md
[![agentmods](https://agentmods.dev/badge/commands/maysunai/t00-zh/t00-playwright-test/github.svg)](https://agentmods.dev/commands/maysunai/t00-zh/t00-playwright-test)
Your own site
<a href="https://agentmods.dev/commands/maysunai/t00-zh/t00-playwright-test"><img src="https://agentmods.dev/badge/commands/maysunai/t00-zh/t00-playwright-test/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.

agentmods 80×15 button for t00-playwright-test

Your own site · 80×15
<a href="https://agentmods.dev/commands/maysunai/t00-zh/t00-playwright-test"><img src="https://agentmods.dev/badge/commands/maysunai/t00-zh/t00-playwright-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 603 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.00603
Opus 5 $0.00023 $0.00302
Sonnet 5 $0.00009 $0.00121
Haiku 4.5 $0.00005 $0.00060

Measured 10d ago against content hash a9182c532a6f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

t00-playwright-test 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 10d 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.

AI00_Common/.claude/commands/t00-playwright-test.md · 69 lines

What it actually says

使用 Playwright MCP 在真实浏览器中测试本地 Web App。

使用方式

/t00-playwright-test                   → 测试当前项目默认 URL
/t00-playwright-test http://localhost:5175  → 指定 URL
/t00-playwright-test login             → 只测试登录流程
/t00-playwright-test $ARGUMENTS        → 测试指定功能

执行步骤

1. 确认 App 已启动

检查 $ARGUMENTS 指定的 URL(默认 http://localhost:5175)是否可访问。 若不可访问,提示用户先运行 npm run dev

2. 核心流程测试(Golden Path)

按以下顺序测试:

  1. 页面加载 — 导航到 URL,等待 DOMContentLoaded
  2. 截图 — 保存当前页面截图,记录初始状态
  3. 基础功能 — 根据 $ARGUMENTS 决定测试范围:
    • login → 测试登录/注册流程
    • chat → 测试 AI 对话发送接收
    • memo → 测试备忘录创建/编辑/删除
    • 无参数 → 顺序测试以上所有
  4. 边缘案例 — 空输入、超长输入、网络断开后行为

3. 报告格式

测试报告(时间:YYYY-MM-DD HH:MM)
URL:[测试地址]

✅ 通过 | ⚠️ 警告 | ❌ 失败

[功能名]
  状态:✅ / ❌
  截图:[路径]
  问题:[如有]

总结:X 项通过,Y 项失败
失败原因:[列表]
建议修复:[列表]

PJ90 专用测试流程

1. http://localhost:5175 → 检查是否显示 ApiKeyPage 或 ChatPage
2. 设置 API Key → 验证进入 ChatPage
3. 发送一条消息 → 验证 AI 回复
4. 切换到 Memo Tab → 验证标签切换
5. 添加一条备忘 → 验证保存和显示

注意

  • Playwright MCP 需已安装:claude mcp add playwright npx @playwright/mcp@latest --scope user
  • 截图保存到当前目录的 test-screenshots/
  • 测试失败时自动修复,只报告问题,等用户决策
Changes

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.

  1. 10d ago First seen · 69 lines · 46 tokens per session scan A a9182c532a6f

Subscribe to this mod's changes

t00-playwright-test is a command published in the GitHub repository maysunAI/T00-zh (2 stars, last pushed 1mo ago), licensed MIT. It adds 46 tokens to every session and 603 once invoked, about $0.0002 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-31.