Command Palette

Search for a command to run...

Назад к скиллам
скилл № 41391

cli-wrapper

Wraps any external CLI so the AI harness can invoke it without context bloat. Captures --help output, documents every subcommand/flag in a compact digest…

БесплатноБез исполняемых скриптов
Andersonlimahwот Andersonlimahw★ 19 звёзд на GitHub

Установить cli-wrapper в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

CLI Wrapper — Multi-Harness Ecosystem

Bridge between AI harness and external CLIs. Captures, documents, optimizes. Claude Code = single source of truth. Other CLIs = symlinks.

Ecosystem

claude (canonical) ← symlinks → codex, agy, opencode, gemini

All wrapper skills/agents live in Claude's space. Other harnesses access via symlink. Setup one command: /cli-wrapper:cli-wrapper-setup

Why

Raw CLI help output floods context. A single docker --help = ~3KB. Wrapped digest = ~300 bytes. 10x savings per invocation. Multiply by every CLI the harness calls.

Quick Start

/cli-wrapper:cli-wrapper-setup              — one-shot ecosystem setup (symlinks, configs, verify)
/cli-wrapper:cli-wrapper-setup --verify     — audit existing setup
/cli-wrapper wrap <cli-name>                — capture CLI help + build digest
/cli-wrapper invoke <cli-name> <args>       — run command, return compact output
/cli-wrapper audit <cli-name>               — show token savings for this CLI
/cli-wrapper audit all                      — ecosystem-wide savings report
/cli-wrapper list                           — list all wrapped CLIs
/cli-wrapper unwrap <cli-name>              — remove wrapper, restore raw access

CLI-Specific Wrappers

Each major AI CLI has its own dedicated wrapper skill + agent:

/claude-cli invoke|explain|audit|wrap      — Claude Code CLI
/gemini-cli invoke|explain|audit|wrap      — Gemini CLI
/codex-cli invoke|explain|audit|wrap       — Codex CLI (OpenAI)
/opencode-cli invoke|explain|audit|wrap    — OpenCode CLI
/agy-cli invoke|explain|audit|wrap         — Agy CLI (Antigravity)

These auto-delegate to the respective wrapper agent for complex operations.

Workflow

1. Wrap a CLI (discovery)

Claude will:

  1. Run <cli> --help (and <cli> <subcommand> --help recursively)
  2. Parse flag types, defaults, required vs optional
  3. Build a compact digest — only what the harness needs to know
  4. Save digest to .claude/cli-wrappers/<cli-name>.json
  5. Report token savings: raw vs wrapped

2. Invoke via wrapper

Instead of raw CLI calls, the harness uses the wrapper interface:

/cli-wrapper invoke docker ps --filter status=running

The wrapper:

  1. Validates flags against the digest (catches typos early)
  2. Runs the command
  3. Post-processes output (dedup, truncate, format)
  4. Returns only essential output to context
  5. Logs token metrics

3. Audit savings

/cli-wrapper audit docker

Returns:

CLI WRAPPER AUDIT — docker
===========================
Wrapped:    2026-06-15
Commands:   27 subcommands indexed
Help size:  3.2KB raw → 0.3KB digest (90% savings)
Invocations: 12
Tokens saved: ~18,400
Avg savings:  ~1,533 tokens/call

Digest Format

Each wrapped CLI produces a machine-readable digest:

{
  "name": "docker",
  "version": "27.3.1",
  "wrapped_at": "2026-06-15T10:30:00Z",
  "subcommands": {
    "ps": {
      "description": "List containers",
      "flags": {
        "--all": { "type": "bool", "description": "Show all containers" },
        "--filter": { "type": "string", "description": "Filter output", "repeatable": true },
        "--format": { "type": "string", "description": "Go template" },
        "--quiet": { "type": "bool", "description": "Only IDs" }
      }
    },
    "build": {
      "description": "Build image from Dockerfile",
      "flags": {
        "--tag": { "type": "string", "description": "Name:tag", "repeatable": true },
        "--file": { "type": "string", "description": "Dockerfile path" },
        "--build-arg": { "type": "string", "description": "Build-time var", "repeatable": true },
        "--no-cache": { "type": "bool", "description": "Don't use cache" },
        "--platform": { "type": "string", "description": "Target platform" }
      }
    }
  },
  "global_flags": {
    "--config": { "type": "string", "description": "Config file location" },
    "--context": { "type": "string", "description": "Docker context" },
    "--debug": { "type": "bool", "description": "Debug mode" },
    "--host": { "type": "string", "description": "Daemon socket" },
    "--log-level": { "type": "string", "description": "Log level", "choices": ["debug", "info", "warn", "error"] }
  },
  "stats": {
    "help_raw_bytes": 3247,
    "digest_bytes": 312,
    "savings_pct": 90.4
  }
}

Token Savings — How It Works

Phase Without Wrapper With Wrapper
Discovery Run cmd --help each session → 3KB tokens Load digest → 0.3KB tokens
Validation Harness guesses flags → retries Digest validates → first try
Output Raw output → possibly 10KB+ Post-processed → essential only
Documentation Harness re-discovers each time Digest persists across sessions

Supported CLI Patterns

Works with any CLI that supports --help:

  • Posix-style: command --help, command subcommand --help
  • Subcommand trees: git, docker, kubectl, aws, gcloud
  • **S
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • agents/agy-cli.md
  • agents/claude-cli.md
  • agents/codex-cli.md
  • agents/gemini-cli.md
  • agents/opencode-cli.md
  • plugin.json
  • skills/agy-cli/SKILL.md
  • skills/claude-cli/SKILL.md
  • skills/cli-wrapper-setup/SKILL.md
  • skills/codex-cli/SKILL.md
  • skills/gemini-cli/SKILL.md
  • skills/opencode-cli/SKILL.md
  • templates/symlink-map.json

FAQ

Что делает скилл cli-wrapper?

Wraps any external CLI so the AI harness can invoke it without context bloat. Captures --help output, documents every subcommand/flag in a compact digest, saves token metrics (raw vs wrapped), and exposes a standardized interface (invoke, explain, audit). Use before calling an unfamiliar CLI or when the harness needs to interact with a CLI repeatedly.

Как установить скилл cli-wrapper?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл cli-wrapper запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить cli-wrapper с