Agent skill · AI & Agents

cli-reference

Claude Code CLI commands, flags, headless mode, and automation patterns

majiayu000github.com/majiayu000GitHub ↗
claude-coderead-onlyMIT
Install
npx skills add majiayu000/claude-skill-registry --skill cli-reference-carmandale-agent-config --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
Allowed tools: Read
Path: skills/ai-llm/cli-reference-carmandale-agent-config/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

# CLI Reference Complete reference for Claude Code command-line interface. ## When to Use - "What CLI flags are available?" - "How do I use headless mode?" - "Claude in automation/CI/CD" - "Output format options" - "System prompt via CLI" - "How do I spawn agents properly?" ## Core Commands | Command | Description | Example | |---------|-------------|---------| | `claude` | Start interactive REPL | `claude` | | `claude "query"` | REPL with initial prompt | `claude "explain this project"` | | `claude -p "query"` | Headless mode (SDK) | `claude -p "explain function"` | | `cat file \| claude -p` | Process piped content | `cat logs.txt \| claude -p "explain"` | | `claude -c` | Continue most recent | `claude -c` | | `claude -c -p "query"` | Continue via SDK | `claude -c -p "check types"` | | `claude -r "id" "query"` | Resume session | `claude -r "auth" "finish PR"` | | `claude update` | Update version | `claude update` | | `claude mcp` | Configure MCP servers | See MCP docs | ## Session Control | Flag | Description | Example | |------|-------------|---------| | `--continue, -c` | Load most recent conversation | `claude --continue` | | `--resume, -r` | Resume session by ID/name | `claude

What's inside
Steps it walks through
  1. When to Use
  2. Core Commands
  3. Session Control
  4. Headless Mode (Critical for Agents)
  5. Tool Control
  6. Subagent Definition (--agents flag)
  7. Agent Fields
  8. Key Insight
  9. System Prompt Customization
  10. Model Selection
  11. MCP Configuration
  12. Advanced Flags
  13. Output Formats
  14. JSON (for parsing)
Ships with 1 file
  • metadata.json
Commands it runs
claude --agents '{
claude -p "query" --output-format json
claude -p "query" --output-format stream-json
Newline-delimited JSON events
claude -p "Extract data" \
claude -p "$TASK_PROMPT" \
claude -p "Run tests and fix failures" \
cat error.log | claude -p "Find root cause"
gh pr diff | claude -p "Review for security"
claude -p "Continue" --resume "$id"
More from claude-skill-registry
All skills →
About this skill
What does the cli-reference skill do?

Claude Code CLI commands, flags, headless mode, and automation patterns

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill cli-reference-carmandale-agent-config --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