Chuyển đến nội dung
Skillpedia
Thu thập dữ liệu web29k · #9793

cmux-browser

Skill này làm gì

Skill này giải thích cách dùng dòng lệnh cmux để mở một khung trình duyệt, đọc trang, tương tác với các phần tử và trích xuất dữ liệu. Dành cho người dùng cmux muốn agent làm việc với các trang web trong đó.

Khi nào nên dùng

  • ✓Khi bạn muốn agent mở một trang trong khung trình duyệt cmux và lấy dữ liệu từ đó.
  • ✓Khi bạn cần điền hoặc nhấp qua một trang web bên trong cmux.
  • ✓Khi bạn muốn kiểm tra trạng thái của một trang trước bước tiếp theo.

Liên kết skill

https://github.com/manaflow-ai/cmux/blob/main/skills/cmux-browser/SKILL.md

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/manaflow-ai/cmux/blob/main/skills/cmux-browser/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Mở trang giá của website này trong cmux và sao chép tên gói cùng giá cho tôi.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent tạo hoặc chọn một surface trình duyệt, chụp một ảnh chụp tương tác của trang, rồi đọc hoặc nhấp các phần tử nó cần. Nó luôn truyền handle của surface một cách tường minh để nhắm đúng khung.

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 Automation with cmux

Read the CLI contract first

Check the binary that will actually run before giving an exact command:

cmux browser --help
cmux --version

There are two deliberately different command shapes:

  • Create a browser surface with open, open-split, or new. These commands may be workspace-scoped and do not need a surface handle.
  • Use an existing surface with every surface-bound navigation, inspection, interaction, tab, state, or diagnostic command. Pass the handle explicitly with --surface <handle> or as the first positional token.

Prefer the flag form in scripts because it makes the target unmissable:

SURFACE="surface:7" # use a ref returned by discovery; do not guess an index
cmux browser --surface "$SURFACE" get url
cmux browser --surface "$SURFACE" get-url       # accepted alias
cmux browser --surface "$SURFACE" snapshot --interactive
cmux browser --surface "$SURFACE" snapshot -i   # accepted alias
cmux browser --surface "$SURFACE" url            # accepted alias
cmux browser --surface "$SURFACE" tab list
cmux browser --surface "$SURFACE" click e1 --snapshot-after

The positional form is equivalent (cmux browser "$SURFACE" get url). url and get-url are accepted URL aliases, and the short interactive snapshot flag is accepted when a surface is already present; use get url and snapshot --interactive in new documentation so the target and operation are clear. Surface-bound operations have no unscoped form. The current CLI's explicitly global browser verbs (open, open-split, new, identify, import, profile, profiles, react-grab, reactgrab, devtools, dev-tools, focus-mode, design-mode, zoom, and history) may omit the handle and use caller/workspace routing; do not infer a target from visible focus for any other verb.

Find an existing browser surface without changing focus

identify, tree, and list commands are read-only and do not select a workspace, pane, or browser. Do not infer that the visually focused surface is the one the user wants.

First inspect the caller context (useful for the default workspace):

cmux identify --json

To discover browser surfaces in the caller or another workspace/window, use the all-window tree. It includes parent refs, so a browser in a different workspace can be targeted directly without selecting that workspace:

cmux tree --all --json \
  | jq -r '
      .windows[]? as $window
      | $window.workspaces[]? as $workspace
      | $workspace.panes[]? as $pane
      | $pane.surfaces[]?
      | select(.type == "browser")
      | [$window.ref, $workspace.ref, $pane.ref, .ref]
      | @tsv'

The filtered output is window, workspace, pane, and surface refs. Keep the surface ref, then target it explicitly:

SURFACE="surface:N" # copied from the filtered tree output
cmux browser --surface "$SURFACE" get url
cmux browser --surface "$SURFACE" snapshot --interactive

If the user gives a URL or title instead of a workspace/pane, match that metadata locally and emit only the unique surface ref. This never prints the matched URL or title:

MATCH_FIELD="url" # use "title" when matching a page title
MATCH_VALUE="${BROWSER_URL_OR_TITLE:?set BROWSER_URL_OR_TITLE without logging it}"
SURFACE="$(
  cmux tree --all --json |
    jq -r --arg field "$MATCH_FIELD" --arg value "$MATCH_VALUE" '
      [
        .windows[]? as $window
        | $window.workspaces[]? as $workspace
        | $workspace.panes[]? as $pane
        | $pane.surfaces[]?
        | select(.type == "browser")
        | select((if $field == "url" then (.url // "") else (.title // "") end) == $value)
        | .ref
      ] as $matches
      | if ($matches | length) == 1 then $matches[0]
        elif ($matches | length) == 0 then error("no matching browser surface")
        else error("multiple matches; use workspace/pane context")
        end'
)"
if [[ -z "$SURFACE" ]]; then
  printf '%s\n' 'no uniquely matching browser surface; provide workspace/pane context' >&2
  exit 1
fi
cmux browser --surface "$SURFACE" get url

For one known workspace, cmux --json list-pane-surfaces --workspace <workspace> is a smaller read-only query. Raw tree/list payloads can contain page URLs and titles; filter or redact them before logging or pasting them. Never use a focus/select command merely to discover a surface.

Core workflow

Open (or create) a surface without stealing focus, cap

Câu hỏi thường gặp

Nó có chiếm màn hình của tôi không?

Skill được thiết kế để hoạt động mà không lấy tiêu điểm khỏi cửa sổ hiện tại của bạn.

Nó biết nhấp vào phần tử nào như thế nào?

Nó chụp một ảnh chụp của trang và dùng các tham chiếu phần tử từ ảnh chụp đó.

Tôi có cần biết cú pháp lệnh không?

Không. Agent đọc trợ giúp đã cài và dùng đúng dạng lệnh.

Chi tiết

Mô tả gốc của tác giả

End-user browser automation with cmux. Use when you need to open sites, inspect or interact with browser surfaces, wait for page state, and extract data without stealing focus.

repo: manaflow-ai/cmux

Độ phổ biến

Sao GitHub
29k
Vị trí xếp hạng
#9793
Giấy phép
—
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự