Skip to content

Guide · Agent skill

How to use the MacroCLI Harness Builder agent skill (cli-anything)

Updated · written with AI from the project's own documentation and checked against our catalogue data

The cli-anything skill is an agent skill (a folder with a SKILL.md file that tells an AI agent how to do a specific job) for building, refining, testing and validating a command-line wrapper, called a harness, around a desktop app or source repository. It follows the CLI-Anything methodology and is published under the Apache-2.0 licence. This guide explains what the skill makes the agent do, how to install it, how to ask for it in natural language, and what to check before running the resulting macros.

MacroCLI Harness BuilderHKUDS/CLI-Anything · Apache-2.0

Quick start

  1. 1Download and unzip the skill. Download the skill ZIP from this page and unzip it. The result should be a folder containing SKILL.md.
  2. 2Place it where your agent can read it. Move the folder to ~/.claude/skills/ for personal use, or to a project's .claude/skills/ folder. Alternatively, upload it under Settings → Capabilities → Skills in the Claude apps.
  3. 3Install the macrocli dependencies. Run pip install -e . from the agent-harness folder, adding the [gui_agent] or [visual] extras only if you need them.
  4. 4Set model environment variables. For the gui_agent backend, set MACROCLI_MODEL and MACROCLI_API_KEY, and MACROCLI_BASE_URL if you use a non-OpenAI provider.
  5. 5Ask for a specific mode. Request Build, Refine, Test or Validate and give the source path or GitHub URL.
  6. 6Review the output. Check the files added or changed, the validation commands run and the listed risks before running any macro.

What the skill makes the agent do

The skill tells the agent how to work in four modes: Build (create a new harness), Refine (extend an existing one by first inventorying current commands and tests), Test (plan tests before writing them) and Validate (check the harness structure).

A harness generated this way is a stateful Click CLI with one-shot subcommands, a REPL mode that runs when no subcommand is given, a --json output option, and session undo/redo where the target software supports it. The skill prefers wrapping the real software's executable or scripting interface over reimplementing it.

  • Inputs: a local source path such as ./gimp or /path/to/software, or a GitHub repository URL.
  • Output structure: an agent-harness/ folder containing cli_anything/<software>/ as a namespace package with setup.py and tests.
  • The skill edits and generates code. It does not perform the underlying GUI task for you.

Install the skill from the ZIP

Download the ZIP for this skill from this page and unzip it. To make it available to Claude Code for all your projects, place the unzipped skill folder in ~/.claude/skills/. To limit it to a single project, place it in that project's .claude/skills/ folder.

In the Claude apps you can instead upload the skill under Settings → Capabilities → Skills.

  • Personal install: ~/.claude/skills/
  • Project install: <your-project>/.claude/skills/
  • Claude apps: Settings → Capabilities → Skills (upload)

Prepare the macrocli harness environment

The skill can generate code, but running the included macrocli harness needs Python and its packages. The project README lists Python 3.10+, PyYAML, click and prompt-toolkit as dependencies, installed from the agent-harness folder with an editable install.

The gui_agent backend additionally needs the OpenAI SDK and an API key. Configure it with environment variables.

  • Python 3.10 or newer, with PyYAML, click and prompt-toolkit
  • Install from the agent-harness folder: pip install -e .
  • Optional extras: pip install -e ".[visual]" (visual_anchor), pip install -e ".[gui_agent]" (gui_agent), or pip install -e ".[all]"
  • MACROCLI_MODEL: model name, required (example given in the source: gpt-4o)
  • MACROCLI_API_KEY: API key for the gui_agent backend
  • MACROCLI_BASE_URL: optional, for non-OpenAI providers
cd macrocli/agent-harness pip install -e .

Trigger the skill with natural requests

You do not need special syntax. Describe the outcome you want in plain language and name the application or repository. The skill's description covers requests to build, refine, test or validate a harness for a GUI application or source repository.

Be specific about the source and the mode. Giving a path or URL lets the agent acquire the source tree itself.

  • "Build a CLI-Anything harness for ./gimp."
  • "Build a harness for https://github.com/owner/repo and wrap its scripting interface."
  • "Refine the existing harness for /path/to/software; first list the current commands and tests, then suggest gaps."
  • "Validate the harness in ./gedit-harness: check the namespace layout, entry point, JSON output and REPL default."
  • "Plan and write tests for the harness, including a subprocess test of cli-anything-<software>."

