cli-anything-browser
できること
このスキルは、ページの構造をフォルダーのような表示に変えるDOMShellの拡張を通じて、エージェントがChromeで開いているウェブページを移動できるようにします。AIにシンプルなコマンドのインターフェースでウェブサイトを使わせたい人向けです。
使う場面
- ✓Chromeで開いているウェブページで何かを見つけてクリックさせたいとき。
- ✓スクリーンショットを撮らずに、ページのセクションの文章を読みたいとき。
- ✓ウェブページ内で、特定の単語やフレーズを検索したいとき。
スキルのリンク
https://github.com/HKUDS/CLI-Anything/blob/main/browser/agent-harness/cli_anything/browser/skills/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Chromeで料金ページを開き、エンタープライズプランが掲載されている場所を見つけてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、ページの構造をフォルダーのような表示にするChromeのDOMShell拡張に接続します。エージェントはls、cd、cat、grepなどのコマンドで探索し、必要に応じてクリックや入力を行います。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
cli-anything-browser
A command-line interface for browser automation using DOMShell's MCP server. Navigate web pages using filesystem commands: ls, cd, cat, grep, click.
Installation
Prerequisites
Node.js and npx (for DOMShell MCP server):
# Install Node.js from https://nodejs.org/ npx --versionChrome/Chromium with DOMShell extension:
- Install extension in Chrome
- Ensure Chrome is running before using CLI
Python 3.10+
Install CLI
cd browser/agent-harness
pip install -e .
Command Groups
page — Page Navigation
page open <url>— Navigate to URLpage reload— Reload current pagepage back— Navigate back in historypage forward— Navigate forward in historypage info— Show current page info
fs — Filesystem Commands (Accessibility Tree)
fs ls [path]— List elements at pathfs cd <path>— Change directoryfs cat [path]— Read element contentfs grep <pattern> [path]— Search for text patternfs pwd— Print working directory
act — Action Commands
act click <path>— Click an elementact type <path> <text>— Type text into input
session — Session Management
session status— Show session statesession daemon-start— Start persistent daemon modesession daemon-stop— Stop daemon mode
Usage Examples
Basic Navigation
# Open a page
cli-anything-browser page open https://example.com
# Explore structure
cli-anything-browser fs ls /
cli-anything-browser fs cd /main
cli-anything-browser fs ls
# Go back to root
cli-anything-browser fs cd /
Search and Click
cli-anything-browser fs grep "Login"
cli-anything-browser act click /main/button[0]
Form Fill
cli-anything-browser act type /main/input[0] "user@example.com"
cli-anything-browser act click /main/button[0]
JSON Output
cli-anything-browser --json fs ls /
Daemon Mode (Faster Interactive Use)
# Start persistent connection
cli-anything-browser session daemon-start
# Run commands (uses persistent connection)
cli-anything-browser fs ls /
cli-anything-browser fs cd /main
# Stop daemon when done
cli-anything-browser session daemon-stop
Interactive REPL
cli-anything-browser
Path Syntax
DOMShell uses a filesystem-like path for the Accessibility Tree:
/ — Root (document)
/main — Main landmark
/main/div[0] — First div in main
/main/div[0]/button[2] — Third button in first div
- Array indices are 0-based:
button[0]is the first button - Use
..to go up one level - Use
/for root
Agent-Specific Guidance
JSON Output for Parsing
All commands support --json flag for machine-readable output:
cli-anything-browser --json fs ls /
Returns:
{
"path": "/",
"entries": [
{"name": "main", "role": "landmark", "path": "/main"}
]
}
Error Handling
The CLI provides clear error messages for common issues:
- npx not found: Install Node.js from https://nodejs.org/
- DOMShell not found: Run
npx @apireno/domshell --version - MCP call failed: Install DOMShell Chrome extension
Check is_available() return value before running commands.
Daemon Mode for Efficiency
For agent workflows with multiple commands, use daemon mode:
- Start daemon:
cli-anything-browser session daemon-start - Run commands: Each command reuses the MCP connection
- Stop daemon:
cli-anything-browser session daemon-stop
This avoids the 1-3 second cold start overhead for each command.
Links
Security Considerations
IMPORTANT: When using this CLI with AI agents, be aware of the following security considerations:
URL Restrictions
The browser harness validates all URLs before navigation:
- Explicit scheme required: URLs must include
http://orhttps://scheme (scheme-less URLs likeexample.comare rejected) - Blocked schemes:
file://,javascript://,data://,vbscript://,about://,chrome://, and browser-internal schemes - **Al
よくある質問
何をインストールしておく必要がありますか?
Node.js、DOMShell拡張を入れたChrome、Python 3.10以降が必要です。
Chromeは開いている必要がありますか?
はい。このスキルを使う前に、Chromeが起動している必要があります。
フォームに入力できますか?
はい。要素をクリックするだけでなく、入力欄にテキストを入力することもできます。
詳細
作者による元の説明
Browser automation CLI using DOMShell MCP server. Maps Chrome's Accessibility Tree to a virtual filesystem for agent-native navigation.
repo: HKUDS/CLI-Anything
人気
- GitHubのスター
- 58k
- ランキング
- #3185
- ライセンス
- Apache-2.0
- 更新日
- 2026/9/21
コメント
- …
このリポジトリの他のスキル
cli-anything-3mf
58kエージェントが3Dプリントのファイルを調べて直せるようにします。丸い穴を見つける、そのサイズを変える、メッシュを修復する、2つのファイルを比べることができます。
cli-anything-qgis
58kエージェントがターミナルからQGISのマッププロジェクトを開き、編集し、書き出せるようにします。レイヤー、フィーチャー、印刷レイアウト、処理ツールを含みます。
cli-anything-adguardhome
58kエージェントがAdGuard Homeを管理できるようにします。AdGuard Homeはネットワーク全体で広告を遮断するツールで、フィルター、DNSの書き換え、クライアント、クエリのログを扱います。
cli-anything-anygen
58kエージェントが、AnyGenのサービスを使って、書かれたプロンプトからスライド、文書、ウェブサイト、図を生成できるようにします。
似ているスキル
add-model-provider
394k安全なセットアップコマンドで新しいAIモデルプロバイダーをOpenClawに接続し、APIキーを平文で残さず、ライブテストを行うようエージェントを支援します。
acp-router
394kClaude CodeやCursorなどのコーディングアシスタントに、OpenClaw経由でタスクを渡し、その作業がそのツール内で行われるようエージェントを支援します。
browser-automation
394kログイン、タブ、応答しなくなったページからの復旧を含め、Webページを段階的に操作するようエージェントに教えます。