Agent skill

CLI-Anything Harness Builder

by HKUDS in HKUDS/CLI-Anything

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.

Apache-2.0Auto-check passedDevelopment

Install CLI-Anything Harness Builder

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

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

GitHub CLI
$ gh skill install HKUDS/CLI-Anything cli-anything --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/macrocli .claude/skills/cli-anything && 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
GitHub stars
52k
Token cost
~839 tokens
SKILL.md length
369 words
Files
44
Skills in repo
78
Repo updated
First seen
Licence
Apache-2.0

At a glance

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.

  • Works in 7 steps: Acquire the source tree locally. → Analyze architecture, data model,… → Design command groups and state model. → …
  • Wrapping a GUI application as a scriptable command-line harness
  • SKILL.md covers Inputs, Modes, Backend Rules and Packaging Rules, plus 2 more sections
  • Runs Python scripts from its folder; calls pip

What it does

The skill adapts the CLI-Anything methodology to OpenClaw without changing the generated Python harness format. It accepts a local source path or a GitHub repository URL and derives the software's name from its directory. Four modes cover the lifecycle: Build produces a new agent-harness folder with a stateful Click CLI offering one-shot subcommands, a REPL default when no subcommand is given, --json output and undo and redo where the target software supports it.

Refine inventories existing commands and tests, then does gap analysis against the target software, preferring high-impact missing features and wrappers that compose with existing commands, and never removes commands unless a breaking change is requested. Test plans tests before writing them, keeping test_core.py for unit coverage and test_full_e2e.py for workflow checks, preferring to invoke the installed command through subprocess rather than only module imports. Validate checks the namespace package layout, an installable entry point, JSON output, the REPL default and documentation.

Backend rules prefer wrapping the real software's executable or scripting interface over reimplementing it, and packaging rules keep cli_anything as a namespace package exposing a cli-anything-<software> console script. If the skill runs inside the CLI-Anything repository itself, it reads HARNESS.md as the full methodology source of truth before falling back to the condensed rules.

When your agent uses it

  • Wrapping a GUI application as a scriptable command-line harness
  • Adding missing commands to an existing CLI-Anything harness
  • Writing unit and end-to-end tests for a generated harness
  • Validating that a harness follows the CLI-Anything packaging layout

Example prompts

  • “Build a CLI-Anything harness for the GIMP installation at ./gimp.”
  • “Refine the existing harness for this repo to add the missing export command.”
  • “Validate that my harness follows the cli_anything namespace package layout.”

Requirements

  • Python, for the generated Click-based harness

Workflow steps

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

  1. Acquire the source tree locally.
  2. Analyze architecture, data model, existing CLIs, and GUI-to-API mappings.
  3. Design command groups and state model.
  4. Implement the harness.
  5. Write TEST.md, then tests, then run them.
  6. Update README usage docs.
  7. Verify local installation with pip install -e .

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

    Ships script files (Python, from the files we listed), which the agent can run.

    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

CLI-Anything Harness Builder loads about 839 tokens when it runs. Until then it costs about 63 tokens; SKILL.md has 369 words of instructions outside code blocks.

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

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). 369 words, ~839 tokens.

