Claude Headless
SkillWeb & browsingProgrammatic/headless Claude Code usage, CLI flags, stream-json protocol, Agent SDKs, session management. Use before spawning Claude as a subprocess, testing skill or agent behavior, running "claude -p", or building with the Agent SDK.
Use Claude Headless in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Claude Headless and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Claude Headless skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; Ahel provides instructions and does not run this skill.
No other account needed.
Add Ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
What this skill tells your AI
The instructions your AI receives, as published by archibate/dotfiles-claude in skills/claude-headless/SKILL.md and read by Ahel’s review.
Programmatic usage of Claude Code CLI. Three modes available:
Quick Start
One-shot — single prompt, get result, exit:
claude -p "Explain this error" --output-format json
Stream JSON — bidirectional real-time NDJSON over stdin/stdout:
claude -p --output-format stream-json --input-format stream-json --verbose
# Send: {"type":"user","message":{"role":"user","content":"hello"}}
# Recv: {"type":"assistant","message":{...}}
# Recv: {"type":"result","subtype":"success",...}
Resume — continue a previous session:
claude -p "continue the review" --resume <session-id> --output-format json
Key Flags
| Flag | Purpose |
|---|---|
-p / --print | Non-interactive mode |
--output-format stream-json | NDJSON event stream on stdout |
--input-format stream-json | NDJSON messages on stdin (multi-turn) |
--bare | Skip CLAUDE.md, hooks, skills, plugins, MCP, auto-memory, OAuth/keychain (fast CI; see auth.md) |
--allowedTools "Bash,Read" | Pre-approve specific tools |
--max-budget-usd N | Cost cap |
--json-schema '{...}' | Structured output extraction |
For complete flag reference, read references/cli-flags.md.
Deep References
Load these on demand based on what the user needs:
references/cli-flags.md— Complete CLI flags: headless, permissions, budget, session, system prompt, subcommandsreferences/auth.md— Authentication: subscription OAuth, API key, apiKeyHelper,--barecaveat, token storagereferences/env-vars.md— Complete environment variables: auth, models, thinking, bash/network timeouts, telemetry, TLS, session, plugins, MCP, detectionreferences/stream-json.md— Stream JSON protocol: stdout events, stdin messages, pipe-chainingreferences/agent-view.md— Background sessions &claude agents:--bg, supervisor, shell management commands, peek/attach, worktree isolation, vs claude-dmreferences/permissions.md— Headless permission modes, --allowedTools, --permission-prompt-tool MCPreferences/sdks.md— TypeScript and Python Agent SDKs: API, options, streaming, multi-turnreferences/patterns.md— Real-world patterns: CI/CD, bot bridges, structured extraction, Agent Teams headless
Signals
- GitHub stars
- 40
- Forks
- 11
- Last commit
- Sep 2026
Ahel review
K1binfo
installs-packages (in references/sdks.md)
Automated review, not a security audit. Ruleset v1+k2.
Advanced
- Item type
- skill
- Key
claude-headless- Source
- github.com/archibate/dotfiles-claude
github.com/archibate/dotfiles-claude
More in Web & browsing
Skill · browser-use
More in Web & browsingwebapp-testing
Skill · anthropics
More in Web & browsingplaywright-cli
Skill · microsoft
More in Web & browsingbenchmark
Skill · affaan-m
More in Web & browsingopen-source
Skill · browser-use
More in Web & browsingdeploy-to-vercel
Skill · vercel-labs
More in Web & browsing