Borrowing it
Nothing to install: this file belongs to shenjingnan/xiaozhi-client. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/shenjingnan/xiaozhi-client/main/.agents/commands/e2e.mdgit clone --depth 1 https://github.com/shenjingnan/xiaozhi-clientWrote 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/commands/shenjingnan/xiaozhi-client/e2e)<a href="https://agentmods.dev/commands/shenjingnan/xiaozhi-client/e2e"><img src="https://agentmods.dev/badge/commands/shenjingnan/xiaozhi-client/e2e.svg" alt="Measured on agentmods" height="20"></a>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.00031 | $0.02726 |
| Opus 5 | $0.00015 | $0.01363 |
| Sonnet 5 | $0.00006 | $0.00545 |
| Haiku 4.5 | $0.00003 | $0.00273 |
Grade A, and why
e2e 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 6d 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 — 201 lines — stays where its author put it; the contents beside it link to each section on GitHub.
上下文
- 了解如何使用 playwright-cli: !
playwright-cli --help - 当前 git 分支: !
git branch --show-current - 构建产物状态: !
ls -la dist/cli/index.js 2>/dev/null || echo "未构建" - Web 服务端口占用情况: !
lsof -i :9999 2>/dev/null | head -5 || echo "端口 9999 未被占用" - 可用测试用例: !
ls -d tests/e2e/*/ 2>/dev/null | sed 's|tests/e2e/||;s|/||' || echo "无测试用例"
输入参数
用户参数: $ARGUMENTS
模式判断
根据 $ARGUMENTS 判断执行模式:
模式一:路径模式($ARGUMENTS 是一个目录路径)
当 $ARGUMENTS 指向一个存在的目录路径时(支持相对路径和绝对路径),进入路径模式:
-
识别目标:
- 检查该目录下是否存在
test.md文件 - 如果存在 → 这是单个测试用例,只执行这一个
- 如果不存在 → 扫描子目录,找出所有包含
test.md的子目录作为待执行用例列表
- 检查该目录下是否存在
-
执行每个测试用例:
对每个测试用例,按以下流程执行:
a. 准备产物目录:
- 创建
artifacts/子目录:mkdir -p <测试用例绝对路径>/artifacts/trace - 创建
steps/子目录:mkdir -p <测试用例绝对路径>/steps - 清空
steps/目录中已有的旧截图:rm -f <测试用例绝对路径>/steps/*.png - 初始化截图计数器为 1
b. 读取
test.md,理解测试步骤c. 检查该用例目录下是否有
expected.pngd. 确保浏览器已打开且在正确页面(如未打开则
playwright-cli open)e. 启动录制:
- 开始视频录制:
playwright-cli video-start <测试用例绝对路径>/artifacts/recording.webm - 开始 Trace 录制:
playwright-cli tracing-start
f. 按照
test.md中的步骤逐步执行操作:- 遇到"截图"指令时:
- 先添加视频章节标记:
playwright-cli video-chapter "步骤<N>: <描述>" --description="<步骤原文>" --duration=1500- 描述从截图指令的括号中提取,如
截图(对话框打开状态)→ 描述为"对话框打开状态";无括号则使用"步骤N"
- 描述从截图指令的括号中提取,如
- 截图保存到 steps/:
playwright-cli screenshot --filename=<测试用例绝对路径>/steps/<两位数编号>.png - 如果存在
expected.png,使用视觉能力对比expected.png和实际截图,描述差异 - 一致 → PASS,有明显差异 → FAIL 并说明差异
- 截图计数器递增
- 先添加视频章节标记:
- 其他操作(导航、点击、填写等)直接执行,trace 自动记录所有操作
g. 捕获日志(所有步骤执行完毕后):
- 捕获完整控制台日志:
playwright-cli --raw console > <测试用例绝对路径>/artifacts/console.log 2>&1 - 捕获控制台警告:
playwright-cli --raw console warning > <测试用例绝对路径>/artifacts/console-warnings.log 2>&1 - 捕获网络活动:
playwright-cli --raw network > <测试用例绝对路径>/artifacts/network.log 2>&1
h. 停止录制:
- 停止 Trace:
playwright-cli tracing-stop- 将 trace 文件从
.playwright-cli/traces/移动到用例的artifacts/trace/目录:LATEST_TRACE=$(ls -t .playwright-cli/traces/*.trace 2>/dev/null | head -1) if [ -n "$LATEST_TRACE" ]; then TRACE_BASE=$(basename "$LATEST_TRACE" .trace) mv "$LATEST_TRACE" <测试用例绝对路径>/artifacts/trace/test.trace mv ".playwright-cli/traces/${TRACE_BASE}.network" <测试用例绝对路径>/artifacts/trace/test.network 2>/dev/null [ -d ".playwright-cli/traces/resources" ] && mv .playwright-cli/traces/resources <测试用例绝对路径>/artifacts/trace/resources 2>/dev/null fi
- 将 trace 文件从
- 停止视频录制:
playwright-cli video-stop
- 创建
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.
- 6d ago First seen · 201 lines · 31 tokens per session scan A 694ed89f69c0
e2e is a command published in the GitHub repository shenjingnan/xiaozhi-client (338 stars, last pushed 3d ago), licensed MIT. It adds 31 tokens to every session and 2,726 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-30.
Other commands, from other repositories
paul:verify
Guide manual user acceptance testing of recently built features.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
ui-snapshot.template
This prompt was authored for Claude-style slash workflows. In Codex runtime, adapt tool calls as follows.
journey-audit
Outside-in product audit as a deep session — 7 read-only roles check what the site promises against what the code does, what a user experiences, what arrives by mail, and what the data says is used. Writes a dossier; needs a per-repo journey-manifest.
laravel-playwright
E2E Playwright patterns; use the laravel:e2e-playwright skill exactly as written.
qa
Smoke or browser-walk a running app. Report only. Do not implement. Do not merge.