generate_automation_from_ui_flow

generate_automation_from_ui_flow is a command for Claude Code from anhtester/claude-testing-kit. It costs 36 tokens per session (3,117 once invoked), scanned A, original, MIT.

A browser-based workflow that performs described interface steps, reads the page structure, and creates automation scripts. It supports Playwright, Selenium, and Appium.

In plain words
What is it for?
Use it to turn a written sequence of browser actions or a URL into tested automation code using real page elements.
Why use it?
It removes the need to write manual test cases first or guess which page elements the scripts should use.

Command for Claude Code

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.

agentmods
npx agentmods add commands/anhtester/claude-testing-kit/generate_automation_from_ui_flow
Clone the repo
git clone --depth 1 https://github.com/anhtester/claude-testing-kit

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 generate_automation_from_ui_flow

README.md
[![agentmods](https://agentmods.dev/badge/commands/anhtester/claude-testing-kit/generate_automation_from_ui_flow.svg)](https://agentmods.dev/commands/anhtester/claude-testing-kit/generate_automation_from_ui_flow)
Your own site
<a href="https://agentmods.dev/commands/anhtester/claude-testing-kit/generate_automation_from_ui_flow"><img src="https://agentmods.dev/badge/commands/anhtester/claude-testing-kit/generate_automation_from_ui_flow.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,117 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00036 $0.03117
Opus 5 $0.00018 $0.01558
Sonnet 5 $0.00007 $0.00623
Haiku 4.5 $0.00004 $0.00312

Measured 5d ago against content hash 2982755f589e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

generate_automation_from_ui_flow 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 5d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/commands/generate_automation_from_ui_flow.md · 288 lines

How it starts

The opening of the file, as written. The whole thing — 288 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Workflow: Sinh Automation từ UI Flow

BẮT BUỘC (MANDATORY SKILL): Bạn PHẢI nạp và đọc kỹ nội dung của skill skills-ui-debug-agent (tại .claude/skills/skills-ui-debug-agent/SKILL.md) trước khi bắt đầu. Ngoài ra tham khảo thêm skill skills-smart-locator-agent để sinh locator ổn định và skills-qa-automation-engineer cho quy tắc automation chung.

Workflow này giúp agent thực thi trực tiếp một chuỗi thao tác UI trên browser thật, thu thập locators từ DOM thực tế, và sinh automation scripts hoàn chỉnh — tất cả trong một luồng tự động, không cần manual test case có sẵn.

⚠️ Nguyên tắc thực thi

  • Tất cả output bằng Tiếng Việt
  • TUYỆT ĐỐI KHÔNG ĐOÁN locator — phải lấy từ DOM thực tế bằng MCP browser tools
  • Phải chạy từng bước UI trên browser thật trước khi sinh code
  • Desktop viewport 1920×1080 cho tất cả UI debugging
  • ⚠️ Rule E3: Khi test FAIL → tự đọc log → phân tích → sửa → chạy lại. KHÔNG hỏi user

Workflow này khác gì generate_automation_from_testcases?

from_testcases from_ui_flow (workflow này)
Input File manual test cases có sẵn Mô tả UI steps bằng lời hoặc URL + hành động
Approach Đọc TC → inspect UI → sinh code Chạy thật trên browser → thu thập locator → sinh code
Khi nào dùng Đã có test case document Chưa có TC, chỉ biết "vào trang này, click cái kia"

Input cần thu thập

Agent cần ít nhất 1 trong các input sau từ user:

Input Ví dụ Độ ưu tiên
URL + UI steps mô tả "Vào https://example.com, login, tạo user mới" ⭐ Phổ biến nhất
URL + recording/video User cung cấp video thao tác Tùy chọn
URL + screenshots User cung cấp ảnh chụp từng bước Tùy chọn
Chỉ URL "Automate login flow của trang này" Agent tự khám phá

Nếu user chưa cung cấp đủ → hỏi:

  • URL ứng dụng?
  • Mô tả flow cần automate (từng bước)?
  • Credentials nếu cần đăng nhập?
  • Framework mong muốn? (mặc định: Playwright + TypeScript)

Read the full file on GitHub · 288 lines

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. 5d ago First seen · 288 lines · 36 tokens per session scan A 2982755f589e

Subscribe to this mod's changes

generate_automation_from_ui_flow is a command published in the GitHub repository anhtester/claude-testing-kit (50 stars, last pushed 27d ago), licensed MIT. It adds 36 tokens to every session and 3,117 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.