Chuyển đến nội dung
Skillpedia
Lập trình chung58k · #3239

cli-anything

Skill này làm gì

Skill này hướng dẫn agent AI tạo giao diện dòng lệnh cho một chương trình thường chạy bằng nút bấm và cửa sổ. Skill dành cho lập trình viên muốn agent của họ tự xây dựng các công cụ như vậy.

Khi nào nên dùng

  • ✓Khi bạn muốn agent tạo một phiên bản dòng lệnh của ứng dụng máy tính bạn đang dùng.
  • ✓Khi bạn có một dự án mã nguồn và muốn xây dựng công cụ dòng lệnh cho nó.
  • ✓Khi bạn muốn kiểm thử và kiểm tra một công cụ dòng lệnh do agent đã xây dựng.

Liên kết skill

https://github.com/HKUDS/CLI-Anything/blob/main/reasonix-skill/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/HKUDS/CLI-Anything/blob/main/reasonix-skill/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tôi muốn xây dựng một công cụ dòng lệnh cho trình chỉnh sửa ảnh GIMP để agent của tôi có thể dùng.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent đọc hướng dẫn phương pháp, nghiên cứu ứng dụng hoặc kho mã, rồi viết mã Python cho công cụ, bao gồm cả các bài kiểm thử. Sau đó agent kiểm tra xem công cụ có hoạt động đúng không.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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 the current workspace is the CLI-Anything repository, read cli-anything-plugin/HARNESS.md.
  2. If Reasonix is running from this adapter directory, also check ../cli-anything-plugin/HARNESS.md.
  3. If neither local file is available, 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.
  4. Only if local and network retrieval both 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__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

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, 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.

Step Budget

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:

  • If 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.
  • If 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.

Modes

Build

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:

  • one-shot subcommands
  • REPL mode as the default when no subcommand is given
  • --json machine-readable output
  • session state
Câu hỏi thường gặp

Phương pháp này đến từ đâu?

Skill trỏ đến file HARNESS.md trong dự án CLI-Anything, có thể lấy từ bản sao cục bộ hoặc từ GitHub.

Nó có cần Reasonix để chạy không?

Skill được viết như một bộ chuyển đổi cho Reasonix, môi trường agent mà nó chạy trong.

Nó chỉ dùng cho ứng dụng đồ họa à?

Không. Đầu vào có thể là một đường dẫn mã nguồn cục bộ hoặc một kho GitHub, nên nó cũng dùng được với các dự án mã.

Chi tiết

Mô tả gốc của tác giả

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.

repo: HKUDS/CLI-Anything

Độ phổ biến

Sao GitHub
58k
Vị trí xếp hạng
#3239
Giấy phép
Apache-2.0
Cập nhật
21/9/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự