Use this skill when a high-cost model should do architecture, judgment, and validation while a cheaper or separate local CLI agent performs token-heavy execution: filling in designed outlines, expanding many sections, generating boilerplate files, drafting repetitive documents, or completing batch prompts. Prefer a CLI that is not the current running agent when available, because the point is to delegate work to a separate agent runtime.
This skill should trigger when the user asks for any of these patterns:
When the skill is triggered, immediately tell the user one short line before running work:
我会使用 cli-agent-orchestrator,把批量生成交给 <cli>,模型为 <model 或 CLI default configured model>,并发数 <n>。
If CLI or model has not been chosen yet, say the planned default:
我会使用 cli-agent-orchestrator,先检测可用外部 CLI;未指定模型时使用该 CLI 的默认配置模型,并在报告里写明。
Do not silently delegate. The user should be able to see that this skill was used, which CLI was selected, which model was requested, and why this saves expensive-model tokens.
command -v .CLI default configured model in the final report.2 or 3; increase only when the CLI is stable.Use scripts/run_cli_agents.mjs for repeatable orchestration. The script has presets for common CLIs and a generic mode for anything else.
Basic example:
node /path/to/cli-agent-orchestrator/scripts/run_cli_agents.mjs \
--cli qwen \
--preset qwen \
--model deepseek-v4-flash \
--concurrency 3 \
--tasks ./tasks.json \
--out-dir ./generated \
--use-pty
Use the CLI default configured model:
node /path/to/cli-agent-orchestrator/scripts/run_cli_agents.mjs \
--cli qwen \
--preset qwen \
--concurrency 2 \
--tasks ./tasks.json \
--out-dir ./generated \
--use-pty
For Qwen Code and Gemini CLI, --use-pty is often more reliable on macOS because some CLIs expect a terminal. Preset auto enables it for those CLIs.
Other common examples:
# OpenCode: prompt is positional after `opencode run`
node scripts/run_cli_agents.mjs \
--cli opencode \
--preset opencode \
--model provider/model-name \
--concurrency 2 \
--tasks ./tasks.json \
--out-dir ./generated
# Claude Code / claudecode: non-interactive print mode
node scripts/run_cli_agents.mjs \
--cli claude \
--preset claude \
--model sonnet \
--concurrency 2 \
--tasks ./tasks.json \
--out-dir ./generated
# Codex CLI: non-interactive exec mode
node scripts/run_cli_agents.mjs \
--cli codex \
--preset codex \
--model gpt-5-codex \
--concurrency 2 \
--tasks ./tasks.json \
--out-dir ./generated
Create a JSON file containing an array of tasks:
[
{
"id": "01-intro",
"output": "01-intro.md",
"prompt": "Write a Markdown learning note about ...",
"minChars": 800,
"required": ["## 本节目标", "## 自测题"]
}
]
Fields:
id: stable task identifier for logs.output: path relative to --out-dir.prompt: full prompt sent to the CLI.minChars: optional minimum cleaned output length.required: optional array of strings that must appear in output.Use --preset auto by default. It infers behavior from the CLI executable name:
| Preset | Command Shape | Model Flag | Prompt Style | Notes |
|---|---|---|---|---|
| --- | --- | --- | --- | --- |
qwen | qwen ... -p | --model | flag | Adds --approval-mode yolo; enables PTY |
gemini | gemini ... -p | --model | flag | Adds --approval-mode yolo; enables PTY |
claude | claude -p ... | --model | positional | Also covers claudecode / claude-code aliases when executable exists |
opencode | opencode run ... | --model | positional | Model often uses provider/model format |
codex | codex exec --skip-git-repo-check ... | --model | positional | Avoid using this preset when it would recurse into the same current agent |
generic | configurable | configurable | configurable | Use for unknown CLIs |
Override defaults when using another CLI:
node scripts/run_cli_agents.mjs \
--cli some-cli \
--preset generic \
--model cheap-model \
--model-arg --model \
--prompt-mode flag \
--prompt-arg --prompt \
--extra-arg --non-interactive \
--tasks ./tasks.json \
--out-dir ./out
Use repeated --base-arg entries for arguments before model/prompt, such as subcommands. Use repeated --extra-arg entries for other flags.
Do not trust delegated output blindly. After the script finishes:
run-report.json.Final responses should include:
CLI default configured model.共 1 个版本