Agent skill

MacroCLI GUI Macros

by HKUDS in HKUDS/CLI-Anything

Defines, lists, inspects and runs parameterized GUI macros from the command line, with the runtime choosing the execution backend.

Apache-2.0Auto-check passedProductivity & Automation

Install MacroCLI GUI Macros

skills CLI
$ npx skills add HKUDS/CLI-Anything --skill cli-anything-macrocli -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HKUDS/CLI-Anything cli-anything-macrocli --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HKUDS/CLI-Anything.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cli-anything-macrocli .claude/skills/cli-anything-macrocli && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cli-anything-macrocli
GitHub stars
52k
Token cost
~1.4k tokens
SKILL.md length
333 words
Files
1
Skills in repo
78
Repo updated
First seen
Licence
Apache-2.0

At a glance

Defines, lists, inspects and runs parameterized GUI macros from the command line, with the runtime choosing the execution backend.

  • Works in 6 steps: Always use --json for programmatic output. → Use --dry-run to validate params before… → Check success field — do not assume… → …
  • Running a saved GUI workflow as a parameterized command
  • SKILL.md covers What It Is, Installation, Quick Start (for agents) and Command Reference, plus 7 more sections
  • Calls pip

What it does

MacroCLI turns valuable GUI workflows into parameterized macros that agents call from a command line instead of touching the GUI. The agent runs macro run with a macro name and key=value parameters, and the runtime picks the backend: a native plugin or API, a file transformation, semantic UI control or a precompiled GUI macro replay.

Commands cover listing macros, showing a macro's schema, running, dry-running and validating macros, and scaffolding a new macro YAML with macro define. Session commands show status and history and save or list sessions. Global flags give JSON output, a dry-run mode that skips side effects and a named session id, and a backends command reports which backends are available. On failure the JSON has success set to false with an error field, and the exit code is 1.

When your agent uses it

  • Running a saved GUI workflow as a parameterized command
  • Listing and inspecting the macros available in an environment
  • Dry-running a macro to check its steps without side effects
  • Defining a new macro as a YAML file

Example prompts

  • “List the available macros with JSON output and show the schema for the export one.”
  • “Dry-run the transform_json macro on ./data/settings.json before running it for real.”
  • “Scaffold a new macro called export_report and validate it.”

Requirements

  • Python 3.10 or newer with PyYAML, click and prompt-toolkit
  • The cli-anything-macrocli package installed from the agent-harness folder

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Always use --json for programmatic output.
  2. Use --dry-run to validate params before executing side-effectful macros.
  3. Check success field — do not assume success from exit code alone.
  4. Read error field when success is false — it explains what failed.
  5. Use macro info to discover params before calling macro run.
  6. Use absolute paths for all file parameters.

What it can do on your machine

Read from SKILL.md and the folder at commit 34f5195. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

MacroCLI GUI Macros loads about 1.4k tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 333 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~76
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HKUDS/CLI-Anything at commit 34f5195, republished under its Apache-2.0 licence (© HKUDS). 333 words, ~1,433 tokens.

Download SKILL.mdSave it as .claude/skills/cli-anything-macrocli/SKILL.md (or your agent's skills folder).
name
cli-anything-macrocli
description
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).

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

bash
cd macrocli/agent-harness
pip install -e .

Requirements: Python 3.10+, PyYAML, click, prompt-toolkit.

Quick Start (for agents)

bash
# 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
FlagDescription
--jsonMachine-readable JSON output on stdout
--dry-runSimulate all steps, skip side effects
--session-id <id>Resume or create a named session
macro group
CommandDescription
macro listList all available macros
macro info <name>Show macro schema (parameters, steps, conditions)
macro run <name> --param k=vExecute a macro
macro dry-run <name> --param k=vSimulate without side effects
macro validate [name]Structural validation
macro define <name>Scaffold a new macro YAML
session group
CommandDescription
session statusShow session statistics
session historyShow recent run history
session savePersist session to disk
session listList all saved sessions
backends
bash
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:

bash
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:

