claude-code

Delegate coding tasks to the Claude Code CLI via print mode or tmux sessions.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/CHENHUI-X/toolbox --skill claude-code-chenhui-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-code
Source: https://github.com/CHENHUI-X/toolbox/tree/main/official-skills/autonomous-ai-agents/claude-code
Command: npx skills add https://github.com/CHENHUI-X/toolbox --skill claude-code-chenhui-x

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @anthropic-ai/claude-code, tmux.

What problem does it solve? Orchestrating an autonomous coding agent from a terminal requires knowing the right CLI flags, handling interactive permission dialogs, and managing sessions, which is error-prone when done manually. ## Core Features & Use Cases - Print Mode Automation: Run one-shot non-interactive coding tasks with claude -p, structured JSON output, JSON schema extraction, and piped input for CI/CD pipelines. - Interactive tmux Orchestration: Drive multi-turn Claude Code sessions through tmux, including handling workspace trust and permissions dialogs programmatically. - Session & Cost Management: Resume sessions by ID, fork sessions, cap spend with --max-budget-usd, and limit agentic loops with --max-turns. - Use Case: Pipe a git diff into claude -p to get an automated PR review, or run three parallel tmux sessions to fix a bug, write tests, and update docs simultaneously. ## Quick Start Ask the agent to run claude -p with your coding task, an allowedTools whitelist, and a max-turns limit in your project directory.

Frequently Asked Questions about claude-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Claude Code non-interactively in a script?

Use print mode with `claude -p "your task"` which runs a one-shot task and exits without interactive prompts. Add `--max-turns` to limit agentic loops and `--output-format json` for structured results in CI/CD pipelines.

How do I handle Claude Code permission dialogs in tmux?

Send Enter via `tmux send-keys` to accept the default workspace trust dialog. For the bypass permissions warning, send Down then Enter since the safe default is "No, exit" and you must select "Yes, I accept".

Can Claude Code output structured JSON for automation?

Yes, use `--output-format json` to get a result object with session_id, cost, and turn counts, or `--json-schema` to force output matching a specific schema. Streaming is available via `--output-format stream-json --verbose`.

How do I resume a previous Claude Code session?

Use `claude -c` to continue the most recent conversation in the current directory, or `claude -r <session_id>` to resume a specific session. In print mode, extract session_id from JSON output and pass it with `--resume`.

How do I limit Claude Code API costs?

Set `--max-turns` to cap agentic loop iterations and `--max-budget-usd` to cap dollar spend in print mode. You can also use `--fallback-model haiku` to switch to a cheaper model when the default is overloaded.

What is the difference between print mode and interactive mode in Claude Code?

Print mode (`-p`) runs one-shot tasks non-interactively and skips all dialogs, ideal for automation. Interactive mode provides a multi-turn REPL with slash commands and requires tmux orchestration for programmatic control.