ui-demo
Skill này làm gì
Công cụ này tạo video demo chuyên nghiệp cho ứng dụng web. Nó ghi màn hình với con trỏ chuột hiển thị rõ và nhịp độ tự nhiên, trông giống một bài thuyết trình chuyên nghiệp.
Khi nào nên dùng
- ✓Khi bạn yêu cầu video demo, quay màn hình hoặc hướng dẫn.
- ✓Khi bạn muốn cho thấy trực quan cách một tính năng hoặc quy trình hoạt động.
- ✓Khi bạn cần video cho tài liệu hoặc để trình bày cho người khác.
Liên kết skill
https://github.com/affaan-m/ECC/blob/main/skills/ui-demo/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tạo một video cho thấy cách điền biểu mẫu yêu cầu mua hàng.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ trước tiên khám phá trang để hiểu các thành phần (ô nhập, nút bấm). Sau đó, nó diễn tập các bước mà không ghi hình để chắc mọi thứ hoạt động. Cuối cùng, nó ghi video theo một kịch bản, có các khoảng dừng tự nhiên.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
UI Demo Video Recorder
Record polished demo videos of web applications using Playwright's video recording with an injected cursor overlay, natural pacing, and storytelling flow.
When to Use
- User asks for a "demo video", "screen recording", "walkthrough", or "tutorial"
- User wants to showcase a feature or workflow visually
- User needs a video for documentation, onboarding, or stakeholder presentation
Three-Phase Process
Every demo goes through three phases: Discover -> Rehearse -> Record. Never skip straight to recording.
Phase 1: Discover
Before writing any script, explore the target pages to understand what is actually there.
Why
You cannot script what you have not seen. Fields may be <input> not <textarea>, dropdowns may be custom components not <select>, and comment boxes may support @mentions or #tags. Assumptions break recordings silently.
How
Navigate to each page in the flow and dump its interactive elements:
// Run this for each page in the flow BEFORE writing the demo script
const fields = await page.evaluate(() => {
const els = [];
document.querySelectorAll('input, select, textarea, button, [contenteditable]').forEach(el => {
if (el.offsetParent !== null) {
els.push({
tag: el.tagName,
type: el.type || '',
name: el.name || '',
placeholder: el.placeholder || '',
text: el.textContent?.trim().substring(0, 40) || '',
contentEditable: el.contentEditable === 'true',
role: el.getAttribute('role') || '',
});
}
});
return els;
});
console.log(JSON.stringify(fields, null, 2));
What to look for
- Form fields: Are they
<select>,<input>, custom dropdowns, or comboboxes? - Select options: Dump option values AND text. Placeholders often have
value="0"orvalue=""which looks non-empty. UseArray.from(el.options).map(o => ({ value: o.value, text: o.text })). Skip options where text includes "Select" or value is"0". - Rich text: Does the comment box support
@mentions,#tags, markdown, or emoji? Check placeholder text. - Required fields: Which fields block form submission? Check
required,*in labels, and try submitting empty to see validation errors. - Dynamic content: Do fields appear after other fields are filled?
- Button labels: Exact text such as
"Submit","Submit Request", or"Send". - Table column headers: For table-driven modals, map each
input[type="number"]to its column header instead of assuming all numeric inputs mean the same thing.
Output
A field map for each page, used to write correct selectors in the script. Example:
/purchase-requests/new:
- Budget Code: <select> (first select on page, 4 options)
- Desired Delivery: <input type="date">
- Context: <textarea> (not input)
- BOM table: inline-editable cells with span.cursor-pointer -> input pattern
- Submit: <button> text="Submit"
/purchase-requests/N (detail):
- Comment: <input placeholder="Type a message..."> supports @user and #PR tags
- Send: <button> text="Send" (disabled until input has content)
Phase 2: Rehearse
Run through all steps without recording. Verify every selector resolves.
Why
Silent selector failures are the main reason demo recordings break. Rehearsal catches them before you waste a recording.
How
Use ensureVisible, a wrapper that logs and fails loudly:
async function ensureVisible(page, locator, label) {
const el = typeof locator === 'string' ? page.locator(locator).first() : locator;
const visible = await el.isVisible().catch(() => false);
if (!visible) {
const msg = `REHEARSAL FAIL: "${label}" not found - selector: ${typeof locator === 'string' ? locator : '(locator object)'}`;
console.error(msg);
const found = await page.evaluate(() => {
return Array.from(document.querySelectorAll('button, input, select, textarea, a'))
.filter(el => el.offsetParent !== null)
.map(el => `${el.tagName}[${el.type || ''}] "${el.textContent?.trim().substring(0, 30)}"`)
.join('\n ');
});
console.error(' Visible elements:\n ' + found);
return false;
}
console.log(`REHEARSAL OK: "${label}"`);
return true;
}
Rehearsal script structure
const steps = [
{ label: 'Login email field', selector: '#email' },
{ label: 'Login submit', selector: 'button[type="submit"]' },
…
Câu hỏi thường gặp
“Playwright” là gì?
Đây là công cụ cho phép tự động hóa thao tác trên trình duyệt web, như nhấn nút hoặc điền biểu mẫu, để tạo video hoặc bài kiểm thử.
“Polished” nghĩa là gì?
Nghĩa là video sẽ có diện mạo chuyên nghiệp, với con trỏ hiển thị rõ và nhịp độ không quá nhanh cũng không quá chậm.
Vì sao phải diễn tập trước khi ghi hình?
Để chắc chắn tất cả các nút và ô nhập mà công cụ cần tương tác đều được tìm thấy đúng. Nếu có lỗi trong lúc diễn tập, video có thể không được ghi đúng.
Chi tiết
Mô tả gốc của tác giả
Record polished UI demo videos using Playwright. Use when the user asks to create a demo, walkthrough, screen recording, or tutorial video of a web application. Produces WebM videos with visible cursor, natural pacing, and professional feel.
repo: affaan-m/ECC
Độ phổ biến
- Sao GitHub
- 280k
- Vị trí xếp hạng
- #427
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
accessibility
280kGiúp agent của bạn tạo giao diện mà ai cũng dùng được, đảm bảo website và app hoạt động tốt với người khuyết tật như người mù hoặc khó vận động.
agent-architecture-audit
280kGiúp agent của bạn kiểm tra xem mọi thứ có hoạt động đúng không, đồng thời tìm và sửa các lỗi trong hệ thống AI để chúng chạy như mong đợi.
agent-eval
280kGiúp agent của bạn so sánh các công cụ lập trình AI khác nhau, đo xem công cụ nào nhanh hơn, rẻ hơn và đáng tin cậy hơn cho từng tác vụ.
agent-harness-construction
280kGiúp agent của bạn hiểu rõ hơn cách thực hiện tác vụ, tối ưu các công cụ và chỉ dẫn mà agent dùng để tăng khả năng thành công.
Skill tương tự
ai-presenter-video
260kBiến một chủ đề hoặc kịch bản và một ảnh người dẫn bạn được phép dùng thành video người dẫn hoàn chỉnh, có thuyết minh và phụ đề.
brag-slim
260kCho phép agent của bạn làm video ra mắt ngắn cho dự án hoặc trang web, tái sử dụng giao diện, phông chữ và tài nguyên thật cùng nhạc và âm thanh.
kanban-video-orchestrator
260kLên kế hoạch dự án video như một nhóm agent AI, mỗi agent lo một phần như cảnh, nhạc hay chỉnh sửa, từ teaser ngắn đến câu chuyện dài.