Install any skill in seconds. Free to start, no credit card required.
Get Started Free →majiayu000/headless-mode
Guide for using Claude Code programmatically via CLI flags and SDKs.
Passed 22 of 22 test cases with the skill, and 16 of 22 without it.
and 3 more in the full report
6 fixed16 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 6 test cases the skill fixed. Same model, same prompt, with and without the skill.
I have an existing non-interactive Claude Code session ID `abc-123`. I want to launch an experimental alternative branch from that session without overwriting or mutating the original session history. What flag combination creates this new branch?
| Checked | Without skill | With skill |
|---|---|---|
| Includes the --fork-session flag | Missed | Passed |
| Includes the --resume flag | Passed | Passed |
The instructions your model reads when the skill loads.
Run Claude Code programmatically for automation, CI/CD, and scripting.
| Mode | Command | Use Case |
|---|---|---|
| CLI (simple) | claude -p "prompt" | One-shot tasks, scripts |
| CLI (structured) | claude -p "prompt" --output-format json | Parsing responses |
| TypeScript SDK | @anthropic-ai/claude-code | Full programmatic control |
| Python SDK | claude-code-sdk | Python automation |
The -p (or --print) flag runs Claude Code non-interactively. All CLI options work with -p, enabling automated workflows without human interaction.
claude -p "Explain what this project does"
| Flag | Purpose | Example |
|---|---|---|
-p, --print | Run non-interactively | claude -p "query" |
--output-format | Response format | json, stream-json, text |
--allowedTools | Auto-approve tools | "Bash,Read,Edit" |
--max-turns | Limit agent turns | --max-turns 5 |
--continue | Continue last session | claude -p "..." --continue |
--resume | Resume specific session | --resume $SESSION_ID |
Plain text output for simple tasks:
claude -p "Summarize auth.py"
test cases passed, vs 16 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.