Going further with Claude Code
Headless Mode
Run Claude Code programmatically with claude -p. Pipe in diffs, generate structured JSON output, automate commits, chain commands in CI/CD pipelines. This is how you turn Claude into infrastructure.
Read the docs →
Sub-agents
Create specialized AI agents with custom prompts, scoped tools, and independent context windows. A code reviewer that only reads. A deploy agent that only runs Bash. Define them in Markdown files with YAML frontmatter and Claude orchestrates them.
Read the docs →
Hooks
Automate workflows with lifecycle hooks. Auto-format code after edits, block changes to protected files, get desktop notifications, re-inject context after compaction, auto-approve specific permissions. Deterministic control over an AI-powered workflow.
Read the docs →
The /doctor Command
If something breaks, type /doctor inside Claude Code. It checks your installation, settings, MCP servers, search indexing, and keybindings. Use /bug to report issues directly to Anthropic.
Full troubleshooting guide →