CLI Agents
Overview
CLI agents run as terminal processes that skillx spawns and manages directly. skillx passes the prompt as a CLI argument, waits for the process to exit, captures the exit code, and handles interruptions gracefully.
All CLI agents use the ManagedProcess lifecycle mode.
Claude Code
Claude Code is Anthropic’s official CLI for Claude.
Detection
skillx detects Claude Code by checking:
claudebinary in PATH (viawhich claude)~/.claude/directory exists
Either condition is sufficient.
Injection Paths
| Scope | Path |
|---|---|
| Global | ~/.claude/skills/<skill-name>/ |
| Project | .claude/skills/<skill-name>/ |
Launch
skillx spawns claude with the prompt as a positional argument:
claude "your prompt here"With --print mode (non-interactive):
claude -p "your prompt here"With auto-approve mode (--auto-approve):
claude "your prompt here" --dangerously-skip-permissionsAuto-approve Mode
Claude Code’s --dangerously-skip-permissions flag skips all permission prompts. The agent can read, write, and execute without asking for confirmation.
skillx run --auto-approve github:skillx-run/skillx/examples/skills/code-review "Review all files"# Equivalent to: claude "..." --dangerously-skip-permissionsExample Workflow
# Normal mode — Claude Code will ask for permissionsskillx run github:skillx-run/skillx/examples/skills/code-review "Review the auth module"
# Non-interactive (print) mode — process prompt and exitskillx run --print github:skillx-run/skillx/examples/skills/code-review "Review src/main.rs"
# Auto-approve mode — no permission promptsskillx run --auto-approve github:skillx-run/skillx/examples/skills/code-review "Fix all lint errors"
# With timeoutskillx run --timeout 30m github:skillx-run/skillx/examples/skills/code-review "Review the full codebase"
# Project-scoped injectionskillx run --scope project github:skillx-run/skillx/examples/skills/hello-world "Set up project"OpenAI Codex
Codex is OpenAI’s CLI coding agent.
Detection
skillx detects Codex by checking:
codexbinary in PATH (viawhich codex)~/.codex/directory exists
Injection Paths
| Scope | Path |
|---|---|
| Global | ~/.codex/skills/<skill-name>/ |
| Project | .agents/skills/<skill-name>/ |
Launch
skillx spawns codex with the prompt as a positional argument:
codex "your prompt here"With --print mode (non-interactive):
codex exec "your prompt here"With auto-approve mode (--auto-approve):
codex "your prompt here" --yoloAuto-approve Mode
Codex’s --yolo flag enables fully autonomous operation without user confirmation.
skillx run --auto-approve --agent codex github:skillx-run/skillx/examples/skills/code-review "Refactor the database layer"# Equivalent to: codex "..." --yoloExample Workflow
# Normal modeskillx run --agent codex github:skillx-run/skillx/examples/skills/testing-guide "Add unit tests"
# Non-interactive (print) modeskillx run --print --agent codex github:skillx-run/skillx/examples/skills/code-review "Review src/main.rs"
# Auto-approve modeskillx run --auto-approve --agent codex github:skillx-run/skillx/examples/skills/code-review "Fix all TODOs"
# With timeout and auto-confirm warningsskillx run --yes --timeout 1h --agent codex github:skillx-run/skillx/examples/skills/code-review "Complete refactor"Tier 3 CLI Agents
The following CLI agents are implemented via the data-driven GenericAdapter. They all use the ManagedProcess lifecycle with binary detection:
| Agent | Binary |
|---|---|
| Goose | goose |
| Kiro | kiro |
| Aider | aider |
| OpenClaw | openclaw |
| Qwen Code | qwen-code |
| Droid | droid |
| Warp | warp |
| OpenHands | openhands |
| Command Code | command-code |
| Mistral Vibe | mistral-vibe |
| Qoder | qoder |
| Kode | kode |
Each follows the same injection pattern: ~/.<name>/skills/<skill-name>/ (global) and .<name>/skills/<skill-name>/ (project). None support auto-approve mode.
Process Management
For all CLI agents, skillx handles the process lifecycle:
Normal Exit
skillx spawns agent → agent completes → exit code 0 → cleanupAgent Error
skillx spawns agent → agent fails → exit code N → warning shown → cleanupCtrl+C Interrupt
skillx spawns agent → user presses Ctrl+C → SIGKILL to agent → cleanupTimeout
skillx spawns agent → timeout reached → SIGKILL to agent → cleanupThe timeout is set with --timeout and supports human-friendly durations:
skillx run --timeout 5m ./skill "prompt" # 5 minutesskillx run --timeout 2h ./skill "prompt" # 2 hoursskillx run --timeout 30s ./skill "prompt" # 30 secondsGemini CLI
Gemini CLI is Google’s command-line interface for Gemini.
Detection
skillx detects Gemini CLI by checking:
geminibinary in PATH (viawhich gemini)~/.gemini/directory exists
Injection Paths
| Scope | Path |
|---|---|
| Global | ~/.gemini/skills/<skill-name>/ |
| Project | .gemini/skills/<skill-name>/ |
Launch
skillx spawns gemini with the following arguments:
# Interactive mode with initial promptgemini -i "your prompt here"With --print mode (non-interactive):
gemini -p "your prompt here"Auto-approve Mode
Gemini CLI supports auto-approve mode with the --yolo flag.
skillx run --auto-approve --agent gemini-cli github:skillx-run/skillx/examples/skills/hello-world "prompt"# Equivalent to: gemini -i "..." --yoloOpenCode
OpenCode is an open-source AI coding agent.
Detection
skillx detects OpenCode by checking:
opencodebinary in PATH~/.config/opencode/directory exists
Injection Paths
| Scope | Path |
|---|---|
| Global | ~/.opencode/skills/<skill-name>/ |
| Project | .opencode/skills/<skill-name>/ |
Launch
skillx spawns opencode with the prompt as a positional argument:
opencode "your prompt here"With --print mode (non-interactive, auto-approves all permissions):
opencode run "your prompt here"Auto-approve Mode
Not supported.
Amp
Amp is an AI-powered coding agent.
Detection
skillx detects Amp by checking:
ampbinary in PATH~/.amp/directory exists
Injection Paths
| Scope | Path |
|---|---|
| Global | ~/.config/agents/skills/<skill-name>/ |
| Project | .agents/skills/<skill-name>/ |
Launch
skillx spawns amp with the -x (execute) flag for prompt delivery:
amp -x "your prompt here"Auto-approve Mode
Amp supports auto-approve mode with the --dangerously-allow-all flag.
skillx run --auto-approve --agent amp github:skillx-run/skillx/examples/skills/hello-world "prompt"# Equivalent to: amp -x "..." --dangerously-allow-allComparison
| Feature | Claude Code | Codex | Gemini CLI | OpenCode | Amp |
|---|---|---|---|---|---|
| Binary | claude | codex | gemini | opencode | amp |
| Lifecycle | ManagedProcess | ManagedProcess | ManagedProcess | ManagedProcess | ManagedProcess |
| Initial prompt | Positional arg | Positional arg | -i flag | Positional arg | -x flag |
| Print mode | -p flag | exec subcommand | -p flag | run subcommand | N/A |
| Auto-approve flag | --dangerously-skip-permissions | --yolo | --yolo | N/A | --dangerously-allow-all |
| Global inject | ~/.claude/skills/ | ~/.codex/skills/ | ~/.gemini/skills/ | ~/.opencode/skills/ | ~/.config/agents/skills/ |
| Project inject | .claude/skills/ | .agents/skills/ | .gemini/skills/ | .opencode/skills/ | .agents/skills/ |