Standalone CLI bridge - launch external AI CLIs (gemini, codex, claude) directly without MCP server. Use when you need to delegate tasks to specialized CLI tools with their own context windows...
This skill provides a standalone interface to launch external AI CLI tools (gemini, codex, claude) without requiring an MCP server. It runs as a local Python script that directly executes CLI commands.
Key Benefits:
Before using this skill, install the CLIs you want to use:
# Gemini CLI (Google)
npm install -g @google/gemini-cli
gemini auth login
# Codex CLI (Sourcegraph)
# Visit https://docs.sourcegraph.com/codex
# Claude Code (Anthropic)
# Visit https://www.anthropic.com/claude-code
cp -r vc/clink-standalone ~/.claude/skills/clink-standalone
pip install pydantic
# Run from the skill directory
cd ~/.claude/skills/clink-standalone
python bin/clink.py <cli_name> "<prompt>"
# Ask Gemini a question
python bin/clink.py gemini "Explain async/await in Python"
# Use Codex for code review
python bin/clink.py codex "Review this code" --files src/auth.py
# Use planner role
python bin/clink.py gemini "Plan a microservices migration" --role planner
# Output as JSON
python bin/clink.py gemini "What is Rust?" --json
# List available CLIs
python bin/clink.py --list-clients
# List roles for a CLI
python bin/clink.py --list-roles gemini
When using this skill in Claude Code, Claude will execute the clink script:
User: "Use gemini to explain Rust ownership"
Claude will run:
python bin/clink.py gemini "Explain Rust ownership system"
| CLI | Install | Strengths | Roles |
|---|---|---|---|
| gemini | npm install -g @google/gemini-cli |
1M context, web search | default, planner, codereviewer |
| codex | Sourcegraph Codex | Code analysis, review | default, planner, codereviewer |
| claude | Claude Code | General purpose | default, planner, codereviewer |
| Role | Purpose | Best For |
|---|---|---|
default |
General tasks | Questions, summaries, quick answers |
planner |
Strategic planning | Multi-phase plans, architecture, migrations |
codereviewer |
Code analysis | Security review, quality checks, bug hunting |
python bin/clink.py <cli_name> <prompt> [OPTIONS]
Options:
--role, -r Role to use (default: default)
--files, -f File paths to reference
--images, -i Image paths to include
--config-dir Custom config directory
--json Output as JSON
--list-clients List available CLIs
--list-roles List roles for a CLI
clink-standalone/
āāā bin/
ā āāā clink.py # Main CLI script
āāā clink_core/
ā āāā __init__.py
ā āāā models.py # Pydantic models
ā āāā registry.py # Config loader
ā āāā runner.py # CLI execution
āāā config/
ā āāā gemini.json # Gemini CLI config
ā āāā codex.json # Codex CLI config
ā āāā claude.json # Claude CLI config
āāā systemprompts/
ā āāā gemini/
ā āāā codex/
ā āāā claude/
āāā SKILL.md # This file
CLI configurations are in config/*.json:
{
"name": "gemini",
"command": "gemini",
"additional_args": ["--telemetry", "false", "--yolo", "-o", "json"],
"timeout_seconds": 300,
"roles": {
"default": {"prompt_path": "systemprompts/gemini/default.txt"},
"planner": {"prompt_path": "systemprompts/gemini/planner.txt"},
"codereviewer": {"prompt_path": "systemprompts/gemini/codereviewer.txt"}
}
}
Customize by editing these files.
Role-specific prompts are in systemprompts/<cli>/<role>.txt. Edit these to customize behavior.
Error: Executable 'gemini' not found in PATH
Solution: Install the CLI first (see Prerequisites)
Error: CLI 'gemini' timed out after 300 seconds
Solution: Increase timeout_seconds in config or break into smaller tasks
Output was 75000 characters, exceeding limit
Solution: Narrow your prompt or request a summary
Choose the Right CLI
Use Appropriate Roles
File References
--files, CLI reads what it needsBreak Down Large Tasks
You can also use clink as a Python module:
from clink_core import get_registry, run_cli
# Get registry
registry = get_registry()
# Get CLI and role
client = registry.get_client("gemini")
role = client.get_role("default")
# Run
result = run_cli(
client=client,
role=role,
prompt="Explain async/await in Python",
files=["/path/to/file.py"],
)
print(result.content)
print(result.metadata)
This is a standalone extraction of the clink functionality from zen-mcp-server.