Borrowing it
Nothing to install: this file belongs to anhtester/ClaudeCode_Playwright_Demo. 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/anhtester/ClaudeCode_Playwright_Demo/main/.claude/commands/generate_automation_from_testcases.mdgit clone --depth 1 https://github.com/anhtester/ClaudeCode_Playwright_DemoWrote 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/anhtester/claudecode_playwright_demo/generate_automation_from_testcases)<a href="https://agentmods.dev/commands/anhtester/claudecode_playwright_demo/generate_automation_from_testcases"><img src="https://agentmods.dev/badge/commands/anhtester/claudecode_playwright_demo/generate_automation_from_testcases.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.00025 | $0.03407 |
| Opus 5 | $0.00013 | $0.01703 |
| Sonnet 5 | $0.00005 | $0.00681 |
| Haiku 4.5 | $0.00003 | $0.00341 |
Grade A, and why
generate_automation_from_testcases 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 8d 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.
This is a copy
89% identical to generate_automation_from_testcases — 48 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 300 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Workflow: Sinh Automation Scripts từ Manual Test Cases
BẮT BUỘC (MANDATORY SKILLS): Bạn PHẢI nạp và đọc kỹ nội dung các skills sau trước khi bắt đầu:
qa_automation_engineer(.agent/skills/qa_automation_engineer/SKILL.md) — Quy tắc automation chung + workflow routingui_debug_agent(.agent/skills/ui_debug_agent/SKILL.md) — Inspect DOM, thu thập locatorssmart_locator_agent(.agent/skills/smart_locator_agent/SKILL.md) — Sinh locator ổn địnhtest_data_generator(.agent/skills/test_data_generator/SKILL.md) — Sinh test data unique, traceable
Workflow này giúp agent đọc file manual test cases do user cung cấp, tự mở browser inspect UI, thu thập locators thực tế, sinh automation scripts hoàn chỉnh (POM + Test), chạy test và tự sửa lỗi cho đến khi PASS.
⚠️ Nguyên tắc thực thi
- Vai trò: Agent đóng vai Senior Automation Engineer — tuân thủ Clean Code + POM
- Tất cả output bằng Tiếng Việt
- TUYỆT ĐỐI KHÔNG ĐOÁN locator — phải inspect DOM thực tế bằng MCP browser tools
- Desktop viewport 1920×1080 cho tất cả UI debugging
- ⚠️ Rule E3 (CRITICAL): Khi test FAIL → tự đọc log → phân tích → sửa code → chạy lại. CẤM hỏi user trong quá trình fix lỗi. Chỉ hỏi khi gặp business rule mâu thuẫn hoặc hết 5 vòng auto-heal
- Artifact
task.md— PHẢI tạo để theo dõi tiến độ 6 bước
Workflow này khác gì generate_automation_from_ui_flow?
from_testcases (workflow này) |
from_ui_flow |
|
|---|---|---|
| Input | File manual test cases có cấu trúc (MD/Excel/JSON) | Mô tả UI steps bằng lời hoặc chỉ URL |
| Đã có TC | ✅ Có sẵn — đọc và convert | ❌ Chưa có — agent tự khám phá |
| Approach | Đọc TC → inspect UI verify → sinh code | Chạy thật trên browser → thu thập → sinh code |
Input cần thu thập
| Input | Cách lấy | Độ ưu tiên |
|---|---|---|
| File test cases (MD/Excel/JSON/URL) | User cung cấp path hoặc URL | ⭐ Bắt buộc |
| URL ứng dụng | User cung cấp hoặc trong TC | ⭐ Bắt buộc |
| Credentials (nếu cần login) | User cung cấp hoặc dùng fixture sẵn | Tùy chọn |
| Tech stack | User chỉ định hoặc detect từ project | Tùy chọn |
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.
- 8d ago First seen · 300 lines · 25 tokens per session scan A 707646bf1283
generate_automation_from_testcases is a command published in the GitHub repository anhtester/ClaudeCode_Playwright_Demo (2 stars, last pushed 3mo ago), licensed MIT. It adds 25 tokens to every session and 3,407 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 89% identical to generate_automation_from_testcases, differing in 48 lines, and is treated as a copy.
Other commands, from other repositories
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.
record
Record a browser walkthrough of a URL using Antigravity (agy). Generates .webm video, screenshots, and a report. Auto-converts to MP4 if ffmpeg is available.
vibereview
Legacy alias for the focused Randroid VibeReview skill.
visual-verify
Use Playwright MCP to visually verify the UI that was just built or modified.
qa
Smoke or browser-walk a running app. Report only. Do not implement. Do not merge.
verify-pr
Verify a PR's frontend changes through browser automation.