agent-desktop-linux
できること
このスキルは、Linuxのデスクトップでアプリを自動操作するためのガイドを、アシスタントに提供します。表示システムごとに何が動くかも含みます。Linux上でエージェントにアプリを読んだりクリックさせたりしたい人向けです。
使う場面
- ✓Ubuntuのデスクトップでアプリをアシスタントに読ませたり、クリックさせたりしたいとき。
- ✓Linuxの自動化コマンドがアプリを表示しない、またはアクセシビリティバスが正しく動いていないと思われるとき。
- ✓X11とWaylandのどちらでどのコマンドが動くかを知りたいとき。
スキルのリンク
https://github.com/NanmiCoder/cc-haha/blob/main/native/agent-desktop/skills/agent-desktop-linux/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のUbuntuデスクトップで開いているウィンドウを読んで、ファイルマネージャーに何があるか教えてもらえますか。”
毎週5つの新しいスキル。1分で読めます。
仕組み
ガイドは、必要なデスクトップ設定(アクセシビリティバスなど)を説明し、X11とWaylandで動くコマンドを一覧にします。アシスタントは、その手順に従ってアプリのコントロールを見たり、操作したりします。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
agent-desktop-linux
The observe-act loop, refs, JSON envelope, sessions and tracing match every platform. This file covers only what differs on Linux.
Needs Ubuntu 24.04+ (x86_64 or aarch64), a graphical session of the signed-in
user and a running AT-SPI bus. Other distributions need the at-spi2-core bridge
fix dc0dc33; Ubuntu 22.04's bridge aborts on Action.GetActions. The archive
loader floor is glibc 2.35. Run the CLI inside the target apps' desktop session:
the session bus, display and runtime directory come from its environment. A TTY
login, an SSH shell without session variables, a container without a bus or
another user's session sees no apps. GNOME is the measured desktop; X11 and
Wayland sessions both work and differ in input, capture and window control.
Observation and semantic actions need no helper tool.
Capability Table
| Group | Commands | Status on Linux |
|---|---|---|
| Observation | snapshot, find, get, is |
Works on X11 and Wayland through AT-SPI. Supports window, sheet, alert and menu; GNOME adds shell surfaces. Virtual tray getters have limits; see the shell reference and check status |
| Surfaces | list-surfaces |
Lists an app's windows, sheets and open menus; shell reads use snapshot --surface |
| Ref interaction | click, right-click, type, set-value, clear, select, toggle, check, uncheck, expand, collapse, scroll-to |
Need a readable live identity and the required AT-SPI capability. See the shell reference for menu-ref resolution limits; X11 headed fallback also needs usable geometry and does not bypass identity checks |
| Wheel scrolling | scroll, mouse-wheel |
Physical wheel input; X11 and --headed only |
| Pointer gestures | double-click, triple-click, hover, drag |
--headed, X11 only. On Wayland the pointer cannot be aimed and these refuse with ACTION_NOT_SUPPORTED |
| Focus | focus |
Needs --headed for the focus permission. Calls AT-SPI Component.GrabFocus on a focusable node that is not yet focused, not the pointer, and verifies the state; a GTK4 app rejects the call, so focus ends ACTION_FAILED grab_focus_rejected there and focus-window is the way to focus its window |
| Keyboard and mouse | press, mouse-click, mouse-move, mouse-wheel |
press and text keys work on X11 and capability-detected Mutter Wayland sessions; pointer commands are X11 and --headed. See references/display-servers-and-input.md |
| Held input | key-down, key-up, mouse-down, mouse-up |
Fail closed on every platform: on Linux, key-down and key-up with ACTION_NOT_SUPPORTED; mouse-down and mouse-up with POLICY_DENIED headless and ACTION_NOT_SUPPORTED with --headed |
| App and window | launch, close-app, list-windows, list-apps, focus-window, move-window, resize-window, minimize, maximize, restore |
Launch and listing work on X11 and Wayland; focus-window requires X11. Other window control and graceful close need an X11 client. See references/windows-and-lifecycle.md |
| Displays | list-displays |
Works |
| Capture | screenshot |
X11: a window without permission; a display only under a non-compositing manager. Wayland: portal consent, with display cropping. No selector returns the primary display. See references/capture-and-clipboard.md |
| Clipboard | clipboard-get, clipboard-set, clipboard-clear |
Works; text, images and file lists. Wayland needs wl-clipboard |
| Wait | wait |
Works for ms, --element, --window, --text, --menu, --menu-closed, --event. Menu waits share the menu-surface detector; --notification waits for a new notification on GNOME |
| Notifications | list-notifications, dismiss-notification, dismiss-all-notifications, notification-action |
GNOME Shell only; list headless, mutations --headed on X11, and dismiss-notification and notification-action also need --expected-app or --expected-title. Fields are read from the shell's widget layout, verified on GNOME Shell 46.0 only, and each mutation is proven by its effect. Wayland refuses the shell pointer before input. A notification owner that is not the shell or its own helper returns PLATFORM_NOT_SUPPORTED. See the shell reference |
| Shell surfaces | open-system-surface |
Only system-tray and action-center can work. system-tray needs a StatusNotifierWatcher (else it refuses with watcher: absent); action-center needs proven |
よくある質問
動かすために必要なものは?
サインインしたユーザーのグラフィカルなセッションと、動作しているアクセシビリティバスです。検証済みの環境はUbuntu 24.04以降です。
アプリが表示されないのはなぜですか?
通常のターミナルや別のユーザーのセッションから実行すると、デスクトップアプリが見えないことがあります。対象のセッションで実行してください。
Waylandでも同じように動きますか?
必ずしもそうではありません。入力、キャプチャ、ウィンドウ制御はX11とWaylandで異なります。
詳細
作者による元の説明
Linux platform guide for the agent-desktop CLI. Lists per command group what works on X11 and on Wayland, how to check the AT-SPI accessibility bus, the first-contact gotchas (app names, Chromium and Electron flags, headed focus, blocked key combos), and where to find lifecycle, screenshot, clipboard, tray, notification and troubleshooting details. Triggers on: "linux desktop automation", "AT-SPI tree", "automate GNOME app", "agent-desktop on Linux", "accessibility bus not available", "empty supported_surfaces", "wayland screenshot consent", or any Linux GUI interaction task.
repo: NanmiCoder/cc-haha
人気
- GitHubのスター
- 15k
- ランキング
- #10914
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
agent-desktop-ffi
15k開発者が、Python、Swift、Node、Go、C++から、コマンドラインツールを毎回起動せずに、デスクトップ自動化ライブラリを直接呼び出せるよう手助けします。
agent-desktop-macos
15kエージェントがMacのアプリを自動操作する方法を示します。必要な権限の付与、メニューやダイアログの操作、ChromiumやElectronのアプリへの対応を含みます。
agent-desktop-windows
15kエージェントがWindowsのアプリを自動操作する方法を示します。動くもの、PowerShellでの引用符、最小化されたウィンドウ、昇格されたアプリの制限を扱います。
agent-desktop
15kアクセシビリティツリーを読み、クリック、入力、結果の確認を行うことで、エージェントがMac、Windows、Linux上のデスクトップアプリを操作できるようにします。
似ているスキル
add-model-provider
394k安全なセットアップコマンドで新しいAIモデルプロバイダーをOpenClawに接続し、APIキーを平文で残さず、ライブテストを行うようエージェントを支援します。
acp-router
394kClaude CodeやCursorなどのコーディングアシスタントに、OpenClaw経由でタスクを渡し、その作業がそのツール内で行われるようエージェントを支援します。
browser-automation
394kログイン、タブ、応答しなくなったページからの復旧を含め、Webページを段階的に操作するようエージェントに教えます。