/samocode:codexfrom samocode
Runs OpenAI Codex CLI as a subagent for second opinions, code reviews, and questions. Useful when you want a different AI model's perspective.
Ships in samocode. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Run OpenAI Codex CLI with its own configured model for second opinions and external reviews. This is deliberately independent of the orchestration process's provider and semantic profile.
Before using Codex, verify it's installed:
which codex >/dev/null 2>&1 || echo "CODEX_NOT_INSTALLED"
If not installed, inform the user: "Codex CLI is not installed. Skipping Codex review."
OUTPUT_FILE=$(mktemp)
codex exec \
--skip-git-repo-check \
--dangerously-bypass-approvals-and-sandbox \
-o "$OUTPUT_FILE" \
"$PROMPT" </dev/null 2>/tmp/codex_stderr.log
cat "$OUTPUT_FILE"
rm "$OUTPUT_FILE"
| Flag | Purpose |
|---|---|
exec | Non-interactive mode |
--skip-git-repo-check | Run outside git repositories |
--dangerously-bypass-approvals-and-sandbox | No prompts, no sandbox restrictions |
-o <file> | Capture clean output to file |
</dev/null | Required. Close stdin — without it codex blocks on "Reading additional input from stdin..." and the -o file comes back empty (exit 0, zero bytes). Bites hardest in non-interactive / background Bash where there's no TTY. |
2>/tmp/codex_stderr.log | Send stderr to a file, not 2>/dev/null — if codex hangs or errors you need to see the stdin/auth message. Inspect the log when the output file is empty. |
Codex can take several minutes for complex prompts. Use 15 minute timeout:
timeout 900 codex exec --skip-git-repo-check --dangerously-bypass-approvals-and-sandbox -o "$OUTPUT_FILE" "$PROMPT" </dev/null 2>/tmp/codex_stderr.log
OUTPUT_FILE=$(mktemp)
codex exec --skip-git-repo-check --dangerously-bypass-approvals-and-sandbox -o "$OUTPUT_FILE" \
"What are the tradeoffs between Redis and Memcached for session storage?" </dev/null 2>/tmp/codex_stderr.log
cat "$OUTPUT_FILE"
rm "$OUTPUT_FILE"
DIFF=$(git diff main...HEAD)
OUTPUT_FILE=$(mktemp)
codex exec --skip-git-repo-check --dangerously-bypass-approvals-and-sandbox -o "$OUTPUT_FILE" \
"Review this diff for issues:
$DIFF
List concerns with severity (blocking/important/nice-to-have)." </dev/null 2>/tmp/codex_stderr.log
cat "$OUTPUT_FILE"
rm "$OUTPUT_FILE"
OUTPUT_FILE=$(mktemp)
codex exec --dangerously-bypass-approvals-and-sandbox -C /path/to/repo -o "$OUTPUT_FILE" \
"Analyze the architecture of this codebase" </dev/null 2>/tmp/codex_stderr.log
cat "$OUTPUT_FILE"
rm "$OUTPUT_FILE"
Codex has access to gh CLI. Pass the PR URL and let it fetch the diff:
OUTPUT_FILE=$(mktemp)
timeout 900 codex exec --skip-git-repo-check --dangerously-bypass-approvals-and-sandbox -o "$OUTPUT_FILE" \
"Review this PR: https://github.com/owner/repo/pull/123
Use gh CLI to get the diff and review for issues." </dev/null 2>/tmp/codex_stderr.log
cat "$OUTPUT_FILE"
rm "$OUTPUT_FILE"
/dev/null. Even with a prompt passed as an argument, codex exec reads stdin; in a non-interactive/background Bash call with no TTY it blocks ("Reading additional input from stdin...") and the -o output file ends up empty with exit code 0.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (yuvasee/samocode) — no native marketplace selected
npx claudepluginhub p/yuvasee-samocode20 skills in this plugin
/claudeRun Anthropic Claude CLI as a subagent for second opinions, code reviews, and questions. Use from a Codex (or other) session when you want Claude's perspective./code-clarityReview changed code for human comprehension cost — names, local reasoning, hidden state, working-memory load — and report findings with an impact/cost/risk assessment table. Review-only; never modifies code. Use when asked for a clarity review, readability review, comprehension-cost analysis of a diff/PR, or when running /code-clarity. Works in Claude Code and Codex./comment-hygieneCurate source-code comments and docstrings — delete AI-slop and stale comments, keep only the non-obvious WHY, and never change executable code. Use when cleaning up comments/docstrings, during a samocode cleanup or quality-review step, when running /comment-hygiene, or when reviewing a diff for comment quality. Works in Claude Code and Codex./companionStart and supervise Samocode while the parent does independent scoped work and maintains a human-readable HTML explanation in the session. Use when asked to run Samocode with a live walkthrough, companion, or parallel parent work; not for a standalone status query./create-pr-commentsCreate GitHub PR review comments from review findings. Use after running a code review to post findings as line-bound comments./implementationExecute implementation tasks with different approaches (single, dual-agent, plan-based).Other plugins' skills for the same job