json
{
  "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:

BackendTriggered byUse case
native_apibackend: native_apiSubprocess / shell command
file_transformbackend: file_transformXML, JSON, text file editing
semantic_uibackend: semantic_uiAccessibility / keyboard shortcuts
gui_macrobackend: gui_macroPrecompiled coordinate replay
recoverybackend: recoveryRetry / fallback orchestration

Writing Macros

Macros are YAML files in cli_anything/macrocli/macro_definitions/. Scaffold one with:

bash
cli-anything-macrocli macro define my_macro --output \
    cli_anything/macrocli/macro_definitions/examples/my_macro.yaml

Minimal schema:

yaml
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

  1. Always use --json for programmatic output.
  2. Use --dry-run to validate params before executing side-effectful macros.
  3. Check success field — do not assume success from exit code alone.
  4. Read error field when success is false — it explains what failed.
  5. Use macro info <name> to discover params before calling macro run.
  6. Use absolute paths for all file parameters.

Example Workflow

bash
# Step 1: What's available?
cli-anything-macrocli macro list --json

# Step 2: What params does transform_json need?
cli-anything-macrocli macro info transform_json --json

# Step 3: Test safely
cli-anything-macrocli --dry-run macro run transform_json \
    --param file=/tmp/config.json \
    --param key=theme \
    --param value=dark --json

# Step 4: Execute for real
cli-anything-macrocli macro run transform_json \
    --param file=/tmp/config.json \
    --param key=theme \
    --param value=dark --json

Version

1.0.0

© HKUDS, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/cli-anything-macrocli of HKUDS/CLI-Anything.

Open the folder on GitHubat commit 34f5195

Compare with similar skills

MacroCLI GUI Macros next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

MacroCLI GUI Macros compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
MacroCLI GUI Macros this skillHKUDS/CLI-Anything52k—~1.4kAutomated safety check: PassApache-2.0
MoviePilot Downloader Operationjxxghp/MoviePilot12k—~4.4kAutomated safety check: PassGPL-3.0
Skyvern Browser AutomationSkyvern-AI/skyvern23k—~1.9kAutomated safety check: PassAGPL-3.0
Robocorp Automationrobocorp/robocorp653—~2.4kAutomated safety check: PassApache-2.0
Native Python in n8n Code Nodesczlonkowski/n8n-skills6.4k—~2.8kAutomated safety check: PassMIT
n8n Custom Code Tool Guideczlonkowski/n8n-skills6.4k—~4kAutomated safety check: PassMIT

Similar skills

  • Inspects, diagnoses and directly controls qBittorrent, Transmission or rTorrent downloaders configured in MoviePilot through a bundled Python helper.

    12k GitHub stars~4.4k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Skyvern Browser Automation

    Skyvern-AI/skyvern

    Automates websites with Skyvern's AI browser agent to fill forms, extract data, download files, log in and run multi-step workflows through SDKs, REST, MCP or a CLI.

    23k GitHub stars~1.9k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Robocorp Automation

    robocorp/robocorp

    Bootstrap from an empty folder or build, debug, locally run, and validate Python automations built with Robocorp or Sema4.ai tooling, robocorp.tasks, rcc, robocorp-browser, and RPA Framework.

    653 GitHub stars~2.4k tokensUpdated 6 days ago
    Productivity & AutomationAuto-check passed
  • Native Python in n8n Code Nodes

    czlonkowski/n8n-skills

    Explains how to write native Python in n8n Code nodes, including the two input variables, blocked imports and fixes for common errors.

    6.4k GitHub stars~2.8k tokensUpdated 21 days ago
    Productivity & AutomationAuto-check passed
  • n8n Custom Code Tool Guide

    czlonkowski/n8n-skills

    Explains the n8n Custom Code Tool's actual runtime contract so an AI-agent-callable tool doesn't get written like a regular workflow Code node.

    6.4k GitHub stars~4k tokensUpdated 21 days ago
    Productivity & AutomationAuto-check passed
  • UiPath Project Generator

    marcelocruzrpa/uipath-ai-skills

    Generates UiPath Studio projects, REFramework scaffolds, XAML workflows and expressions through 104 deterministic Python generators instead of hand-written XAML.

    108 GitHub stars~6.9k tokensUpdated 2 mo ago
    Productivity & AutomationAuto-check passed

More from HKUDS/CLI-Anything

All 78 skills in this repo
  • CLI-Anything for Codex

    HKUDS/CLI-Anything

    Lets Codex build, refine, test, validate and list CLI-Anything harnesses for GUI applications or source repositories, following the project's full methodology.

    52k GitHub stars~1.5k tokensUpdated 15 days ago
    Auto-check passed
  • CLI-Anything for Reasonix

    HKUDS/CLI-Anything

    Adapts the CLI-Anything methodology so Reasonix can build, refine, test and validate a command-line harness for an existing GUI application or source repository.

    52k GitHub stars~1.8k tokensUpdated 15 days ago
    Auto-check passed
  • Guides Hermes Agent through building, refining and testing a CLI-Anything harness that wraps a GUI application or source repository in a scriptable command line.

    52k GitHub stars~1.1k tokensUpdated 15 days ago
    Auto-check passed
  • Builds, refines, tests or validates a CLI-Anything harness that wraps a GUI application or source repository as a stateful Click CLI with JSON output and a REPL mode.

    52k GitHub stars~839 tokensUpdated 15 days ago
    Auto-check passed
  • Krita CLI Harness

    HKUDS/CLI-Anything

    Drives Krita from the command line to create projects, add layers, apply filters, resize the canvas and export images, with JSON output for agents.

    52k GitHub stars~931 tokensUpdated 15 days ago
    Auto-check passed
  • Capability-based matrix for video production in which the agent picks a provider per capability, from storyboard and sound design to captions, render checks and packaging.

    52k GitHub stars~12k tokensUpdated 15 days ago
    Auto-check passed

Works with

Questions about MacroCLI GUI Macros

What does MacroCLI GUI Macros do?

Defines, lists, inspects and runs parameterized GUI macros from the command line, with the runtime choosing the execution backend. MacroCLI turns valuable GUI workflows into parameterized macros that agents call from a command line instead of touching the GUI. The agent runs macro run with a macro name and key=value parameters, and the runtime picks the backend: a native plugin or API, a file transformation, semantic UI control or a precompiled GUI macro replay.

When should I use MacroCLI GUI Macros?

MacroCLI GUI Macros fits situations like: running a saved GUI workflow as a parameterized command; listing and inspecting the macros available in an environment; dry-running a macro to check its steps without side effects; defining a new macro as a YAML file.

How do I install MacroCLI GUI Macros in Claude Code?

Run `npx skills add HKUDS/CLI-Anything --skill cli-anything-macrocli -a claude-code`. Or copy the skill folder (skills/cli-anything-macrocli in HKUDS/CLI-Anything) into .claude/skills/cli-anything-macrocli in your project. Claude Code loads it when a task matches its description.

How do I install MacroCLI GUI Macros in Codex?

Run `npx skills add HKUDS/CLI-Anything --skill cli-anything-macrocli -a codex`. Or copy the skill folder (skills/cli-anything-macrocli in HKUDS/CLI-Anything) into .agents/skills/cli-anything-macrocli in your project. Codex loads it when a task matches its description.

Can I use MacroCLI GUI Macros in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HKUDS/CLI-Anything --skill cli-anything-macrocli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cli-anything-macrocli, .gemini/skills/cli-anything-macrocli, .github/skills/cli-anything-macrocli and .opencode/skills/cli-anything-macrocli in your project.

What does MacroCLI GUI Macros need to run?

Going by SKILL.md and its folder, MacroCLI GUI Macros needs the command-line tools its instructions call (pip). Our summary lists: Python 3.10 or newer with PyYAML, click and prompt-toolkit; The cli-anything-macrocli package installed from the agent-harness folder.

Does MacroCLI GUI Macros access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is MacroCLI GUI Macros safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does MacroCLI GUI Macros use?

MacroCLI GUI Macros is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does MacroCLI GUI Macros use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to MacroCLI GUI Macros?

Skills that share tags, products or a category with MacroCLI GUI Macros: MoviePilot Downloader Operation (jxxghp/MoviePilot, 12k stars), Skyvern Browser Automation (Skyvern-AI/skyvern, 23k stars), Robocorp Automation (robocorp/robocorp, 653 stars) and Native Python in n8n Code Nodes (czlonkowski/n8n-skills, 6.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains MacroCLI GUI Macros?

HKUDS (a GitHub organization) maintains it in HKUDS/CLI-Anything, which has 51,644 GitHub stars. The repository holds 78 skills in this directory. The repository was last updated on September 22, 2026.

Source: HKUDS/CLI-Anything on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.