agent-browser
Skill này làm gì
Skill này cho phép agent điều khiển trình duyệt dựa trên Chrome từ dòng lệnh để điều hướng và tương tác với các trang. Skill hữu ích khi kiểm thử ứng dụng web, điền biểu mẫu và trích xuất thông tin từ trang.
Khi nào nên dùng
- ✓Khi bạn muốn agent mở một trang web và điền biểu mẫu.
- ✓Khi bạn muốn lấy ảnh chụp màn hình hoặc dữ liệu từ một trang web.
- ✓Khi bạn muốn kiểm thử ứng dụng web bằng cách bấm qua các trang.
Liên kết skill
https://github.com/sipeed/picoclaw/blob/main/workspace/skills/agent-browser/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
“Mở trang đăng ký của chúng tôi, điền biểu mẫu bằng thông tin thử nghiệm, và chụp ảnh màn hình kết quả.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent mở trang, liệt kê các phần tử có thể bấm và điền kèm số tham chiếu, rồi thao tác theo các tham chiếu đó. Sau mỗi thay đổi, nó xem lại trang từ đầu vì các tham chiếu cũ không còn hiệu lực.
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.
Agent Browser
CLI browser automation via Chrome/Chromium CDP. Install: npm i -g agent-browser && agent-browser install.
Before using this skill, verify the tool is available by running which agent-browser. If the command is not found, tell the user that browser automation requires the agent-browser CLI and Chromium, which are only available in the heavy container image. Do not attempt to install it at runtime.
Core Workflow
agent-browser open <url>— navigateagent-browser snapshot -i— get interactive elements with refs (@e1,@e2, ...)- Interact using refs —
click @e1,fill @e2 "text" - Re-snapshot after any navigation or DOM change — refs are invalidated
agent-browser open https://example.com/form
agent-browser snapshot -i
# @e1 [input] "Email", @e2 [input] "Password", @e3 [button] "Submit"
agent-browser fill @e1 "user@example.com"
agent-browser fill @e2 "secret"
agent-browser click @e3
agent-browser wait --load networkidle
agent-browser snapshot -i
Chain commands with && when you don't need intermediate output:
agent-browser open https://example.com && agent-browser wait --load networkidle && agent-browser snapshot -i
Commands
# Navigation
agent-browser open <url>
agent-browser close
# Snapshot
agent-browser snapshot -i # Interactive elements with refs
agent-browser snapshot -s "#selector" # Scope to CSS selector
# Interaction (use @refs from snapshot)
agent-browser click @e1
agent-browser fill @e2 "text" # Clear + type
agent-browser type @e2 "text" # Type without clearing
agent-browser select @e1 "option"
agent-browser check @e1
agent-browser press Enter
agent-browser scroll down 500
# Get info
agent-browser get text @e1
agent-browser get url
agent-browser get title
# Wait
agent-browser wait @e1 # Wait for element
agent-browser wait --load networkidle # Wait for network idle
agent-browser wait --url "**/dashboard" # Wait for URL pattern
agent-browser wait --text "Welcome" # Wait for text
agent-browser wait 2000 # Wait ms
# Capture
agent-browser screenshot # Screenshot to temp dir
agent-browser screenshot --full # Full page
agent-browser screenshot --annotate # With numbered element labels ([N] -> @eN)
agent-browser pdf output.pdf
# Semantic locators (when refs unavailable)
agent-browser find text "Sign In" click
agent-browser find label "Email" fill "user@test.com"
agent-browser find role button click --name "Submit"
Authentication
# Option 1: Import from user's running Chrome
agent-browser --auto-connect state save ./auth.json
agent-browser --state ./auth.json open https://app.example.com
# Option 2: Persistent profile
agent-browser --profile ~/.myapp open https://app.example.com/login
# ... login once, all future runs are authenticated
# Option 3: Session name (auto-save/restore)
agent-browser --session-name myapp open https://app.example.com/login
# ... login, close, next run state is restored
# Option 4: State file
agent-browser state save auth.json
agent-browser state load auth.json
Iframes
Iframe content is inlined in snapshots. Interact with iframe refs directly — no frame switch needed.
Parallel Sessions
agent-browser --session s1 open https://site-a.com
agent-browser --session s2 open https://site-b.com
agent-browser session list
JavaScript Eval
agent-browser eval 'document.title'
# Complex JS — use --stdin to avoid shell quoting issues
agent-browser eval --stdin <<'EVALEOF'
JSON.stringify(Array.from(document.querySelectorAll("a")).map(a => a.href))
EVALEOF
Cleanup
Always close sessions when done:
agent-browser close
agent-browser --session s1 close
Câu hỏi thường gặp
Tôi cần cài gì trước?
Công cụ dòng lệnh agent-browser và Chromium. Skill kiểm tra công cụ có sẵn trước khi bắt đầu.
Agent có tự cài công cụ cho tôi không?
Không. Nếu thiếu công cụ, agent báo bạn rằng cần có nó, chứ không cài trong lúc thực hiện tác vụ.
Tại sao agent liên tục xem lại trang?
Sau khi bấm hoặc trang thay đổi, các tham chiếu phần tử không còn hợp lệ, nên agent đọc lại trang trước bước tiếp theo.
Chi tiết
Mô tả gốc của tác giả
Browser automation via agent-browser CLI. Use when the user needs to navigate websites, fill forms, click buttons, take screenshots, extract data, or test web apps.
repo: sipeed/picoclaw
Độ phổ biến
- Sao GitHub
- 30k
- Vị trí xếp hạng
- #9355
- Giấy phép
- MIT
- Cập nhật
- 30/10/2026
Bình luận
- …
Thêm skill từ kho mã này
hardware
30kGiúp agent của bạn đọc cảm biến và điều khiển các thiết bị nhỏ như màn hình trên bo mạch Sipeed qua kết nối I2C và SPI.
picoclaw-agent
30kGiúp agent của bạn thiết lập, cấu hình và xử lý sự cố PicoClaw, một trợ lý AI cá nhân nhẹ có cổng chat và tác vụ theo lịch.
summarize
30kGiúp agent của bạn tóm tắt trang web, file cục bộ và video YouTube, hoặc lấy bản chép lời khi có sẵn.
weather
30kGiúp agent của bạn xem thời tiết hiện tại và dự báo cho một thành phố, đồng thời xác nhận địa điểm để bạn nhận đúng nơi cần xem.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.