cli-to-plugin

cli-to-plugin is a command for Claude Code from fakoli/fakoli-plugins. It costs 12 tokens per session (4,102 once invoked), scanned A, original, MIT.

A generator that turns a command-line program into a self-contained Claude Code plugin. It reads the program's --help output and creates skills for groups of commands.

In plain words
What is it for?
Use it to inspect a CLI's command tree, generate a plugin into a chosen folder, load a saved help tree, or regenerate an existing plugin.
Why use it?
It removes much of the manual work needed to document a CLI and package its commands for use by a coding agent.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions .claude-plugin; names the AskUserQuestion tool; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the cli-to-plugin plugin — 1 skill, 1 command shipped together

Good fit Use it to inspect a CLI's command tree, generate a plugin into a chosen folder, load a saved help tree, or regenerate an existing plugin.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add fakoli/fakoli-plugins
Claude Code
/plugin install cli-to-plugin

Made for: Claude Code.

Or install cli-to-plugin, the plugin that ships this one along with the rest of its 1 skill, 1 command.

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-to-plugin

README.md
[![agentmods](https://agentmods.dev/badge/commands/fakoli/fakoli-plugins/cli-to-plugin/github.svg)](https://agentmods.dev/commands/fakoli/fakoli-plugins/cli-to-plugin)
Your own site
<a href="https://agentmods.dev/commands/fakoli/fakoli-plugins/cli-to-plugin"><img src="https://agentmods.dev/badge/commands/fakoli/fakoli-plugins/cli-to-plugin/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-to-plugin

Your own site · 80×15
<a href="https://agentmods.dev/commands/fakoli/fakoli-plugins/cli-to-plugin"><img src="https://agentmods.dev/badge/commands/fakoli/fakoli-plugins/cli-to-plugin.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,102 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. ✓ AI security review Sonnet 5 · 7 Sept 2026 📄 Read the review
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.00012 $0.04102
Opus 5.5 $0.00005 $0.01641
Sonnet 5.5 $0.00002 $0.00820
Haiku 4.5 $0.00001 $0.00410

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

Security

Grade A, and why

cli-to-plugin 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.

plugins/cli-to-plugin/commands/cli-to-plugin.md · 445 lines

How it starts

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

cli-to-plugin

Convert a CLI tool into a Claude Code plugin by walking its --help tree, generating one skill per command group, and (optionally) proposing workflow meta-skills for the user to curate.

Full spec in the marketplace repository: docs/specs/2026-05-24-cli-to-plugin.md

Argument parsing

Parse the invocation before doing anything else:

  • <cli-name> — required; the binary to introspect (e.g., gh, kubectl)
  • --out <path> — destination directory for the generated plugin; default: ./plugins/<cli-name>
  • --override <path> — YAML override file; optional
  • --from-tree <path> — load a pre-captured help-tree JSON instead of running discovery
  • --no-meta-skills — skip Steps 5, 6, and 7 entirely
  • --regen — hint that regeneration is expected (triggers the regeneration flow automatically without prompting twice)
  • --max-depth <n> — max recursion depth for discover.py (default 3); forwarded as --max-depth to the script
  • --max-commands <n> — halt discovery if the walked command count exceeds this (default 500); forwarded as --max-commands to the script

Treat unrecognised flags as an error: halt and print usage.


Pre-Step-0 — Override file validation

If --override <path> is set, verify the file exists and parses as YAML before running any other step. This runs regardless of --from-tree, so a broken override file fails fast.

test -f "$OVERRIDE_PATH" || { echo "HALT: override file not found: $OVERRIDE_PATH"; exit 1; }
uv run --with pyyaml -c "import yaml, sys; yaml.safe_load(open(sys.argv[1]))" -- "$OVERRIDE_PATH"

Passing the path via sys.argv rather than interpolating it inside the Python string protects against paths containing single quotes (e.g., /tmp/it's-here.yaml).

On failure: halt with the parse error.


Step 0 — Regeneration guard

Skip this step entirely when --out does not exist or is empty.

When --out exists and is non-empty:

  • If --regen was passed: set REGEN_MODE=diff-merge automatically and skip the prompt. Proceed to Step 1.
  • If --regen was NOT passed: ask the user:

Read the full file on GitHub · 445 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 · 445 lines · 12 tokens per session scan E 95fb07607feb

Subscribe to this mod's changes

cli-to-plugin is a command published in the GitHub repository fakoli/fakoli-plugins (4 stars, last pushed yesterday), licensed MIT. It adds 12 tokens to every session and 4,102 once invoked, about $0.0000 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-31.

Related

cli-to-plugin compared with commands from other repositories

cli-to-plugin next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cli-to-pluginfakoli/fakoli-pluginsCommand4yesterdayMITA12Claude Code
psalmMarcel-Bich/marcel-bich-claude-marketplaceCommand12yesterdayMITA10Claude Code
versioningMarcel-Bich/marcel-bich-claude-marketplaceCommand12yesterdayMITA13Claude Code
watchMarcel-Bich/marcel-bich-claude-marketplaceCommand12yesterdayMITA11Claude Code
updateMarcel-Bich/marcel-bich-claude-marketplaceCommand12yesterdayMITA5Claude Code
spawnMarcel-Bich/marcel-bich-claude-marketplaceCommand12yesterdayMITA11Claude Code
explainMarcel-Bich/marcel-bich-claude-marketplaceCommand12yesterdayMITA16Claude Code