Use when the user wants Reasonix to build, refine, test, or validate a CLI-Anything harness for a GUI application or source repository. Adapts the CLI-Anything
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-reasonix-skill-aac306942d71 ,按照其中的说明把「cli-anything」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Use this skill when the user wants Reasonix to act like the CLI-Anything builder.
Before implementation, use the full methodology source of truth when available:
CLI-Anything repository, read cli-anything-plugin/HARNESS.md.../cli-anything-plugin/HARNESS.md.cli-anything-plugin from https://github.com/HKUDS/CLI-Anything/tree/main/cli-anything-plugin, then use HARNESS.md and the resources around it from that folder.Accept either:
./gimp or /path/to/softwareDerive the software name from the local directory name after cloning if needed.
Reasonix agents build harnesses by combining these built-in tools:
| Reasonix Tool | Role in Harness Workflow |
|---|---|
bash | Run shell commands, install packages, execute CLI tools, run tests, clone repos |
write_file | Generate Python files (Click CLI, backend modules, tests, setup.py) |
edit_file | Make targeted edits to generated code (single replacement) |
multi_edit | Apply multiple atomic edits to a single file in one pass |
read_file | Read target software source files, existing harness code, test results |
grep | Search for patterns across the target software codebase (APIs, CLI tools, data models) |
glob | Find files matching patterns in the source tree (*.py, *.xml, *.json, etc.) |
ls | List directory contents to understand project structure |
mcp__codegraph__search / mcp__codegraph__context | Optional code graph analysis when CodeGraph is enabled (Reasonix strips the codegraph_ raw prefix, so the model-visible names omit it) |
web_fetch | Fetch documentation, API references, or remote files from the web |
Phase 1 (Analysis) — Use ls + glob to survey the source tree, grep to find API surfaces and CLI entry points, and read_file to inspect key files. When CodeGraph is enabled and its tools are available, use mcp__codegraph__search and mcp__codegraph__context for deeper symbol and architecture analysis.
Phase 2-3 (Design & Implementation) — Use write_file to create new harness files, edit_file / multi_edit to refine generated code, and bash to run pip install -e . for installation.
Phase 4-6 (Testing) — Use bash to run pytest and capture results, read_file to inspect test output, and write_file to update TEST.md.
Phase 7 (Packaging) — Use write_file for setup.py, bash for pip install -e . and which cli-anything-<software> verification.
A full harness build typically requires 25–40 tool-call rounds (architecture inspection, 10+ file writes, installation, and multiple test runs). When invoked via run_skill, the subagent inherits a step budget derived from the parent agent's agent.max_steps setting in reasonix.toml:
max_steps = 0 (the default, meaning unlimited), the subagent also runs with no step cap — this is the recommended configuration for the CLI-Anything workflow.max_steps is set to a finite value, the subagent receives half that budget (minimum 5), which may truncate a complex build before completion.Users who have configured a finite max_steps should ensure it is set to 0 or a sufficiently high value (e.g., 64 or more) before running a CLI-Anything build, so the subagent has enough rounds to complete all seven phases.
Use when the user wants a new harness.
Produce this structure:
<repo-root>/
├── skills/
│ └── cli-anything-<software>/
│ └── SKILL.md
└── <software>/
└── agent-harness/
├── <SOFTWARE>.md
├── setup.py
└── cli_anything/
└── <software>/
├── README.md
├── __init__.py
├── __main__.py
├── <software>_cli.py
├── core/
├── utils/
├── tests/
└── skills/
└── SKILL.md
Implement a stateful Click CLI with:
--json machine-readable outputUse when the harness already exists.
First inventory current commands and tests, then do gap analysis against the target software. Prefer:
Do not remove existing commands unless the user explicitly asks for a breaking change.
Plan tests before writing them. Keep both:
test_core.py for unit coveragetest_full_e2e.py for workflow and backend validationWhen possible, test the installed command via subprocess using cli-anything-<software> rather than only module imports.
Check that the harness:
cli_anything.<software> namespace package layoutsetup.py entry pointSKILL.md filesPrefer 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.
find_namespace_packages(include=["cli_anything.*"])cli_anything/ as a namespace package without a top-level __init__.pycli-anything-<software> through console_scriptscli_anything.<software>/skills/SKILL.md in package dataTEST.md, then tests, then run them.skills/cli-anything-<software>/SKILL.md and cli_anything/<software>/skills/SKILL.md.pip install -e .For an up-to-date list of supported harnesses and their backend patterns, locate registry.json at the CLI-Anything repository root when it is available.
When reporting progress or final results, include: