
MacroCLI Harness Builder
Builds a CLI-Anything harness that automates GUI apps via macros, file edits, and vision-driven steps
- Repository
- HKUDS/CLI-Anything
- Stars
- 58,084
- Licence
- Apache-2.0
- Files
- 15 files
What it does
This skill teaches an AI agent to build, refine, test, or validate a command-line wrapper (a 'harness') around a desktop app or source repository, following the CLI-Anything methodology. The included macrocli harness is a macro runner: it executes recorded steps that can drive a GUI app with hotkeys or clicks, edit project files (XML, JSON, text), or ask a vision model to decide actions on screen. Part of the package is a set of backends that can call an OpenAI-compatible API for screen-based steps.
Great for
- Developers who want an AI agent to generate a CLI wrapper for a GUI application
- Teams automating repetitive steps in desktop tools that lack scripting interfaces
- Maintainers reviewing or extending the macrocli harness code
Skip it if
- Non-technical users expecting a ready-to-use app: the skill generates and edits code rather than doing the task itself
- Running macros against sensitive desktops or accounts without review: GUI and vision-driven backends act on the live screen and can click or type unexpectedly
- Environments where sending screenshots to a third-party model API is not permitted
Try asking
- “Build a CLI-Anything harness for this GIMP source folder”
- “Refine the existing macrocli harness by adding missing commands and running its tests”
- “Create a test plan and test_core.py for a new harness, then run pip install -e to verify it”
- “Validate that a harness has a working setup.py entry point and JSON output”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 15 original files, the Apache-2.0 licence and an attribution note.
macrocli.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip macrocli.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip macrocli.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Review generated harness code and test results before running any GUI or vision macro on a real machine
- Keep API keys in environment variables rather than in macro YAML files, and check which screenshots are sent to the model provider
- Start with dry-run mode and file_transform steps to confirm macros behave before enabling GUI automation
What's inside
- agent-harness/cli_anything/macrocli/__init__.py
- agent-harness/cli_anything/macrocli/__main__.py
- agent-harness/cli_anything/macrocli/backends/__init__.py
- agent-harness/cli_anything/macrocli/backends/base.py
- agent-harness/cli_anything/macrocli/backends/file_transform.py
- agent-harness/cli_anything/macrocli/backends/gui_agent.py
- agent-harness/cli_anything/macrocli/backends/gui_macro.py
- agent-harness/cli_anything/macrocli/backends/native_api.py
- agent-harness/cli_anything/macrocli/backends/recovery.py
- agent-harness/cli_anything/macrocli/backends/semantic_ui.py
- agent-harness/cli_anything/macrocli/README.md
- agent-harness/cli_anything/macrocli/skills/SKILL.md
- agent-harness/DEMO.md
- agent-harness/MACROCLI.md
- SKILL.md
Redistributed unmodified from HKUDS/CLI-Anything under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.