claude-code

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

Updated Jun 30, 2026
One-click install
npx skills add https://github.com/zhoulingxiao1216/testworkspace --skill claude-code-zhoulingxiao1216
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: claude-code
Source: https://github.com/zhoulingxiao1216/testworkspace/tree/main/all_Skills/autonomous-ai-agents/claude-code
Command: npx skills add https://github.com/zhoulingxiao1216/testworkspace --skill claude-code-zhoulingxiao1216

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 dozens of CLI flags, handling interactive permission dialogs, and managing sessions, which is error-prone when done manually. ## Core Features & Use Cases - Two Orchestration Modes: Run one-shot non-interactive tasks with claude -p print mode, or drive multi-turn interactive REPL sessions through tmux with scripted dialog handling. - Structured Output & Automation: Extract JSON results, stream tokens, enforce JSON schemas, resume sessions, and cap cost with --max-turns and --max-budget-usd for CI/CD pipelines. - Full Configuration Coverage: Manage permissions, hooks, MCP servers, custom subagents, CLAUDE.md memory files, and slash commands. - Use Case: Pipe a git diff into claude -p to get an automated PR review, or run three parallel tmux sessions where Claude fixes a bug, writes tests, and updates docs simultaneously. ## Quick Start Ask the agent to run claude -p with a coding task such as adding error handling to all API calls in the src directory of your project.

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 from 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 `--allowedTools` to restrict which tools Claude can use.

How do I get structured JSON output from Claude Code?▼

Pass `--output-format json` in print mode to receive a result object containing the response text, session_id, token usage, and cost. You can also supply `--json-schema` to force the output to match a specific structure.

How do I handle the Claude Code permission dialogs in tmux?▼

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

Can Claude Code resume a previous session?▼

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

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

Print mode (`-p`) runs a single task and exits, skipping all interactive dialogs, making it ideal for automation and CI. Interactive mode provides a full REPL with slash commands and multi-turn conversation but requires tmux orchestration to script.

How do I limit Claude Code API costs in automation?▼

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