Skip to main content

invoke-claude-cli

Stars11
Forks2
UpdatedJuly 26, 2026 at 12:22

Authoritative guide for invoking the `claude` CLI as a subprocess from a host agent โ€” for code review, plan critique, executing approved plans, multi-turn refinement, background/parallel delegation, or any programmatic hand-off to Claude Code. Use this skill whenever you are about to write or modify a call to `claude` (e.g. `claude -p`, `subprocess.run(["claude", ...])`, `Popen`, a Bash pipeline, an n8n/LangGraph/AutoGen/CrewAI node that shells out to Claude, or a Codex/GPT/Gemini orchestrator driving Claude Code). Triggers on phrases like "shell out to claude", "call claude -p", "have Claude review/execute this plan", "hand off to claude code", "spawn claude subprocess", "claude headless", "claude --print", "non-interactive claude", "background claude agent", or whenever a non-Claude agent or orchestrator drives Claude Code. Covers headless invocation, output formats, structured output, session resumption, tool/permission gating, background agents, system-prompt injection, model + cost controls, the dangerou

Installation

Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.

File Explorer
12 files
SKILL.md
readonly