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.
npx agentmods add commands/hkuds/cli-anything/cli-anything-refinegit clone --depth 1 https://github.com/HKUDS/CLI-AnythingWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00021 | $0.00507 |
| Opus 5 | $0.00010 | $0.00253 |
| Sonnet 5 | $0.00004 | $0.00101 |
| Haiku 4.5 | $0.00002 | $0.00051 |
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 3d 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.
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):
- Read
%USERPROFILE%\.cursor\cli-anything-generator.rootor~/.cursor/cli-anything-generator.root - Else
{default-or-$CURSOR_PLUGINS_HOME}/local/cli-anything/PLUGIN_ROOT.txt - Else that candidate directory if
references/HARNESS.mdexists - 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-anythingif 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
completedin the progress file. - Resume incomplete refine runs; do not remove existing commands unless the user requests a breaking change.
- Mark
terminal: truewhen 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
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.
- 3d ago First seen · 56 lines · 21 tokens per session scan A 2b79256982ba
cli-anything-refine is a command published in the GitHub repository HKUDS/CLI-Anything (48,809 stars, last pushed 12d ago), licensed Apache-2.0. It adds 21 tokens to every session and 507 once invoked, about $0.0001 per session on Opus 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.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.