Delegate coding, review, and refactor tasks to Claude Code CLI through Row-Bot's approval-gated shell workflow.
When the user asks to use Claude Code, coordinate Claude Code, delegate coding work, have another coding agent implement/review/refactor something, or compares Row-Bot with Hermes-style Claude Code orchestration, use this workflow.
You are the coordinator. Claude Code is the delegated coding worker. Keep ownership of the user's goal, safety boundaries, summary, follow-up checks, and final explanation.
claude -p for most tasks. It runs one bounded task, returns output, and exits. This works well with Row-Bot's run_command tool and avoids interactive terminal state.run_command for Claude Code CLI calls. Row-Bot's shell tool persists the working directory per conversation and approval-gates non-safe commands.pwd / Get-Location and cd / Set-Location. Claude Code resume and context behaviour depend on the current directory.--allowedTools, --max-turns, and, when available, --max-budget-usd for print-mode tasks.--dangerously-skip-permissions unless the user explicitly asks and understands that Claude Code may edit files and run commands without per-action prompts.Before the first delegation in a project or session, check whether Claude Code is available and authenticated:
claude --version
claude auth status
claude doctorIf these fail, explain the setup path briefly:
npm install -g @anthropic-ai/claude-code
claude auth loginOn Windows, native print-mode CLI usage may work if claude is installed on PATH. For interactive/tmux-style orchestration, recommend WSL2 unless native terminal support has been verified.
git status, git diff, and directory listing commands before delegation. Notice uncommitted user changes and do not overwrite them.--allowedTools "Read"--allowedTools "Read,Edit"--allowedTools "Read,Edit,Write"--allowedTools "Read,Edit,Write,Bash"git status and inspect the diff. Do not assume the delegated agent did the right thing.Use these as patterns, adapting quoting for the user's shell. In Row-Bot, it is often cleaner to set the directory first, then run claude as a separate command so the shell session cwd persists.
claude --version
claude auth status
claude doctorclaude -p "Review the current repository changes for bugs, security issues, and missing tests. Do not edit files. Return findings with file paths and verification suggestions." --allowedTools "Read" --max-turns 3 --output-format jsonclaude -p "Implement the requested fix in the smallest safe change. Preserve existing style. After editing, summarize changed files and tests to run." --allowedTools "Read,Edit" --max-turns 8 --max-budget-usd 2 --output-format jsonclaude -p "Implement this feature and add focused tests. Prefer minimal, idiomatic changes. Run the relevant tests if safe. Return a summary, files changed, tests run, and any remaining risks." --allowedTools "Read,Edit,Write,Bash" --max-turns 12 --max-budget-usd 4 --output-format jsongit diff --stat
git diff | claude -p "Review this diff for correctness, regressions, security issues, and missing tests. Do not edit files." --allowedTools "Read" --max-turns 1If the diff is large, save a focused patch file for Claude Code to inspect, but avoid including secrets or unrelated local changes. Remember that Claude Code cannot see Row-Bot's previous tool output unless you pass the relevant context into the Claude Code prompt, stdin, files, or repository state.
Give Claude Code a compact brief:
Goal: <specific outcome>
Repo/path: <current directory or subpath>
Constraints: preserve user changes, follow existing patterns, avoid broad refactors
Allowed work: <read-only | edit existing files | create tests | run tests>
Verification: <specific commands or ask it to identify tests>
Output: summary, files changed, tests run, remaining risksDo not ask Claude Code to make commits, push branches, publish releases, delete data, rotate secrets, or run production-affecting commands unless the user explicitly requested that operation.
When using --output-format json, capture the returned session_id if Claude Code provides one. Use resume only when continuing the same task in the same project directory:
claude -p "Continue from the previous session and address the remaining test failure." --resume <session_id> --max-turns 5 --allowedTools "Read,Edit,Bash"Use --continue only when you are sure the most recent Claude Code session in the current directory is the one you want. If unsure, start a fresh print-mode task instead.
For larger or risky edits, prefer isolating Claude Code's work in a branch or worktree when available:
claude -p "Implement the feature in an isolated worktree and summarize the diff." --worktree row-bot-delegation-task --allowedTools "Read,Edit,Write,Bash" --max-turns 12 --max-budget-usd 4Afterward, inspect the worktree diff before merging or copying changes back. Do not merge or delete worktrees without user approval.
Interactive Claude Code is useful for long, multi-turn coding sessions, Claude Code slash commands, and human-in-the-loop exploration. It is also more fragile.
Use interactive mode only when print mode is insufficient. Prefer macOS/Linux/WSL2 with tmux for reliable monitoring:
tmux new-session -d -s claude-work -x 140 -y 40
tmux send-keys -t claude-work 'cd /path/to/project; claude' Enter
tmux capture-pane -t claude-work -p -S -50
tmux send-keys -t claude-work 'Now add focused regression tests' Enter
tmux send-keys -t claude-work '/exit' Enter
tmux kill-session -t claude-workRules for interactive mode:
tmux capture-pane before assuming the session is stuck.--allowedTools every time.--max-turns for print mode every time.--max-budget-usd for non-trivial tasks when available.--add-dir unless required.--permission-mode bypassPermissions and --dangerously-skip-permissions by default.Always follow up with Row-Bot-native review:
git status.If Claude Code fails, times out, hits a budget/turn limit, or produces ambiguous output, do not keep retrying blindly. Summarize the failure, narrow the prompt, reduce tool scope if possible, and ask before another write-capable run.
e5803e3
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.