claude-afklisted
Install: claude install-skill a-canary/arc-agents
# claude-afk — Observable Headless `claude`
## When to use
You want the shape of `claude -p --output-format json` (give prompt, block, get JSON, exit), but you also want to *see what the agent is doing* — not just the final JSON.
- One-shot agentic invocations from scripts, cron, or other agents.
- `tmux attach` mid-run to watch tool use, intervene, or debug.
- Full session transcript available after exit, not just summarized `result`.
Primary value is **observability**: a real Claude Code session under the hood gives you the same UI, tool-call rendering, scrollback, and hook surface as if you'd typed the prompt yourself. (Side benefit: bills against the Max plan's Claude-Code bucket rather than extra-usage.)
## Contract
```
claude-afk <prompt> # positional, required
[--system-prompt <str>]
[--out <path>] # default: mktemp
[--timeout <seconds>] # default: 1800
[--session-prefix <str>] # default: "afk"
[--model <name>] # passed through to claude -p
```
Behavior: mints a tmux session, writes a hermetic settings file spawns `tmux new-session -d` running `claude -p` with the prompt (output teed into the JSON envelope), blocks until JSON appears or timeout fires, kills the tmux session, prints JSON to stdout. Exits 0 on success, nonzero on timeout / hook failure.
Output JSON (matches `claude -p --output-format json` for drop-in