cmux-browser
できること
cmuxのコマンドラインでブラウザのペインを開き、そのページを読み取り、要素を操作し、情報を取り出す方法を説明します。cmuxを使っていて、エージェントにWebページを扱わせたい人向けです。
使う場面
- ✓cmuxのブラウザペインでサイトを開き、データを取り出したいとき。
- ✓cmuxの中のWebページに入力したり、クリックしたりする必要があるとき。
- ✓次の手順に進む前に、ページの状態を確認したいとき。
スキルのリンク
https://github.com/manaflow-ai/cmux/blob/main/skills/cmux-browser/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このWebサイトの料金ページをcmuxで開き、プラン名と料金をコピーして教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントはブラウザのサーフェスを作成するか対象を指定し、ページの対話的なスナップショットを取ります。その後、必要な要素を読み取るかクリックします。正しいペインを対象にするため、サーフェスのハンドルを必ず明示的に渡します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
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, ornew. 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
よくある質問
私の画面を乗っ取りますか?
このスキルは、現在のウィンドウのフォーカスを奪わずに動くよう作られています。
エージェントはどの要素をクリックするかをどう判断しますか?
ページのスナップショットを取り、そのスナップショットの要素参照を使います。
コマンドの書式を知っておく必要がありますか?
いいえ。エージェントはインストールされたヘルプを読み、正しいコマンドの形を使います。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 29k
- ランキング
- #9793
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
cmux-capture
29kエージェントが、cmuxのウィンドウのスクリーンショットや短い録画を撮れるようにし、視覚的な変化やバグを実際の証拠として示せるよう支援します。
cmux-cloud-vm
29kエージェントが、cmux Cloudのマシン上でコマンドを実行し、コーディングエージェントを起動し、ワークスペースを表示できるよう支援します。ペインを閉じても作業は続きます。
cmux-cua
29kエージェントが、cmux Computer Useエンジンを通じて、実際のmacOSアプリを操作できるよう支援します。アクセシビリティツリーを読み取り、あなたの代わりにクリック、入力、スクロールを行います。
cmux-custom-sidebar
29kエージェントが、平易な説明からcmuxのカスタムサイドバーを作れるよう支援します。ワークスペース、プルリクエスト、時計などを、ライブ更新つきで表示できます。
似ているスキル
tavily
394kTavilyでウェブを検索し、特定のWebページから本文を取り出すようエージェントを支援します。深さ、ドメイン、日付のオプションも使えます。
blogwatcher
394kブログやRSS・Atomフィードを追跡し、新しい記事を確認して、読んだ記事に印を付けるようエージェントを支援します。
data-scraper-agent
280kエージェントが公開されているさまざまな情報源からデータを自動で収集できるよう支援します。スケジュール実行、情報の補強、結果の保存が可能です。オンラインデータの監視や追跡に役立ちます。