claude-code-automation

Run Claude Code headless and bidirectional stream-json sessions programmatically.

12|5|Updated Apr 14, 2017
One-click install
npx skills add https://github.com/coreyja/dotfiles --skill claude-code-automation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-code-automation
Source: https://github.com/coreyja/dotfiles/tree/main/.claude/skills/claude-code-automation
Command: npx skills add https://github.com/coreyja/dotfiles --skill claude-code-automation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill covers running Claude Code programmatically—both headless (--print) for one-shot tasks and bidirectional streaming for multi-turn conversations—so you can build agents, automate Claude workflows, or embed Claude CLI into applications.

Core Features & Use Cases

  • Headless mode: Run with claude --print for one-shot tasks and background automation.
  • Bidirectional protocol: Use --input-format stream-json and --output-format stream-json for persistent, multi-turn sessions.
  • Session management: Establish a session, send user messages, and handle responses using the stream-json protocol.
  • Transcript reading: Process JSONL transcripts safely and efficiently with minimal memory.

Quick Start

  • Start a headless task: claude --print --verbose --output-format stream-json --model sonnet --permission-mode bypassPermissions
  • Or start a bidirectional session: claude --input-format stream-json --output-format stream-json --verbose