cli-anything-refine

cli-anything-refine is a command for Claude Code, Cursor from HKUDS/CLI-Anything. It costs 21 tokens per session (507 once invoked), scanned A, original, Apache-2.0.

A command that expands an existing CLI-Anything harness, which is a command-line interface for operating a piece of software through an agent.

In plain words
What is it for?
Use it with a local software directory to inspect its current coverage, add commands or modules, and create or update tests for a specific focus area.
Why use it?
It helps fill gaps when the current harness does not cover the software actions you need.

Command for Claude CodeCursor

Written for Cursor and Claude Code: shipped in a Cursor plugin, but also a Claude Code command (commands/*.md).

Part of the cli-anything plugin — 1 skill, 4 commands shipped together

Good fit Use it with a local software directory to inspect its current coverage, add commands or modules, and create or update tests for a specific focus area.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/hkuds/cli-anything/cli-anything-refine
About the project

CLI-Anything turns software and services into command-line interfaces that AI agents can use to perform tasks and produce artifacts. It is intended for people building or using agent workflows with tools such as coding assistants, design software, and other applications. The catalogue entries are skills, commands, a plugin, and a rule for working with CLI-Anything.

HKUDS/CLI-Anything · 68,193 stars · on GitHub · clianything.cc

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/HKUDS/CLI-Anything

Made for: Claude Code, Cursor.

Or install cli-anything, the plugin that ships this one along with the rest of its 1 skill, 4 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cli-anything-refine

README.md
[![agentmods](https://agentmods.dev/badge/commands/hkuds/cli-anything/cli-anything-refine/github.svg)](https://agentmods.dev/commands/hkuds/cli-anything/cli-anything-refine)
Your own site
<a href="https://agentmods.dev/commands/hkuds/cli-anything/cli-anything-refine"><img src="https://agentmods.dev/badge/commands/hkuds/cli-anything/cli-anything-refine/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cli-anything-refine

Your own site · 80×15
<a href="https://agentmods.dev/commands/hkuds/cli-anything/cli-anything-refine"><img src="https://agentmods.dev/badge/commands/hkuds/cli-anything/cli-anything-refine.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 507 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00021 $0.00507
Opus 5.5 $0.00008 $0.00203
Sonnet 5.5 $0.00004 $0.00101
Haiku 4.5 $0.00002 $0.00051

Measured 3mo ago against content hash 2b79256982ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cli-anything-refine scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

cursor-plugin/commands/cli-anything-refine.md · 56 lines

How it starts

The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.

cli-anything-refine Command

Refine an existing CLI harness after a successful /cli-anything build.

Target software: first argument (local path required). Focus area: optional second argument / trailing natural-language focus.

CRITICAL: Resolve PLUGIN_ROOT (absolute paths only)

Resolve PLUGIN_ROOT in this order (first hit with references/HARNESS.md wins):

  1. Read %USERPROFILE%\.cursor\cli-anything-generator.root or ~/.cursor/cli-anything-generator.root
  2. Else {default-or-$CURSOR_PLUGINS_HOME}/local/cli-anything/PLUGIN_ROOT.txt
  3. Else that candidate directory if references/HARNESS.md exists
  4. Else workspace / cloned cli-anything-plugin/

Then read {PLUGIN_ROOT}/references/HARNESS.md and {PLUGIN_ROOT}/references/commands/refine.md with absolute paths.

Cursor Tool Bindings

Cursor tool Role
Read / Grep / Glob Inventory current CLI coverage and target APIs
Shell Run existing tests; verify new commands
Write / StrReplace Add commands, modules, and tests

Arguments

  • Local software path only (same tree used for the original build). Clone first with /cli-anything if needed.
  • Optional focus area narrows gap analysis (e.g. "picture-in-picture features").

Phase Gates and Resume (hard gate)

Progress: {software-root}/agent-harness/.cli-anything-progress.json with "mode": "refine".

  • Steps: inventory → capability scan → gap analysis → implement → test → document.
  • Do not advance a step until the previous is completed in the progress file.
  • Resume incomplete refine runs; do not remove existing commands unless the user requests a breaking change.
  • Mark terminal: true when refine completes or is permanently aborted.

Refine checklist

  • Inventory current commands/tests before coding
  • Prefer high-impact gaps and thin wrappers around real backend APIs
  • Add matching unit/E2E coverage for every new command surface
  • Keep HARNESS packaging and --json / REPL standards

Read the full file on GitHub · 56 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 56 lines · 21 tokens per session scan A 2b79256982ba

Subscribe to this mod's changes

cli-anything-refine is a command published in the GitHub repository HKUDS/CLI-Anything (68,193 stars, last pushed 10d ago), licensed Apache-2.0. It adds 21 tokens to every session and 507 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

cli-anything-refine compared with commands from other repositories

cli-anything-refine next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cli-anything-refineHKUDS/CLI-AnythingCommand68k10d agoApache-2.0A21Claude Code, Cursor
checklistgithub/spec-kitCommand153k3d agoMITA13Claude Code
clarifygithub/spec-kitCommand153k3d agoMITA27Claude Code
analyzegithub/spec-kitCommand153k3d agoMITA26Claude Code
specifygithub/spec-kitCommand153k3d agoMITA13Claude Code
convergegithub/spec-kitCommand153k3d agoMITA35Claude Code
implementgithub/spec-kitCommand153k3d agoMITA14Claude Code