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…
by Andersonlimahw★ 19 GitHub stars
Install cli-wrapper-setup in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
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
- Detect installed CLIs:
which gemini codex agy opencode claude - Map each CLI to its config directory (
~/.<cli>/) - Check existing symlinks, skills, agents, config files
- Report what exists vs what needs creation
Phase 2: Claude Canonical Setup
- Ensure
~/.claude/skills/cli-wrapper/exists → symlink to this plugin's source - Ensure
~/.claude/agents/cli-wrapper/exists → symlink toagents/ - 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}.tomlwith 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-runpreviews writes;--verifyaudits 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
- Every symlink resolves correctly
cli-wrapper listworks in each CLI- Token audit runs without errors
- Config files contain the policy block
- 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
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the cli-wrapper-setup skill do?
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.
How do I install the cli-wrapper-setup skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the cli-wrapper-setup skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…