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_test_data.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_test_data)<a href="https://agentmods.dev/commands/anhtester/claudecode_playwright_demo/generate_test_data"><img src="https://agentmods.dev/badge/commands/anhtester/claudecode_playwright_demo/generate_test_data/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.
<a href="https://agentmods.dev/commands/anhtester/claudecode_playwright_demo/generate_test_data"><img src="https://agentmods.dev/badge/commands/anhtester/claudecode_playwright_demo/generate_test_data.svg" alt="Reviewed on agentmods" width="80" 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.00030 | $0.02971 |
| Opus 5.5 | $0.00012 | $0.01188 |
| Sonnet 5.5 | $0.00006 | $0.00594 |
| Haiku 4.5 | $0.00003 | $0.00297 |
Grade A, and why
generate_test_data 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 1mo 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
95% identical to generate_test_data — 10 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 — 268 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/generate_test_data — Sinh Test Data Có Cấu Trúc
User cung cấp feature/module hoặc test cases cần sinh data. AI phân tích fields, constraints, sinh bộ data đầy đủ (positive, negative, boundary, edge cases) với format sẵn sàng sử dụng.
BẮT BUỘC (MANDATORY): Trước khi bắt đầu, PHẢI nạp và đọc kỹ:
- Skill:
.agent/skills/test_data_generator/SKILL.md— Quy tắc sinh data- Rule:
.agent/rules/automation_rules.md— Section Test Data
Input cần từ User
| Input | Bắt buộc | Mô tả |
|---|---|---|
| Feature / Module | ✅ | VD: "Form đăng ký", "API Create User", "Trang Login" |
| Fields cần data | ⚠️ Nên có | Danh sách fields + constraints. Nếu không có → AI tự phân tích từ DOM/Spec |
| URL trang / Swagger spec | ❌ | Nếu có → AI inspect DOM/Spec để lấy validation rules chính xác |
| Test cases | ❌ | Nếu đã có test cases → AI sinh data match từng TC |
| Output format | ❌ | json (mặc định), csv, markdown table, code (TypeScript/Java/Python) |
| Ngôn ngữ data | ❌ | Tiếng Việt / Tiếng Anh (mặc định: theo context) |
Các bước thực hiện
Bước 1: Phân tích Fields & Constraints
-
Xác định nguồn thông tin:
Nguồn Cách lấy Ưu tiên User cung cấp trực tiếp Đọc từ input ⭐ Cao nhất DOM thực tế (UI form) browser_navigate→browser_snapshot→ phân tích input fields⭐ Cao Swagger/OpenAPI spec read_url_content→ parse schema + constraints⭐ Cao Test cases đã có Đọc test steps → trích xuất fields Trung bình Đoán từ tên module Dựa trên kinh nghiệm domain ⭐ Thấp nhất -
Với mỗi field, xác định:
Attribute Ví dụ Tên field email, password, name, phone Kiểu dữ liệu string, number, boolean, date, file, enum Required? Bắt buộc hay tùy chọn Validation rules min/maxLength, pattern/regex, format (email, phone), unique Giá trị mặc định Nếu có Enum values VD: status = ["AVAILABLE", "UNAVAILABLE"] Quan hệ phụ thuộc VD: password_confirmphải khớppassword
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.
- 1mo ago First seen · 268 lines · 30 tokens per session scan A 42e39924f089
generate_test_data is a command published in the GitHub repository anhtester/ClaudeCode_Playwright_Demo (3 stars, last pushed 5mo ago), licensed MIT. It adds 30 tokens to every session and 2,971 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 95% identical to generate_test_data, differing in 10 lines, and is treated as a copy.
Other commands, from other repositories
test
Write tests using MCP-powered discovery.
prototype
You are building a proof-of-concept for the current Grainulator sprint. Read CLAUDE.md for sprint context and claims.json for existing research claims.
modernize-transform
Transform one legacy module to the target stack — idiomatic rewrite with behavior-equivalence tests.
test-coverage
Analyze test coverage and identify the highest-value gaps to fill.
flowspec.validate
../../templates/commands/flow/validate.md.
tdd
A command that follows test-driven development (TDD), a method where you write tests before the code they check. It moves through writing a failing test, adding the smallest implementation, and then improving the code.