Agent skill · AI & Agents

using-claude-code-cli

Invoke Claude Code CLI from Python orchestrators and shell scripts. Use when asked to "spawn claude as subprocess", "automate claude cli", "run claude headless", "configure --allowedTools", "set up claude hooks", or "parallel claude invocation". Covers permissions, directory access (--add-dir), hooks, sandbox mode, and async patterns.

majiayu000github.com/majiayu000GitHub ↗
claude-codecan modify filesMIT
Install
npx skills add majiayu000/claude-skill-registry --skill using-claude-code-cli-spillwavesolutions-agent-rulez --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 7 KB
Bundled scripts: none
Version: 1.1.0
Declared author: Book Generator v2 Project
Allowed tools: -Read-Bash
Path: skills/agent/using-claude-code-cli-spillwavesolutions-agent-rulez/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Using Claude Code CLI Patterns for programmatically invoking Claude Code CLI from orchestrators, scripts, and automation pipelines. ## Contents - [Quick Start Checklist](#quick-start-checklist) - [Essential Commands](#essential-commands) - [Core CLI Flags](#core-cli-flags) - [Sandbox Mode](#sandbox-mode) - [Validation](#validation) - [Troubleshooting](#troubleshooting) - [When Not to Use](#when-not-to-use) ## Quick Start Checklist Copy and track as you work: ``` CLI Automation Setup: - [ ] 1. Identify required tools, add to --allowedTools - [ ] 2. List directories Claude needs, add to --add-dir - [ ] 3. Choose pattern: sync, async, or parallel (see references/) - [ ] 4. Configure hooks if logging/monitoring needed - [ ] 5. Enable sandbox mode for untrusted operations - [ ] 6. Add fallback strategy if using OpenCode backup - [ ] 7. Test with simple prompt before full automation - [ ] 8. Validate setup (see Validation section) ``` ## Essential Commands **Minimal automation:** ```bash claude -p "Your prompt" --allowedTools Write Read Edit --max-turns 5 ``` **Full automation:** ```bash claude \ --model sonnet \ --add-dir /path/to/skills \ --add-dir /path/to/templates \ --allowedTools

What's inside
Steps it walks through
  1. Contents
  2. Quick Start Checklist
  3. Essential Commands
  4. Core CLI Flags
  5. Sandbox Mode
  6. Validation
  7. Troubleshooting
  8. When Not to Use
  9. Reference Files
  10. OpenCode CLI Fallback
Ships with 1 file
  • metadata.json
Commands it runs
claude -p "Your prompt" --allowedTools Write Read Edit --max-turns 5
claude \
claude --settings '{"hooks":{},"sandbox":{"enabled":true}}' -p "prompt"
claude --settings '{"sandbox":{"enabled":true,"autoAllowBashIfSandboxed":true}}' -p "prompt"
claude -p "Create file test.txt with 'hello'" --allowedTools Write
claude -p "List files in /path/to/dir" --add-dir /path/to/dir --allowedTools LS
claude -p "Return {\"status\": \"ok\"}" --output-format json | jq .
claude --settings '{"hooks":{...}}' -p "Simple task" --allowedTools Read
More from claude-skill-registry
All skills →
About this skill
What does the using-claude-code-cli skill do?

Invoke Claude Code CLI from Python orchestrators and shell scripts. Use when asked to "spawn claude as subprocess", "automate claude cli", "run claude headless", "configure --allowedTools", "set up claude hooks", or "parallel claude invocation". Covers permissions, directory access (--add-dir), hooks, sandbox mode, and async patterns.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill using-claude-code-cli-spillwavesolutions-agent-rulez --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going