cli-delegatelisted
Install: claude install-skill isCopyman/cli-delegate
# CLI Delegate
Delegation is two modes. Same script, same JSON stdout. Pick the mode; do not invent a third.
| Mode | Command | When |
|---|---|---|
| Fire-and-forget | `run` | New child thread. One prompt, take `result`, stop. |
| Continue | `resume` | Same cwd+cli thread. Follow-ups, multi-turn, "keep going". |
`run` still records the session. Later `resume` can pick it up. That does not make `run` a continuing turn — only `resume` (or `run --resume` / `--resume-last`) continues.
Unrelated new work: `run --fresh`, never `resume` onto the last thread.
Do **not** spawn the same CLI as this host unless the user passed Claude `--settings` or `--allow-nested`.
This skill is for **host agents** (Claude Code, Codex, Grok, Cursor), not a human CLI.
The runner is `scripts/cli-delegate.mjs` in the same folder as this `SKILL.md`. Call it with `node` and an **absolute path**. Parse JSON on stdout. No interactive TUI.
## How to call it
Short quoted prompts are fine; a real task brief goes in `--prompt-file`. Write jobs that must not touch the host tree: `--worktree`. Structured answers: `--schema`.
```bash
node "/absolute/path/to/this-skill/scripts/cli-delegate.mjs" which --cli grok
node "/absolute/path/to/this-skill/scripts/cli-delegate.mjs" run --cli grok --cwd "<ABS_CWD>" --read-only --prompt-file "<ABS_BRIEF>"
node "/absolute/path/to/this-skill/scripts/cli-delegate.mjs" run --cli grok --cwd "<ABS_CWD>" --worktree-name ui --prompt-file "<ABS_BRIEF>"
node "/absolute/path/to/