Download SKILL.mdSave it as .claude/skills/cli-anything/SKILL.md (or your agent's skills folder). This skill also uses 43 other files; get the full folder from GitHub.
name
cli-anything
description
Use when the user wants OpenClaw to build, refine, test, or validate a CLI-Anything harness for a GUI application or source repository. Adapts the CLI-Anything methodology to OpenClaw without changing the generated Python harness format.

CLI-Anything for OpenClaw

Use this skill when the user wants OpenClaw to act like the CLI-Anything builder.

If this skill is being used from inside the CLI-Anything repository, read ../cli-anything-plugin/HARNESS.md before implementation. That file is the full methodology source of truth. If it is not available, follow the condensed rules below.

Inputs

Accept either:

  • A local source path such as ./gimp or /path/to/software
  • A GitHub repository URL

Derive the software name from the local directory name after cloning if needed.

Modes

Build

Use when the user wants a new harness.

Produce this structure:

text
<software>/
└── agent-harness/
    ├── <SOFTWARE>.md
    ├── setup.py
    └── cli_anything/
        └── <software>/
            ├── README.md
            ├── __init__.py
            ├── __main__.py
            ├── <software>_cli.py
            ├── core/
            ├── utils/
            └── tests/

Implement a stateful Click CLI with:

  • one-shot subcommands
  • REPL mode as the default when no subcommand is given
  • --json machine-readable output
  • session state with undo/redo where the target software supports it
Refine

Use when the harness already exists.

First inventory current commands and tests, then do gap analysis against the target software. Prefer:

  • high-impact missing features
  • easy wrappers around existing backend APIs or CLIs
  • additions that compose well with existing commands

Do not remove existing commands unless the user explicitly asks for a breaking change.

Test

Plan tests before writing them. Keep both:

  • test_core.py for unit coverage
  • test_full_e2e.py for workflow and backend validation

When possible, test the installed command via subprocess using cli-anything-<software> rather than only module imports.

Show full SKILL.md (158 more words)Show less
Validate

Check that the harness:

  • uses the cli_anything.<software> namespace package layout
  • has an installable setup.py entry point
  • supports JSON output
  • has a REPL default path
  • documents usage and tests

Backend Rules

Prefer the real software backend over reimplementation. Wrap the actual executable or scripting interface in utils/<software>_backend.py when possible. Use synthetic reimplementation only when the project explicitly requires it or no viable native backend exists.

Packaging Rules

  • Use find_namespace_packages(include=["cli_anything.*"])
  • Keep cli_anything/ as a namespace package without a top-level __init__.py
  • Expose cli-anything-<software> through console_scripts

Workflow

  1. Acquire the source tree locally.
  2. Analyze architecture, data model, existing CLIs, and GUI-to-API mappings.
  3. Design command groups and state model.
  4. Implement the harness.
  5. Write TEST.md, then tests, then run them.
  6. Update README usage docs.
  7. Verify local installation with pip install -e .

Output Expectations

When reporting progress or final results, include:

  • target software and source path
  • files added or changed
  • validation commands run
  • open risks or backend limitations

© 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

SKILL.md and 43 other files in macrocli of HKUDS/CLI-Anything.

  • SKILL.md
  • agent-harness/DEMO.md
  • agent-harness/MACROCLI.md
  • agent-harness/cli_anything/macrocli/README.md
  • 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/backends/visual_anchor.py
  • agent-harness/cli_anything/macrocli/core/__init__.py
  • … and 28 more

Open the folder on GitHubat commit 34f5195

Compare with similar skills

CLI-Anything Harness Builder 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.

CLI-Anything Harness Builder compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
CLI-Anything Harness Builder this skillHKUDS/CLI-Anything52k—~839Automated safety check: PassApache-2.0
Langgraph Testing Evaluationsoba-labs/langchain-agent-skills107—~2.3kAutomated safety check: PassMIT
Mirage VFS Adapter Authoringstrukto-ai/mirage3.7k—~2.5kAutomated safety check: PassApache-2.0
README and DESIGN Generatorfengshao1227/ccg-workflow5.9k—~410Automated safety check: NotesMIT
Project Scaffolderpretend1111/claude-desktop-app4941 repos~498Automated safety check: PassCustom licence
Compare Codegenhw-native-sys/pypto126—~1.4kAutomated safety check: PassCustom licence

Similar skills

  • Langgraph Testing Evaluation

    soba-labs/langchain-agent-skills

    A skill your agent uses when you need to test or evaluate LangGraph/LangChain agents: writing unit or integration tests, generating test scaffolds, mocking LLM/tool behavior, running trajectory…

    107 GitHub stars~2.3k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Builds or extends a custom Mirage virtual filesystem adapter for an API, database, object store or app data, with a working mount configuration and filesystem tests.

    3.7k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed
  • README and DESIGN Generator

    fengshao1227/ccg-workflow

    Generates README.md and DESIGN.md skeletons for a module by scanning its structure with a Node script, then lists what to fill in by hand.

    5.9k GitHub stars~410 tokensUpdated 23 days ago
    DevelopmentAuto-check: notes
  • Project Scaffolder

    pretend1111/claude-desktop-app

    Scaffolds a complete, runnable project from scratch, covering web, Python and Node.js projects, with a working entry point and no placeholder code.

    494 GitHub starsUsed in 1 repo~498 tokens
    DevelopmentAuto-check passed
  • Compare Codegen

    hw-native-sys/pypto

    Compare codegen output (.pto files and pass dumps) between origin/main and the current branch for a given test case.

    126 GitHub stars~1.4k tokensUpdated 8 days ago
    DevelopmentAuto-check passed
  • Core PR Helper

    calimero-network/core

    Suggests one appropriate branch name and a PR description in the project template (title, Description, Test plan, Documentation update) for Calimero core.

    171 GitHub stars~614 tokensUpdated yesterday
    DevelopmentAuto-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 16 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 16 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 16 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 16 days ago
    Auto-check passed
  • MacroCLI GUI Macros

    HKUDS/CLI-Anything

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

    52k GitHub stars~1.4k tokensUpdated 16 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 16 days ago
    Auto-check passed

Works with

Categories

Questions about CLI-Anything Harness Builder

What does CLI-Anything Harness Builder do?

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. The skill adapts the CLI-Anything methodology to OpenClaw without changing the generated Python harness format. It accepts a local source path or a GitHub repository URL and derives the software's name from its directory.

When should I use CLI-Anything Harness Builder?

CLI-Anything Harness Builder fits situations like: wrapping a GUI application as a scriptable command-line harness; adding missing commands to an existing CLI-Anything harness; writing unit and end-to-end tests for a generated harness; validating that a harness follows the CLI-Anything packaging layout.

How do I install CLI-Anything Harness Builder in Claude Code?

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

How do I install CLI-Anything Harness Builder in Codex?

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

Can I use CLI-Anything Harness Builder 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 -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, .gemini/skills/cli-anything, .github/skills/cli-anything and .opencode/skills/cli-anything in your project.

What does CLI-Anything Harness Builder need to run?

Going by SKILL.md and its folder, CLI-Anything Harness Builder needs Python for the scripts in its folder and the command-line tools its instructions call (pip). Our summary lists: Python, for the generated Click-based harness.

Does CLI-Anything Harness Builder 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 CLI-Anything Harness Builder 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 CLI-Anything Harness Builder use?

CLI-Anything Harness Builder 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 CLI-Anything Harness Builder use?

About 839 tokens (SKILL.md is roughly 3.4k 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 CLI-Anything Harness Builder?

Skills that share tags, products or a category with CLI-Anything Harness Builder: Langgraph Testing Evaluation (soba-labs/langchain-agent-skills, 107 stars), Mirage VFS Adapter Authoring (strukto-ai/mirage, 3.7k stars), README and DESIGN Generator (fengshao1227/ccg-workflow, 5.9k stars) and Project Scaffolder (pretend1111/claude-desktop-app, 494 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains CLI-Anything Harness Builder?

HKUDS (a GitHub organization) maintains it in HKUDS/CLI-Anything, which has 51,696 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.