claude-code

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

1|Updated Feb 17, 2026
One-click install
npx skills add https://github.com/brittb-dev/zerogravityclaw --skill claude-code-brittb-dev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: claude-code
Source: https://github.com/brittb-dev/zerogravityclaw/tree/main/src/hermes-core/skills/autonomous-ai-agents/claude-code
Command: npx skills add https://github.com/brittb-dev/zerogravityclaw --skill claude-code-brittb-dev

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 handling interactive prompts, permission dialogs, session state, and output formats, which is error-prone when done manually. This Skill provides a complete operational guide for driving the Claude Code CLI from the Hermes terminal, covering both one-shot automation and multi-turn interactive sessions. ## Core Features & Use Cases - Print Mode Automation: Run non-interactive one-shot tasks with claude -p, structured JSON output, JSON schema extraction, piped input, session resumption, and cost/turn caps for CI pipelines. - Interactive PTY Orchestration: Drive multi-turn Claude Code sessions through tmux, including handling workspace trust and bypass-permissions dialogs, monitoring pane output, and sending follow-up prompts. - Configuration & Extensibility: Covers CLI flags, settings hierarchy, CLAUDE.md memory files, custom subagents, hooks, MCP server integration, parallel instances, and PR review workflows. - Use Case: Ask the agent to review a pull request by piping git diff into claude -p, or spawn three parallel tmux sessions to fix a bug, write tests, and update docs simultaneously. ## Quick Start Ask the agent to run claude -p with a coding task, allowed tools, 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 from a script?▼

Use print mode with claude -p followed by your task prompt. It runs one-shot, skips all interactive dialogs, and exits when done. Add --max-turns to cap agentic loops and --output-format json for structured results.

How to 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 only appear once per directory.

Can Claude Code output structured JSON for automation?▼

Yes, use --output-format json to get a result object with session_id, num_turns, total_cost_usd, and usage fields. Add --json-schema to force output matching a specific schema, or stream-json for real-time newline-delimited events.

Does Claude Code support resuming previous sessions?▼

Yes, 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. The --fork-session flag creates a new session ID while keeping history.

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

Print mode (-p) runs a single task and exits, ideal for automation and CI. Interactive mode provides a conversational REPL with slash commands and multi-turn iteration, but requires tmux orchestration to handle prompts and monitor progress.

Why does Claude Code print mode stop before finishing my task?▼

The most common cause is hitting the --max-turns limit, which caps agentic loops to prevent runaway execution. Check the subtype field in JSON output for error_max_turns, and increase the limit or narrow the task scope.