From t-tools
Runs a single demo E2E test file, diagnoses failures with sub-agents, dispatches fixes, runs layer-specific regression tests, and re-runs until pass.
How this skill is triggered — by the user, by Claude, or both
Slash command
/t-tools:t-demo-run [测试文件路径][测试文件路径]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
运行时边界统一参考:`${CLAUDE_PLUGIN_ROOT}/protocols/runtime-boundaries.md`
运行时边界统一参考:${CLAUDE_PLUGIN_ROOT}/protocols/runtime-boundaries.md
/t-demo-run demo/e2e/super-admin/super-admin-comprehensive-demo.e2e.ts
参数校验。
测试文件必须存在且扩展名为 .e2e.ts。
运行前清理。
uv run scripts/cleanup-demo.py
uv run scripts/demo-test-runner.py "[测试文件]" --run-id [RUN_ID]
若整个测试文件通过:
若整个测试文件失败,列出测试用例。
uv run scripts/demo-test-runner.py "[测试文件]" --list-tests
uv run scripts/demo-test-runner.py "[测试文件]" --run-id [RUN_ID] --grep "[测试标题]"
单用例失败修复循环(最多 6 次)。
先通过 Agent(subagent_type="demo-diagnose") 启动诊断 subagent,传入 testFile、runId、testCaseTitle,生成结构化诊断。
按诊断结果通过 Agent tool 分发到对应修复 subagent:Agent(subagent_type="demo-dev") / Agent(subagent_type="frontend-dev") / Agent(subagent_type="backend-dev") / Agent(subagent_type="miniapp-dev")。
读取修复 agent 返回的 tests_to_run(必填)并校验字段:
layer: backend|frontend|miniapp|democommand: 可直接执行命令reason: 关联说明required: 是否必须通过(默认 true)执行补测(按层顺序串行):backend -> frontend -> miniapp -> demo。
补测命令必须来自允许入口:
uv run scripts/backend-test.py -- [filter]cd frontend && npm run test:run -- [pattern]cd miniapp && npm run typecheck 或 cd miniapp && npm run build:weappuv run scripts/demo-test-runner.py "[测试文件]" --run-id [RUN_ID] --grep "[测试标题]"miniapp 补测只在目标项目存在 miniapp/ 或诊断报告明确归因到小程序交付线时执行;未启用 miniapp 的项目跳过该层。
若 agent 未返回 tests_to_run:
重新运行当前用例验证修复(即 demo 层验证)。
结果输出。
最后一行必须输出机器可解析 JSON,格式固定为:
Result: {"success":"true|false","fixed":"true|false","logs":"demo/test-results/runs/[RUN_ID]","exit_code":0,"test_file":"demo/e2e/...","run_id":"[RUN_ID]","error":""}
success: 最终 Demo 验证是否通过。fixed: 本次是否经历失败后修复并通过;首次整体通过时为 false。logs: 本次运行主日志目录,优先使用 demo-test-runner.py 返回的 logs。exit_code: 最终 Demo 验证退出码。test_file: 输入测试文件路径。run_id: 本次运行 ID。error: 失败时的简要错误;成功时为空字符串。error 字段。当流程中断时:
TaskList。pending 且依赖已满足的任务继续执行。Result: {...}。npx claudepluginhub timzaak/web-dev-skillsDiscovers all demo E2E test files, runs them sequentially with auto-fix support, and generates summary reports in Markdown and JSON. Supports continuation from failures.
Generates and executes E2E tests from specs or Gherkin scenarios, then auto-fixes bugs found in application code. Use after implementation to verify end-to-end behavior.
Analyzes failed E2E test JSON from /test-e2e, reviews screenshots and specs, fixes app code for root causes like timeouts or missing elements, re-runs tests, and verifies.