claude-code

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

1|Updated Jun 24, 2026
One-click install
npx skills add https://github.com/maopujie10-sys/Bailongma --skill claude-code-maopujie10-sys
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-code
Source: https://github.com/maopujie10-sys/Bailongma/tree/main/skills/hermes-skills/autonomous-ai-agents/claude-code
Command: npx skills add https://github.com/maopujie10-sys/Bailongma --skill claude-code-maopujie10-sys

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 multi-turn sessions, which is error-prone when done manually. ## Core Features & Use Cases - Print Mode Automation: Run one-shot coding tasks with claude -p, structured JSON output, JSON schema extraction, session resumption, and cost caps via --max-turns and --max-budget-usd. - Interactive PTY Orchestration: Drive multi-turn Claude Code sessions through tmux, including handling workspace trust and permissions dialogs with scripted keystrokes. - Extensibility: Configure hooks, MCP servers, custom subagents, CLAUDE.md memory files, and slash commands for project-specific workflows. - 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 followed by your task prompt. Add --allowedTools to whitelist tools, --max-turns to cap agentic loops, and --output-format json for structured results. Print mode skips all interactive dialogs, making it suitable for CI/CD pipelines.

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. After the first trust acceptance for a directory, only the permissions dialog recurs.

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 usage fields. Add --json-schema to force output matching a specific schema, or use stream-json with --verbose for real-time newline-delimited events.

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; add --fork-session to branch with a new ID.

What is the difference between CLAUDE.md and custom subagents?

CLAUDE.md files provide persistent project context loaded automatically at startup, covering architecture, commands, and code standards. Subagents defined in .claude/agents/ are specialized personas with their own model and tool restrictions, invoked explicitly with @ mentions.

Why does Claude Code hit context limits during long sessions?

Long sessions accumulate tool outputs and conversation history until precision degrades above 70-85% context usage. Use /compact to compress history, /clear for a fresh start, or /context to visualize usage before hallucination risk increases.