claude-code

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

Updated Sep 9, 2026
One-click install
npx skills add https://github.com/luckybbjason1/trading --skill claude-code-luckybbjason1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-code
Source: https://github.com/luckybbjason1/trading/tree/main/.hermes/skills/autonomous-ai-agents/claude-code
Command: npx skills add https://github.com/luckybbjason1/trading --skill claude-code-luckybbjason1

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Orchestrating an autonomous coding agent from another AI system requires handling CLI flags, PTY dialogs, session state, and output formats, which is error-prone without a structured playbook. ## 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 with send-keys sequences. - 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 where Claude fixes a bug, writes tests, and updates 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 for automation?

Use print mode with `claude -p "your task"` which runs a one-shot task and exits without interactive prompts. Add `--allowedTools` to whitelist tools, `--max-turns` to limit agentic loops, and `--output-format json` for structured results.

How do I handle Claude Code confirmation dialogs in tmux?

The workspace trust dialog defaults to "Yes", so send Enter via `tmux send-keys`. The bypass-permissions dialog defaults to "No", so send Down then Enter to select "Yes, I accept".

Can Claude Code output structured JSON for scripting?

Yes, use `--output-format json` to get a result object with session_id, cost, and usage fields, or `--json-schema` to force output matching a schema. For real-time events, use `stream-json` with `--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 and runaway loops?

Set `--max-turns` to cap agentic iterations and `--max-budget-usd` to cap dollar spend in print mode. The JSON result includes total_cost_usd so you can track spend per task.

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

Print mode (`-p`) runs a single task non-interactively and exits, ideal for automation and CI. Interactive mode provides a multi-turn REPL with slash commands like /compact and /review, requiring tmux orchestration for programmatic control.