Understand what macrocli does once built

The included macrocli harness runs macros. A macro is a recorded set of steps that can drive a GUI app with hotkeys or clicks, edit project files such as XML, JSON or text, or ask a vision model to choose actions on screen. Agents call macro run <name> and the runtime routes the work to a suitable backend.

Quick-start commands from the bundled skill for agents begin with listing macros in JSON form, as shown below.

  • Backends include native plugin, file transform, semantic UI and compiled GUI replay; gui_agent calls an OpenAI-compatible API for screen-based steps.
  • Start with a read-only command such as listing macros before running anything.
cli-anything-macrocli macro list --json

Safety: scripts, network and live screens

This skill runs scripts and uses the network. The gui_agent and vision-driven backends act on the live screen and can click or type unexpectedly, and screenshots are sent to the configured model API when that backend is used. Do not run macros against sensitive desktops or accounts without reviewing them first, and do not use screen-based backends where sending screenshots to a third-party API is not permitted.

Review generated code before running it, especially code that touches files or the network.

  • Test macros on a disposable desktop or virtual display first; the project's DEMO.md documents a setup using Xvfb and noVNC on a Linux server.
  • Keep API keys in environment variables rather than in files you share.
  • Check the backend choice for each macro before running it.

Tips for good results

Give the agent a real source path or repository and say which mode you want. The skill asks it to read a HARNESS.md methodology file when the skill is used inside the CLI-Anything repository, and to fall back to its condensed rules otherwise.

Ask for --json output and tests so the harness is usable by other agents and scripts. Keep existing commands intact when refining, since the skill avoids removing commands unless you explicitly request a breaking change.

  • Name the mode (Build, Refine, Test, Validate) in your request.
  • Ask the agent to report files changed, validation commands run and open risks.
  • Verify a new harness locally with pip install -e .

What people use it for

  • Generating a CLI wrapper for a GUI application that lacks a scripting interface.
  • Adding missing commands to an existing harness without removing current ones.
  • Writing unit and end-to-end tests for a harness and checking the installed cli-anything-<software> command.
  • Automating repetitive steps in a desktop tool through recorded macros, after review.
  • Reviewing or extending the macrocli harness code.

Frequently asked questions

What is the cli-anything agent skill?

It is an agent skill that teaches an AI agent to build, refine, test or validate a CLI-Anything harness, which is a command-line wrapper around a GUI application or source repository. It adapts the CLI-Anything methodology to OpenClaw without changing the generated Python harness format.

How do I install the cli-anything skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. In the Claude apps you can upload it under Settings → Capabilities → Skills.

What do I need to run the macrocli harness?

The project README lists Python 3.10+, PyYAML, click and prompt-toolkit, installed with pip install -e from the agent-harness folder. The gui_agent backend also needs the OpenAI SDK, MACROCLI_MODEL and MACROCLI_API_KEY, with an optional MACROCLI_BASE_URL.

Is the cli-anything skill free to use?

The skill is published under the Apache-2.0 licence. Check the licence file in the source repository for the full terms; this page does not cover pricing or any paid services a model provider may charge for API use.

Does the skill run code or use the internet?

Yes. The skill runs scripts and uses the network. The gui_agent backend can send screenshots to an OpenAI-compatible API, so review that behaviour before using it on sensitive screens.

How does this compare with other ways of automating a GUI app?

The source describes macrocli as a layered tool that routes macros to native plugins, file transforms, semantic UI control or compiled GUI replay, and uses vision only for the gui_agent backend. If your app has its own scripting interface, the skill prefers wrapping that real interface over reimplementation. Choose a different tool if you need a ready-made application rather than generated code.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you are a developer who wants an AI agent to generate, extend or test a command-line wrapper around a GUI app or repository, and you are comfortable reviewing generated code. Pick something else if you need a ready-to-use automation product, or if screenshots cannot be sent to a third-party model API.

Download the skill