Command Palette

Search for a command to run...

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

cli-wrapper-setup

One-shot setup that configures the CLI wrapper ecosystem across ALL AI harnesses (Claude Code, Gemini, Codex, Agy, OpenCode). Creates symlinks from Claude…

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

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

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

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

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

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

CLI Wrapper Setup

Configura o ecossistema de CLI wrappers em TODOS os harnesses AI. Claude = single source of truth. Demais CLIs = symlinks.

Quick Start

/cli-wrapper:cli-wrapper-setup          — full auto-detect + setup
/cli-wrapper:cli-wrapper-setup --dry-run — preview, no changes
/cli-wrapper:cli-wrapper-setup --verify  — audit existing setup
/cli-wrapper:cli-wrapper-setup --add <cli> — add single CLI to ecosystem

What It Does

Phase 1: Discovery

  1. Detect installed CLIs: which gemini codex agy opencode claude
  2. Map each CLI to its config directory (~/.<cli>/)
  3. Check existing symlinks, skills, agents, config files
  4. Report what exists vs what needs creation

Phase 2: Claude Canonical Setup

  1. Ensure ~/.claude/skills/cli-wrapper/ exists → symlink to this plugin's source
  2. Ensure ~/.claude/agents/cli-wrapper/ exists → symlink to agents/
  3. Register in Claude's skill/agent registry

Phase 3: Cross-CLI Symlinks

For each detected non-Claude CLI:

CLI Skills Agents Config
Codex Already symlinked (skills → ~/.claude/skills) Create ~/.codex/agents/cli-wrapper/ → Claude agents Update ~/.codex/AGENTS.md
Agy Already symlinked (skills → ~/.claude/skills) Create ~/.agy/agents/ + symlinks Create ~/.agy/AGENTS.md
OpenCode Already symlinked (skills → ~/.claude/skills) Create ~/.opencode/agents/ + symlinks Create ~/.opencode/AGENTS.md
Gemini Individual skill symlinks in ~/.gemini/skills/ Individual agent symlinks in ~/.gemini/agents/ Update ~/.gemini/GEMINI.md

Phase 3.5: Agent Frontmatter Sync (MANDATORY)

Retrocompatibility contract: raw symlinks from ~/.{harness}/agents/ to Claude-format files BREAK OpenCode and may break Agy/Gemini because the frontmatter schema is harness-specific. This phase materializes per-harness copies via scripts/sync-agents.py with strict schema enforcement.

Why this exists: a previous setup created raw symlinks to Claude-format agents. OpenCode then silently dropped name: (file name = agent identity) and the missing description: caused a hard parse error. A migration attempt that uppercased tools: to Tools: and pluralized color: to colors: would also be invalid — both keys are rejected.

Per-harness schema (strict):

Harness Top-level keys kept Drops Sidecar
Claude name, description, color, mode, permission, tools — —
Codex name, description, color, mode, permission — .toml
Gemini name, description, color, mode, permission — —
Agy name, description, color, mode, permission — —
OpenCode description, color, mode, permission name —

Behavior:

  • Reads canonical agents from plugins/cli-wrapper/agents/*.md
  • Emits materialized files (not symlinks) at ~/.{harness}/agents/{name}.md
  • Codex additionally gets ~/.codex/agents/{name}.toml with the same body
  • Drops any key not in the harness whitelist; logs a [warn] line
  • Idempotent: re-running with no source change = no writes
  • --dry-run previews writes; --verify audits existing files (exit 1 on drift)

Commands:

python3 scripts/sync-agents.py            # apply
python3 scripts/sync-agents.py --dry-run  # preview
python3 scripts/sync-agents.py --verify   # audit, exit 1 on drift
python3 scripts/sync-agents.py --harness opencode  # single harness

This phase is wired into scripts/setup-symlinks.sh and scripts/menu.sh so any symlink run automatically syncs agent frontmatter.

Phase 4: Config Injection

Add to each CLI's main config file:

## 🔌 CLI Wrapper Policy (managed by cli-wrapper-setup)

⚠️ **PREFER** `/cli-wrapper:<cli>-cli invoke ...` over raw `<cli> ...` commands.
Wrapped CLIs save 60-95% tokens per invocation. List: `/cli-wrapper list`
Setup: `/cli-wrapper:cli-wrapper-setup --verify`

Files updated:

  • ~/.claude/CLAUDE.md — append policy block
  • ~/.gemini/GEMINI.md — append policy block
  • ~/.codex/AGENTS.md — append policy block
  • ~/.agy/AGENTS.md — create + append
  • ~/.opencode/AGENTS.md — create + append

Phase 5: Verification

  1. Every symlink resolves correctly
  2. cli-wrapper list works in each CLI
  3. Token audit runs without errors
  4. Config files contain the policy block
  5. Report: green checkmarks or red X's

Architecture — Single Source of Truth

lemon-ai-hub/plugins/cli-wrapper/     ← CANONICAL SOURCE (git)
  ├── SKILL.md
  ├── plugin.json
  ├── skills/                          ← wrapper skills
  │   ├── cli-wrapper-setup/
  │   ├── claude-cli/
  │   ├── gemini-cli/
  │   ├── codex-cli/
  │   ├── opencode-cli/
  │   └── agy-cli/
  ├── agents/                          ← wrapper agents
  │   ├── claude-cli.md
  │   ├── gemini-cli.md
  │   ├── codex-cli.md
  │   ├── opencode-cli.md
  │   └── agy-cli.md
Полный SKILL.md на GitHub

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

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

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

FAQ

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

One-shot setup that configures the CLI wrapper ecosystem across ALL AI harnesses (Claude Code, Gemini, Codex, Agy, OpenCode). Creates symlinks from Claude (single source of truth) to every other CLI, registers wrapper skills/agents in each harness, and injects the "prefer wrapped CLI" policy into each CLI's config file. Run once per machine or after adding a new CLI to the ecosystem.

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

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

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

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

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

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