cli-anything skill
✓ VerifiedConverts command-line tools into structured JSON-emitting agent skills by introspecting help menus and defining output contracts.
- GitHub stars
- 631
- Files
- 1
- Last commit
- Nov 11, 2026
- License
- Apache-2.0
- Allowed tools
- —
What does the cli-anything skill do?
cli-anything converts command-line tools into structured JSON-emitting agent skills by introspecting help menus and defining output contracts.
Summary generated from the skill's SKILL.md.
About the cli-anything skill
Converting command-line tools into structured JSON-emitting agent skills is the primary function of this meta-skill. Developers use it when they possess a third-party binary or a custom CLI and need an AI agent to invoke it predictably. Instead of reimplementing logic, the process creates a SKILL.md wrapper that acts as a formal contract between the agent and the tool.
An agent should load this skill when tasked with wrapping a CLI or making a command agent-usable. The workflow involves running help commands to capture subcommands, flags, and positional arguments, then defining a machine-readable output contract. If a tool lacks a native JSON mode, the skill documents how to parse stdout instead of pretending the output is structured. It also maps exit codes to specific error meanings to ensure the agent can recover from failures. The final output is a verified SKILL.md file containing command purposes, exact invocations, result shapes, and real-world examples.
What an agent can do with it
- 1Transform a binary into an agent skillA developer can provide a command-line tool and ask the agent to generate a formal skill wrapper for it.
- 2Create structured output contractsYou can use this to define how an agent should read JSON keys or parse stdout from a CLI.
- 3Map CLI error codesAn agent can establish a system to translate non-zero exit codes into parseable error signals.
- 4Generate documented tool wrappersThe skill produces a SKILL.md file that includes command descriptions, arguments, and verified examples.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the cli-anything skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the cli-anything skill in Claude Code
~/.claude/skills/cli-anything/SKILL.md
$ npx degit coco-research/coco/skills/cli-anything ~/.claude/skills/cli-anythingInstall the cli-anything skill in Claude Code (project)
.claude/skills/cli-anything/SKILL.md
$ npx degit coco-research/coco/skills/cli-anything .claude/skills/cli-anythingInstall the cli-anything skill in Codex
~/.agents/skills/cli-anything/SKILL.md
$ npx degit coco-research/coco/skills/cli-anything ~/.agents/skills/cli-anythingInstall the cli-anything skill in Gemini CLI
~/.gemini/skills/cli-anything/SKILL.md
$ npx degit coco-research/coco/skills/cli-anything ~/.gemini/skills/cli-anythingInstall the cli-anything skill in Claude.ai
npx degit coco-research/coco/skills/cli-anything cli-anything && zip -r cli-anything.zip cli-anything # claude.ai → Customize → Skills → + → Create skill → Upload a skill → cli-anything.zip
Automated checks
Ran Nov 15, 2026Full report →Passed our automated checks. That is not a security audit: read the scripts before you let an agent run them. How checks work
- Source repository linked and reachablecoco-research/coco/skills/cli-anything is public and reachablegithub.com/coco-research/coco/tree/HEAD/skills/cli-anything ↗Pass
- Open source license (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗Pass
- Commit or release in the last yearLast commit 2026-11-11github.com/coco-research/coco/commits ↗Pass
- No download-and-run or credential theft in scriptsNo scripts in the skill folderPass
- No hidden instructions in SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/coco-research/coco/blob/HEAD/skills/cli-anything/ ↗Pass
- Pre-approved tools are scopedNo pre-approved tools; the agent asks before using onegithub.com/coco-research/coco/blob/HEAD/skills/cli-anything/ ↗Pass
- SKILL.md follows the Agent Skills formatValid name and description; says when to use it; 62 linesgithub.com/coco-research/coco/blob/HEAD/skills/cli-anything/ ↗Pass
SKILL.md
View on GitHubcli-anything: wrap any CLI into an agent skill
Turn any command-line tool into something an AI agent can call reliably and parse. The output is a thin, well-documented wrapper contract — never a reimplementation of the tool. Use the real tool; document how to drive it.
When to use
You have a CLI (your own, or a third-party binary) and you want an agent to invoke it predictably, read structured results, and recover from errors. This skill produces a SKILL.md wrapper that encodes that contract.
Step 1 — Introspect the CLI (do not guess)
Enumerate the real surface before writing anything:
- Run
<tool> --helpand<tool> <subcommand> --helpfor each subcommand. - Capture: subcommands, flags (required vs optional), positional args, exit codes, and the output format (human text vs structured).
- If
--helpis thin, read the source or man page. Every claim in the wrapper must trace to observed behavior.
Step 2 — Define the output contract
- Prefer a
--jsonmachine-readable mode for every command an agent will call. Document the exact JSON keys the agent should read (one shape per command). - If the tool has no JSON mode, say so honestly and document what to parse from stdout (and which token carries the answer). Do not pretend output is structured when it is not.
- Human output stays the default; structured output is the agent path.
Step 3 — Define the error contract
- Map exit codes to meaning (0 = success; document each non-zero class).
- On failure, surface a parseable signal (
{"error": "...", "code": N}if the tool supports it, otherwise the captured stderr) — never a bare stack trace. - Fail loud and parseable. Never half-succeed silently.
Step 4 — Write the SKILL.md wrapper
Standard structure so an agent can discover and drive the tool:
- Frontmatter:
name,description(include natural trigger phrases). Commands— each command: purpose, exact invocation, args, and the result shape it returns.Examples— 2-4 real invocations with expected output.Errors— the exit-code/error contract from Step 3.Notes— auth, side effects, idempotency, network egress, prerequisites.
Step 5 — Verify against reality
- Run each documented command once; confirm the real output matches what the wrapper claims.
- Confirm any
--jsonshape parses. - A wrapper that drifts from reality is worse than none — re-introspect and fix.
Principles
- Use the real tool; never reimplement its logic in the wrapper.
- Deterministic and structured beats clever.
- The wrapper is a contract: introspect, structure, document, verify.
Worked example
skills/coco-cli/SKILL.md is a wrapper produced with this pattern over the cocosuperintelligence command — note how it documents the (human-only) output contract honestly rather than inventing a JSON mode the tool lacks.
Files in this skill
1cli-anything skill questions
How do I install the cli-anything skill in Claude Code?
Run npx degit coco-research/coco/skills/cli-anything ~/.claude/skills/cli-anything. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the cli-anything skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
What is the main purpose of cli-anything?
It turns any command-line tool into a reliable, parseable skill for AI agents by creating a documented wrapper contract.
How should the skill handle tools that do not have a JSON output mode?
You should document what needs to be parsed from stdout and which token carries the answer, rather than pretending the output is structured.
Does this skill reimplement the logic of the command-line tool?
No, the skill produces a thin wrapper that documents how to drive the real tool without reimplementing its logic.