feat: add Reasonix agent skill adapter

Add a new agent adapter for the Reasonix coding agent, following the
same pattern as the existing Codex and Hermes skill adapters.

New files:
- reasonix-skill/SKILL.md — full CLI-Anything methodology mapped to
  Reasonix's tool ecosystem (bash, write_file, edit_file, multi_edit,
  grep, glob, mcp__codegraph__*, task, web_fetch)
- reasonix-skill/agents/reasonix.yaml — agent interface metadata
- reasonix-skill/scripts/install.sh — macOS/Linux installer
- reasonix-skill/scripts/install.ps1 — Windows PowerShell installer
- reasonix-skill/README.md — installation and usage documentation
- reasonix-skill/REASONIX_SKILL_INSTALL.md — install_skill API reference

Modified files:
- .gitignore — allow reasonix-skill/ directory
- README.md — add Reasonix to supported agent list, project structure,
  quick-start prerequisites, and Works with line
This commit is contained in:
PaysNatal
2026-06-06 00:28:46 +08:00
parent f23e051a05
commit c900dceacf
8 changed files with 383 additions and 2 deletions
+1
View File
@@ -34,6 +34,7 @@
!/cli-anything-plugin/
!/codex-skill/
!/hermes-skill/
!/reasonix-skill/
!/skill_generation/
!/openclaw-skill/
!/cli-hub-meta-skill/
+47 -2
View File
@@ -236,7 +236,7 @@ Give SKILL-compatible agents the CLI-Hub meta-skill so they can discover and ins
npx skills add HKUDS/CLI-Anything --skill cli-hub-meta-skill -g -y
```
**Works with:** OpenClaw, Nanobot, Claude Code, Codex, Antigravity, and other SKILL-compatible agents.
**Works with:** OpenClaw, Nanobot, Claude Code, Codex, Reasonix, Antigravity, and other SKILL-compatible agents.
Then prompt:
@@ -255,7 +255,7 @@ Use the CLI-Anything generator when you need a new harness for software, a codeb
- **Python 3.10+**
- Target software or source repo available locally or online
- A supported AI coding agent: [Claude Code](#-claude-code) | [Pi](#-pi-coding-agent) | [OpenClaw](#-openclaw) | [OpenCode](#-opencode) | [Codex](#-codex) | [Hermes](#-hermes) | [Qodercli](#-qodercli) | [GitHub Copilot CLI](#-github-copilot-cli) | [More Platforms](#-more-platforms-coming-soon)
- A supported AI coding agent: [Claude Code](#-claude-code) | [Pi](#-pi-coding-agent) | [OpenClaw](#-openclaw) | [OpenCode](#-opencode) | [Codex](#-codex) | [Hermes](#-hermes) | [Reasonix](#-reasonix) | [Qodercli](#-qodercli) | [GitHub Copilot CLI](#-github-copilot-cli) | [More Platforms](#-more-platforms-coming-soon)
### Pick Your Agent Platform
@@ -615,6 +615,50 @@ keeping the generated Python harness format unchanged.
<details>
<summary><h4 id="-reasonix">⚡ Reasonix <sup><code>Experimental</code></sup> <sup><code>Community</code></sup></h4></summary>
**Step 1: Install the Skill**
Run the bundled installer:
```bash
# Clone the repo
git clone https://github.com/HKUDS/CLI-Anything.git
# Install the skill
bash CLI-Anything/reasonix-skill/scripts/install.sh
```
On Windows PowerShell, use:
```powershell
.\CLI-Anything\reasonix-skill\scripts\install.ps1
```
This installs the skill to `$REASONIX_HOME/skills/cli-anything` (or `~/.reasonix/skills/cli-anything` if `REASONIX_HOME` is unset).
Alternatively, Reasonix users can install directly via the `install_skill` API — see [`reasonix-skill/REASONIX_SKILL_INSTALL.md`](reasonix-skill/REASONIX_SKILL_INSTALL.md).
Restart Reasonix after installation so it is discovered.
**Step 2: Use CLI-Anything from Reasonix**
Describe the task in natural language, for example:
```text
Use CLI-Anything to build a harness for ./gimp
Use CLI-Anything to refine ./shotcut for picture-in-picture workflows
Use CLI-Anything to validate ./libreoffice
```
The Reasonix skill adapts the same methodology used by the Claude Code plugin and
Codex/Hermes skills, binding Reasonix's `bash`, `write_file`, `edit_file`,
`multi_edit`, `grep`, `glob`, `mcp__codegraph__*`, and `task` tools to the
7-phase harness workflow while keeping the generated Python harness format unchanged.
</details>
<details>
<summary><h4 id="-github-copilot-cli">⚡ GitHub Copilot CLI <sup><code>Community</code></sup></h4></summary>
**Step 1: Install the Plugin**
@@ -1340,6 +1384,7 @@ cli-anything/
├── 🤖 codex-skill/ # Codex skill entry point
├── 🧭 hermes-skill/ # Hermes Agent skill entry point
├── 🧠 reasonix-skill/ # Reasonix skill entry point
├── 🎨 gimp/agent-harness/ # GIMP CLI (107 tests)
├── 🧊 blender/agent-harness/ # Blender CLI (208 tests)
├── ✏️ inkscape/agent-harness/ # Inkscape CLI (202 tests)
+120
View File
@@ -0,0 +1,120 @@
# CLI-Anything for Reasonix
An adapter that brings the [CLI-Anything](https://github.com/HKUDS/CLI-Anything) harness methodology to the [Reasonix](https://reasonix.ai) coding agent.
CLI-Anything (42.1k+ stars) is a methodology for making **any GUI software agent-native** by generating stateful CLI harnesses with REPL mode, JSON output, undo/redo, and comprehensive tests. This adapter lets Reasonix act as the builder agent.
## Installation
### Option 1: One-liner via Reasonix Skill API (Recommended)
If you have a running Reasonix session, just ask:
> "Install the cli-anything skill"
Or programmatically, Reasonix's `install_skill` will place the skill at `~/.reasonix/skills/cli-anything.md`.
### Option 2: Shell Install Script
**macOS / Linux:**
```bash
git clone https://github.com/HKUDS/CLI-Anything.git
cd CLI-Anything/reasonix-skill
./scripts/install.sh
```
**Windows (PowerShell):**
```powershell
git clone https://github.com/HKUDS/CLI-Anything.git
cd CLI-Anything\reasonix-skill
.\scripts\install.ps1
```
Both scripts copy the skill to `$REASONIX_HOME/skills/cli-anything` (defaults to `~/.reasonix/skills/cli-anything`).
## Usage
After installation, invoke the skill in any Reasonix session:
```
/cli-anything https://github.com/GNOME/gimp
```
Or via the `run_skill` API:
```
run_skill({ name: "cli-anything", arguments: "/path/to/software" })
```
### What It Does
The skill spawns an isolated Reasonix sub-agent that follows the CLI-Anything 7-phase methodology:
1. **Codebase Analysis** — Surveys the target software's architecture, data model, and API surface
2. **CLI Architecture Design** — Designs command groups, state model, and output formats
3. **Implementation** — Generates a Click-based Python CLI with REPL, JSON output, and session state
4. **Test Planning** — Creates TEST.md with comprehensive test plan
5. **Test Implementation** — Writes unit tests and E2E tests with real backend invocation
6. **Test Documentation** — Runs all tests and documents results
7. **PyPI Packaging** — Creates setup.py and verifies `pip install -e .`
### Example
```bash
# Build a CLI for GIMP from local source
/cli-anything /home/user/gimp
# Build from a GitHub repo
/cli-anything https://github.com/blender/blender
# Refine an existing harness
/cli-anything:refine /home/user/gimp "batch processing and Script-Fu filters"
```
## Reasonix Tool Mapping
| CLI-Anything Need | Reasonix Tool |
|-------------------|---------------|
| Shell execution | `bash` |
| File generation | `write_file` |
| Code editing | `edit_file` / `multi_edit` |
| Source reading | `read_file` |
| Codebase search | `grep` / `glob` / `ls` |
| Architecture analysis | `mcp__codegraph__*` |
| Parallel subtasks | `task` |
| Documentation fetch | `web_fetch` |
## File Structure
```
reasonix-skill/
├── SKILL.md # Main skill document (methodology + tool bindings)
├── README.md # This file
├── REASONIX_SKILL_INSTALL.md # install_skill API usage reference
├── agents/
│ └── reasonix.yaml # Agent interface metadata
└── scripts/
├── install.sh # macOS/Linux installer
└── install.ps1 # Windows installer
```
## How It Compares to Other Agent Adapters
| Feature | Claude Code | Codex | Hermes | **Reasonix** |
|---------|------------|-------|--------|-------------|
| Skill format | `.claude-plugin/` | `SKILL.md` + YAML | `SKILL.md` + YAML | `SKILL.md` + YAML |
| Shell | `bash` | `terminal` | `terminal` | `bash` |
| File ops | native | `execute_code` | `execute_code` / `write_file` | `write_file` / `edit_file` / `multi_edit` |
| Code analysis | file reads | file reads | file reads | `mcp__codegraph__*` (symbol graph) |
| Parallelism | — | — | `delegate_task` | `task` (sub-agents) |
| Install method | `/plugin install` | `install.sh``$CODEX_HOME/skills/` | `install.sh``$HERMES_HOME/skills/` | `install_skill` API or `install.sh``~/.reasonix/skills/` |
## Contributing
This adapter follows the same contribution pattern as the Codex and Hermes adapters. See [CONTRIBUTING.md](../CONTRIBUTING.md) in the CLI-Anything repository.
## License
Apache License 2.0 — same as CLI-Anything.
+18
View File
@@ -0,0 +1,18 @@
# CLI-Anything for Reasonix — Native Skill Definition
This file can be installed directly into Reasonix via the `install_skill` tool:
```
install_skill({
name: "cli-anything",
description: "Build, refine, test, or validate a CLI-Anything harness for any GUI application or source repository.",
body: "<contents of SKILL.md>",
runAs: "subagent",
scope: "global"
})
```
When run as a subagent, the skill spawns an isolated Reasonix sub-agent that
has access to all standard tools (bash, read_file, write_file, edit_file, etc.)
and follows the CLI-Anything 7-phase methodology without polluting the parent
session's context.
+146
View File
@@ -0,0 +1,146 @@
---
name: cli-anything
description: 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 methodology to Reasonix without changing the generated Python harness format.
---
# CLI-Anything for Reasonix
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:
1. If this skill is being used from inside the `CLI-Anything` repository, read `../cli-anything-plugin/HARNESS.md` first.
2. If that local file is unavailable, clone or download `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.
3. Only if both local and network retrieval fail, 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.
## Reasonix Tool Bindings
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__*` | Code graph analysis — symbol search, definition lookup, call tracing, and codebase exploration for deeper architectural understanding |
| `task` | Parallelize analysis or generation subtasks by spawning isolated sub-agents |
| `web_fetch` | Fetch documentation, API references, or remote files from the web |
### Recommended Workflow with Reasonix Tools
**Phase 1 (Analysis)** — Use `ls` + `glob` to survey the source tree, `grep` to find API surfaces and CLI entry points, `mcp__codegraph__codegraph_search` and `mcp__codegraph__codegraph_context` for deeper symbol/architecture analysis, and `read_file` to inspect key files.
**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.
## 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.
### 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 (clone or use existing path).
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 .`
## Existing Harnesses (Reference)
For an up-to-date list of supported harnesses and their backend patterns, see [`registry.json`](../registry.json) at the repository root.
## 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
+4
View File
@@ -0,0 +1,4 @@
interface:
display_name: "CLI-Anything"
short_description: "Build, refine, test, or validate a CLI-Anything harness for a GUI application or source repository from Reasonix."
default_prompt: "Use CLI-Anything to build, refine, test, or validate a harness for the user's target software or source repository."
+26
View File
@@ -0,0 +1,26 @@
$ErrorActionPreference = "Stop"
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$skillDir = Split-Path -Parent $scriptDir
$reasonixHome = if ($env:REASONIX_HOME) {
$env:REASONIX_HOME
} elseif ($env:USERPROFILE) {
Join-Path $env:USERPROFILE ".reasonix"
} else {
throw "REASONIX_HOME is not set and USERPROFILE is unavailable."
}
$destRoot = Join-Path $reasonixHome "skills"
$destDir = Join-Path $destRoot "cli-anything"
New-Item -ItemType Directory -Path $destRoot -Force | Out-Null
if (Test-Path $destDir) {
Write-Error "Refusing to overwrite existing skill: $destDir`nRemove it manually if you want to reinstall."
}
Copy-Item -Path $skillDir -Destination $destDir -Recurse
Write-Host "Installed Reasonix skill to: $destDir"
Write-Host "Restart Reasonix to pick up the new skill."
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SKILL_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
DEST_ROOT="${REASONIX_HOME:-$HOME/.reasonix}/skills"
DEST_DIR="${DEST_ROOT}/cli-anything"
mkdir -p "${DEST_ROOT}"
if [[ -e "${DEST_DIR}" ]]; then
echo "Refusing to overwrite existing skill: ${DEST_DIR}" >&2
echo "Remove it manually if you want to reinstall." >&2
exit 1
fi
cp -R "${SKILL_DIR}" "${DEST_DIR}"
echo "Installed Reasonix skill to: ${DEST_DIR}"
echo "Restart Reasonix to pick up the new skill."