AGENT SKILL

claude-code-orchestration

Orchestrate Claude Code (Anthropic CLI) as a subagent. Two modes — print mode (one-shot, fast) and PTY/tmux mode (interactive, multi-turn). Use when delegating a coding task to a fresh Claude Code session with restricted tools.

License 许可
MIT
最近更新
2026-11-14
Stars
★ 13
Forks
2

01 前言 Front Matter

name
claude-code-orchestration
source
https://github.com/NousResearch/hermes-agent
license
MIT
description
Orchestrate Claude Code (Anthropic CLI) as a subagent. Two modes — print mode (one-shot, fast) and PTY/tmux mode (interactive, multi-turn). Use when delegating a coding task to a fresh Claude Code session with restricted tools.

03 SKILL.md 正文

Claude Code Orchestration

Run Claude Code as a controlled subagent. Useful for isolated tasks that need their own context window, or to parallelize across multiple sessions.

Trigger phrases: "run claude code", "spawn claude", "delegate to claude code", "claude -p", "orchestrate claude", "claude subagent"


Mode 1 — Print Mode (One-Shot)

Best for: self-contained tasks, CI-like execution.

# Basic one-shot
terminal(command="""
claude -p 'Add input validation to src/api/users.ts' \
  --allowedTools 'Read,Edit,Bash' \
  --max-turns 15 \
  --output-format text
""")

# With multi-line context
terminal(command="""
claude -p "$(cat <<'PROMPT'
Context: Fixing auth bug described in ISSUE.md.
Task: Fix JWT expiry check in src/auth/verify.ts.
Verify: Run npm test -- --testPathPattern=auth and confirm all pass.
PROMPT
)" --allowedTools 'Read,Edit,Bash' --max-turns 20
""")

Key flags:

Flag Use
--allowedTools 'Read,Edit,Bash' Restrict tools
--max-turns 15 Hard stop
--output-format text Clean output
--no-permission-prompts Auto-deny prompts (safe for subagents)

Mode 2 — PTY/tmux (Interactive Multi-Turn)

Best for: complex tasks requiring follow-up instructions.

# Start session
terminal(command="tmux new-session -d -s claude-work -x 220 -y 50")
terminal(command="tmux send-keys -t claude-work 'cd /workspace && claude' Enter")
terminal(command="sleep 3 && tmux capture-pane -t claude-work -p | tail -5")

# Send task
terminal(command="tmux send-keys -t claude-work 'Refactor src/auth/ to use new JWT library.' Enter")

# Monitor
terminal(command="sleep 30 && tmux capture-pane -t claude-work -p | tail -20")

# Follow-up
terminal(command="tmux send-keys -t claude-work 'Also update db/migrations/002_auth.sql' Enter")

# Collect + clean up
terminal(command="tmux capture-pane -t claude-work -p")
terminal(command="tmux kill-session -t claude-work")

Parallel Sessions

tasks = ["Fix auth", "Add tests", "Update docs"]
for i, task in enumerate(tasks):
    terminal(command=f"tmux new-session -d -s work-{i}")
    terminal(command=f"tmux send-keys -t work-{i} 'claude' Enter")
    terminal(command=f"tmux send-keys -t work-{i} '{task}' Enter")

# Collect all results
for i in range(len(tasks)):
    terminal(command=f"tmux capture-pane -t work-{i} -p | tail -10")
    terminal(command=f"tmux kill-session -t work-{i}")

Tool Restriction by Task Type

Task --allowedTools
Code review Read,Grep,Glob
Bug fix Read,Edit,Bash
New feature Read,Write,Edit,Bash
Docs update Read,Write,Edit

Always exclude WebFetch,WebSearch unless needed.


Anti-Fake-Pass

❌ No --max-turns → session runs forever
❌ tmux mode for simple one-shot → use print mode
❌ Not cleaning up tmux sessions → resource leak
❌ Sending next instruction before previous completes
❌ Not capturing output → can't verify what claude did

See Also

  • core/skills/claude-swarm-orchestration/SKILL.md — Python swarm with quality gate
  • core/agents/spec-executor.md — plan execution agent

04 同仓库更多 Skills

Horonomos-laps
Horonomos-laps/Yana-AI

openai--sentry--sentry

Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.

★ 13
Horonomos-laps
Horonomos-laps/Yana-AI

ito-basket-compare

Compare Itô prediction-market baskets against a user's knowledge base, portfolio notes, financial context, watchlist, or research thesis. Use for read-only basket comparison and gap analysis without investment advice or live trading.

★ 13
Horonomos-laps
Horonomos-laps/Yana-AI

implementing-network-traffic-baselining

Build network traffic baselines from NetFlow/IPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly/daily traffic pattern profiling

★ 13
Horonomos-laps
Horonomos-laps/Yana-AI

detecting-evasion-techniques-in-endpoint-logs

Detects defense evasion techniques used by adversaries in endpoint logs including log tampering, timestomping, process injection, and security tool disabling. Use when investigating suspicious endpoint behavior, building detection rules for evasion tactics, or conducting threat hunting for stealthy adversary activity. Activates for requests involving evasion detection, defense evasion analysis, log tampering detection, or MITRE ATT&CK TA0005.

★ 13
Horonomos-laps
Horonomos-laps/Yana-AI

implementing-microsegmentation-with-guardicore

Implementing microsegmentation using Akamai Guardicore Segmentation to map application dependencies, create granular network policies, visualize east-west traffic flows, and enforce least-privilege communication between workloads across data centers and cloud.

★ 13
Horonomos-laps
Horonomos-laps/Yana-AI

ramdisk-tmpfs-patterns

暂无简介

★ 13