opencli-browser
Skill này làm gì
Skill này cho phép agent điều khiển Chrome qua công cụ OpenCLI. Nó có thể mở trang, đọc nội dung, tương tác với nút và ô nhập, và quản lý các tab.
Khi nào nên dùng
- ✓Khi bạn muốn agent mở và đọc một trang web trong Chrome.
- ✓Khi bạn muốn tương tác với một trang web mà bạn đã đăng nhập để thực hiện một tác vụ.
- ✓Khi bạn cần ghi lại những gì một trang gửi đi hoặc nhận về trong lúc điều tra.
Liên kết skill
https://github.com/jackwener/OpenCLI/blob/main/skills/opencli-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 web này trong Chrome, tìm bảng giá, và cho tôi biết nó ghi những gì.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent mở một phiên trình duyệt có tên, đọc trạng thái trang bằng các tham chiếu phần tử, rồi bấm hoặc gõ khi cần. Nó đọc kết quả của từng bước và kiểm tra trạng thái trang trước khi thử lại một thao tác ghi.
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.
Browser tools for agents
Use the capability that fits the task. Discover commands with opencli list <query>;
read exact arguments with opencli browser <command> --help -f json.
Run opencli doctor when diagnosing a connection problem.
Scope and results
Page commands require --session <name>. Reuse that name across a task; different
sessions isolate page work. --profile <name> selects a Chrome profile when needed.
Options can follow command arguments:
opencli browser open https://example.com --session research
opencli browser state --session research
opencli browser click --role button --name Search --session research
opencli browser close --session research
Default output is one JSON value: { "ok": true, "data": ... }.
Failures return { "ok": false, "error": { "code": "...", "message": "...", "hint": "..." } }
and a nonzero exit code. Diagnostic logs go to stderr. network --follow and
console --follow stream one envelope per line. Help, version and shell completion
are inspection/export surfaces; structured help uses --help -f json.
Read the returned data and error fields. When error.outcome is unknown, inspect
the affected state before retrying a write.
Page targets and interaction
statereturns URL and interactive element refs.--diagnosticsalso reports page title and available initial-state globals;--source axselects the AX tree.findlocates elements. Interaction targets accept a ref, CSS selector, or semantic flags such as--role,--name,--label,--text,--testid.- Use
--nthto resolve deliberate multiple matches. On stale refs, read fresh state or locate the element again; refs describe the observed page. fillreplaces a field and verifies its value;typetypes text. Other actions includeclick,select,check,upload,drag,keysanddialog.get text|value|attributes|html,extract,screenshotandevalexpose page data.evalexecutes JavaScript in the page and can mutate state.wait xhr|selector|text|downloadobserves an expected condition. Consult help for timeouts and matching rules.tab list|new|select|closemanages session tabs.--tabaccepts the page identity returned by these commands; these are different from numeric native Chrome IDs.frameslists frame targets;eval --frameevaluates in a selected frame.
bind --session research attaches the current user tab. Bound sessions permit
navigation but block tab creation, selection and closure. unbind releases the
binding without closing the user tab. Owned sessions keep leased tabs until
close or idle expiry. --window foreground|background controls owned windows.
Network and scripts
opencli browser network --session research
opencli browser network --detail RequestKey --session research
opencli browser network --static --session research
network returns captured request keys and response shapes. --detail reads a
cached request; --filter selects shapes; --raw exposes response bodies.
--static adds Acorn AST candidates from loaded scripts, with source locations,
methods, query/body parameter names and observed request evidence. EXPR means
an unresolved expression. Static candidates are not executed or proven APIs.
Check analysisComplete, script errors, omitted scripts and networkSource.
An empty live capture can reuse a recent cache; reported provenance distinguishes it.
Native Chrome management
Native calls need no session and do not attach a page:
opencli browser chrome describe
opencli browser chrome describe tabs.group
opencli browser chrome call tabs.query '[{}]'
opencli browser chrome call tabs.group '[{"tabIds":[123,456],"createProperties":{"windowId":10}}]'
opencli browser chrome call tabGroups.update '[789,{"title":"Research","color":"blue"}]'
Use numeric IDs returned by Chrome, replacing the example IDs. describe lists
supported methods, signatures, live permissions and official documentation.
Native-created tabs/windows persist. Mutations touching active OpenCLI session
tabs or managed groups return managed_resource_conflict; ordinary groups can be
created, renamed, recolored, moved and dissolved with tabs.ungroup.
Câu hỏi thường gặp
Tôi có cần đặt tên phiên không?
Có. Các lệnh trên trang dùng tên phiên, giúp giữ các tác vụ khác nhau tách biệt.
Điều gì xảy ra nếu kết quả của một thao tác không rõ ràng?
Agent kiểm tra trạng thái trang trước khi lặp lại một thao tác ghi.
Nó có dùng hồ sơ trình duyệt đã đăng nhập của tôi không?
Có. Có thể chọn hồ sơ Chrome khi cần.
Chi tiết
Mô tả gốc của tác giả
Drive Chrome with OpenCLI to inspect pages, interact with logged-in sites, capture API evidence, and manage native tabs, groups and windows. For reusable adapters, see opencli-adapter-author.
repo: jackwener/OpenCLI
Độ phổ biến
- Sao GitHub
- 31k
- Vị trí xếp hạng
- #9334
- Giấy phép
- Apache-2.0
- Cập nhật
- 26/10/2026
Bình luận
- …
Thêm skill từ kho mã này
opencli-adapter-author
31kGiúp agent của bạn xây dựng một bộ chuyển đổi OpenCLI có thể tái sử dụng, cho phép các lệnh lấy dữ liệu từ một trang web một cách đáng tin cậy.
opencli-autofix
31kGiúp agent của bạn sửa một bộ chuyển đổi OpenCLI bị hỏng sau khi trang web thay đổi, rồi thử lại lệnh.
opencli-usage
31kGiúp agent của bạn tìm và chạy các lệnh OpenCLI cho trang web và Chrome, và đọc đúng kết quả của chúng.
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á.