claude-code

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Orchestrating an autonomous coding agent from a terminal requires knowing the right CLI flags, handling interactive permission dialogs, managing sessions, and controlling costs. This Skill provides a complete operational guide for delegating coding work to the Claude Code CLI without trial-and-error. ## 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 full dialog handling for trust and permission prompts. - Structured Output & Automation: Extract JSON results, stream newline-delimited events, enforce JSON schemas, resume sessions by ID, and run bare mode for CI pipelines with budget and turn caps. - Configuration & Extensibility: Configure permissions, hooks, MCP servers, custom subagents, CLAUDE.md memory files, and slash commands for repeatable project workflows. - Use Case: Pipe a git diff into claude -p for an automated PR review, or launch parallel tmux sessions where separate Claude instances fix bugs, 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 for automation?

Use print mode with claude -p followed by your task prompt. It runs a one-shot task, skips all interactive dialogs, and exits when done. Add --max-turns to cap agentic loops and --allowedTools to whitelist specific tools like Read and Edit.

How do I handle Claude Code permission dialogs in tmux?

The workspace trust dialog defaults to Yes, so send Enter via tmux send-keys. The bypass-permissions warning defaults to No, so send Down then Enter to select Yes, I accept. Trust dialogs appear only once per directory.

Can Claude Code output structured JSON for scripting?

Yes, use --output-format json to get a result object with session_id, num_turns, total_cost_usd, and the result text. For validated structured data, pass --json-schema with a JSON schema and parse the structured_output field.

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 with a session ID to resume a specific session. In print mode, extract 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 non-interactively and exits, ideal for CI and scripting. Interactive mode provides a full REPL with slash commands, multi-turn conversation, and real-time monitoring, but requires tmux orchestration for automation.

How do I limit Claude Code API costs in automated runs?

Set --max-turns to cap agentic loops and --max-budget-usd to cap dollar spend in print mode. Use --fallback-model haiku to switch to a cheaper model when the default is overloaded, and monitor usage via the JSON output fields.