cli-anything-macrocli
できること
このスキルは、AIエージェントが、入力を設定できる保存済みワークフローであるGUIマクロを一覧表示、確認、実行できるようにします。定型のアプリ作業を、確実なコマンドで実行したい人向けです。
使う場面
- ✓保存されたデスクトップのワークフローを、特定の設定で実行させたいとき。
- ✓どのマクロが存在し、それぞれどんな入力を取るかを確認したいとき。
- ✓ワークフローが何をするかを、変更を加えずに先に確認したいとき。
スキルのリンク
https://github.com/HKUDS/CLI-Anything/blob/main/macrocli/agent-harness/cli_anything/macrocli/skills/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Q3のレポートに対してエクスポートマクロを実行し、結果をドキュメントフォルダに保存してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、マクロ名と入力を指定して1つのコマンドを呼び出し、各手順をどう実行するかはシステムが選びます。ドライランを使うと、先に手順を表示できます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
MacroCLI CLI
What It Is
The MacroCLI converts valuable GUI workflows into parameterized, CLI-callable macros. Agents never touch the GUI directly — they call macros through this stable CLI, and the runtime routes execution to the best available backend (native plugin/API, file transformation, semantic UI control, or precompiled GUI macro replay).
Installation
cd macrocli/agent-harness
pip install -e .
Requirements: Python 3.10+, PyYAML, click, prompt-toolkit.
Quick Start (for agents)
# 1. See what macros are available
cli-anything-macrocli macro list --json
# 2. Inspect a macro's parameters
cli-anything-macrocli macro info export_file --json
# 3. Dry-run to check params without side effects
cli-anything-macrocli --dry-run macro run export_file \
--param output=/tmp/test.txt --json
# 4. Execute a macro
cli-anything-macrocli macro run export_file \
--param output=/tmp/result.txt --json
# 5. See what backends are available
cli-anything-macrocli backends --json
Command Reference
Global Flags
| Flag | Description |
|---|---|
--json |
Machine-readable JSON output on stdout |
--dry-run |
Simulate all steps, skip side effects |
--session-id <id> |
Resume or create a named session |
macro group
| Command | Description |
|---|---|
macro list |
List all available macros |
macro info <name> |
Show macro schema (parameters, steps, conditions) |
macro run <name> --param k=v |
Execute a macro |
macro dry-run <name> --param k=v |
Simulate without side effects |
macro validate [name] |
Structural validation |
macro define <name> |
Scaffold a new macro YAML |
session group
| Command | Description |
|---|---|
session status |
Show session statistics |
session history |
Show recent run history |
session save |
Persist session to disk |
session list |
List all saved sessions |
backends
cli-anything-macrocli backends --json
# Shows: native_api, file_transform, semantic_ui, gui_macro, recovery
# and whether each is available in the current environment.
Macro Parameters
Pass parameters with --param key=value. Repeat for multiple:
cli-anything-macrocli macro run transform_json \
--param file=/path/to/data.json \
--param key=settings.theme \
--param value=dark \
--json
Output Format (--json)
All commands output JSON when --json is set:
{
"success": true,
"macro_name": "export_file",
"output": {
"exported_file": "/tmp/result.txt"
},
"error": "",
"telemetry": {
"duration_ms": 312,
"steps_total": 2,
"steps_run": 2,
"backends_used": ["native_api"],
"dry_run": false
}
}
On failure ("success": false), read the "error" field for the reason.
Exit code is 1 on failure.
Execution Backends
Backends are selected automatically based on the macro step definition:
| Backend | Triggered by | Use case |
|---|---|---|
native_api |
backend: native_api |
Subprocess / shell command |
file_transform |
backend: file_transform |
XML, JSON, text file editing |
semantic_ui |
backend: semantic_ui |
Accessibility / keyboard shortcuts |
gui_macro |
backend: gui_macro |
Precompiled coordinate replay |
recovery |
backend: recovery |
Retry / fallback orchestration |
Writing Macros
Macros are YAML files in cli_anything/macrocli/macro_definitions/.
Scaffold one with:
cli-anything-macrocli macro define my_macro --output \
cli_anything/macrocli/macro_definitions/examples/my_macro.yaml
Minimal schema:
name: my_macro
version: "1.0"
description: What this macro does.
parameters:
output:
type: string
required: true
description: Where to write results.
example: /tmp/result.txt
preconditions:
- file_exists: /path/to/input
steps:
- id: step1
backend: native_api
action: run_command
params:
command: [my-app, --export, "${output}"]
timeout_ms: 30000
on_failure: fail # or: skip, continue
postconditions:
- file_exists: ${output}
- file_size_gt: [${output}, 100]
outputs:
- name: result_file
path: ${output}
agent_hints:
danger_level: safe # safe | moderate | dangerous
side_effects: [creates_file]
reversible: true
Agent Usage Rules
- Always use
--jsonfor programmatic output. - Use
--dry-runto validate params
よくある質問
エージェントはアプリの画面を自分でクリックして操作するのですか?
いいえ。スキルによると、エージェントは安定したコマンドラインからマクロを呼び出し、各手順の実行方法はランタイムが選びます。
変更が起きる前にマクロをテストできますか?
はい。手順をシミュレートし、副作用を省くドライランオプションがあると説明されています。
使うには何をインストールする必要がありますか?
Python 3.10以降と、ハーネスのフォルダからインストールするいくつかのPythonパッケージが必要です。
詳細
作者による元の説明
Use when the agent wants to define, list, inspect, or execute GUI macros via the MacroCLI CLI. Macros are parameterized, CLI-callable workflows — the agent invokes `macro run <name>` and the system handles backend routing (plugin, file transform, accessibility, compiled GUI replay).
repo: HKUDS/CLI-Anything
人気
- GitHubのスター
- 58k
- ランキング
- #3221
- ライセンス
- 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のサービスを使って、書かれたプロンプトからスライド、文書、ウェブサイト、図を生成できるようにします。