From claude-exec
Delegate code review, plan review, and exploration to Claude Code CLI. Use when you need an independent second opinion on code changes, plans, or architecture — or when asked to run claude review/exec.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-exec:claude-execThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Delegate review and exploration tasks to an **independent Claude sub-agent** for a second opinion. The sub-agent acts as a strict counter-reviewer that catches blind spots you might miss.
Delegate review and exploration tasks to an independent Claude sub-agent for a second opinion. The sub-agent acts as a strict counter-reviewer that catches blind spots you might miss.
Use this skill when:
claude for review, or to "get claude's opinion"Do NOT use this skill for tasks where you are confident in the output and the user hasn't asked for a second opinion. Reserve it for quality gates and deliberate review steps.
If the Agent tool is available (Claude Code): use it. The Agent tool streams output natively — the user sees progress as the sub-agent works, with no timeout or buffering issues.
If the Agent tool is NOT available (other environments): fall back to claude -p via the Bash tool. See the CLI Fallback section for the correct invocation pattern.
subagent_type to "general-purpose" — this gives the sub-agent access to Read, Glob, Grep, and Bash for exploring the codebase.run_in_background: true on the Agent tool call if you have other work to do while the review runs.Agent tool call:
subagent_type: "general-purpose"
description: "Review branch changes"
prompt: "You are a strict code reviewer. Review the changes on this branch compared to main. Run `git diff main...HEAD` to see the full diff. Check for correctness, edge cases, security issues, and code clarity. Reference specific files and lines. IMPORTANT: Research only — do not edit any files."
Agent tool call:
subagent_type: "general-purpose"
description: "Review uncommitted changes"
prompt: "You are a strict code reviewer. Review all uncommitted changes (run `git diff` and `git diff --cached`). Check for correctness, edge cases, and code clarity. Be specific with file:line references. IMPORTANT: Research only — do not edit any files."
Agent tool call:
subagent_type: "general-purpose"
description: "Review implementation plan"
prompt: "You are a strict plan reviewer. Read the plan in PLAN.md. Be a strict critic: identify gaps, missing edge cases, wrong assumptions, and over-engineering. Suggest concrete improvements. IMPORTANT: Research only — do not edit any files."
Agent tool call:
subagent_type: "general-purpose"
description: "Deep codebase exploration"
prompt: "Explore the codebase for inconsistencies, dead code, and simplification opportunities. Focus on the src/ directory. Be specific with file:line references. IMPORTANT: Research only — do not edit any files."
Use multiple Agent calls in a single message for independent reviews:
Agent call 1:
description: "Review API changes"
prompt: "Review changes in src/api/ on this branch vs main..."
Agent call 2:
description: "Review test coverage"
prompt: "Check test coverage for changes on this branch vs main..."
| Parameter | Purpose |
|---|---|
subagent_type: "general-purpose" | Gives sub-agent access to Read, Glob, Grep, Bash |
description | Short label shown to the user (3-5 words) |
prompt | The review instructions — be specific |
run_in_background: true | Run review while you continue other work |
model: "sonnet" or model: "opus" | Override model for speed vs depth |
Use this when the Agent tool is not available (e.g., Codex, other non-Claude environments).
--permission-mode plan. It redirects output to an internal plan file instead of stdout, producing empty or 1-line output. Use --allowedTools to restrict tools instead.--max-turns to prevent the sub-claude from exhausting all turns on tool calls without producing a text response. Use --max-turns 3 for reviews, --max-turns 5 for deep digs, or --tools "" --max-turns 1 for prompt-only (no file access).--allowedTools, pipe the prompt via stdin — --allowedTools is a variadic flag that consumes all subsequent positional arguments, including the prompt. Use echo 'prompt' | claude -p ....--allowedTools, pass the prompt as a positional argument — claude -p --max-turns 3 'prompt' works fine.2>&1 at the end of the command to capture stderr alongside stdout.--no-session-persistence to avoid littering the user's session history with sub-agent sessions.< /tmp/claude-prompt.txt). Do not use inline HEREDOCs like $(cat <<'EOF'...) — they break in some shell environments.# Review current branch against main (with --allowedTools, prompt via stdin)
echo 'Review the changes on this branch compared to main. Run `git diff main...HEAD` to see the full diff. Be a strict reviewer: check for correctness, edge cases, security issues, and code clarity. Reference specific files and lines.' \
| claude -p --max-turns 3 --no-session-persistence \
--allowedTools "Bash(git:*)" "Read" "Glob" "Grep" 2>&1
# Simpler review without tool restrictions (prompt as positional arg)
claude -p --max-turns 3 --no-session-persistence \
'Review the changes on this branch vs main. Focus on error handling and security. Run `git diff main...HEAD`.' \
2>&1
# Prompt-only review — no file access, single-turn response
claude -p --tools "" --max-turns 1 --no-session-persistence \
'Review this diff for correctness...' 2>&1
# BAD: --permission-mode plan causes empty stdout
claude -p --permission-mode plan 'Review...'
# BAD: --allowedTools eats the positional prompt — prompt is lost
claude -p --allowedTools "Read Glob Grep" 'Review...'
# BAD: No --max-turns — sub-claude may exhaust turns on tool calls
claude -p 'Review...'
# BAD: HEREDOC expansion — breaks in Bash tool shell
claude -p "$(cat <<'EOF'
long prompt here
EOF
)"
# BAD: Missing 2>&1 — stderr errors are invisible
claude -p --max-turns 3 'Review...'
| Flag | Purpose |
|---|---|
-p, --print | Non-interactive mode — print response and exit (required for delegation) |
--model <model> | Override model (e.g., --model sonnet, --model opus) |
--max-turns <n> | Limit tool-use turns. Use 1 for prompt-only, 3 for reviews, 5 for deep digs |
--tools "" | Disable all tools — forces a single-turn text response |
--allowedTools "..." | Restrict to specific tools. Variadic — must pipe prompt via stdin when used |
--no-session-persistence | Don't save the sub-agent session to disk |
sonnet for faster reviews, opus for deeper analysis.npx claudepluginhub mrshu/agent-skills --plugin claude-execUse when the user asks to run Claude Code CLI (`claude`, `claude resume`) for review, analysis, implementation, refactoring, debugging, or follow-up specifically through Claude Code.
Orchestrates cross-agent code review: Claude implements plans/code, Codex CLI reviews via bash scripts. Activates on 'codex review' or Russian triggers.
Invokes a different AI model for independent code review, catching bugs that self-review misses. Useful for PR review or second opinions on code.