Get a second opinion from OpenAI's Codex CLI running locally.

MITAuto-check: warningsDevelopment

Install Second Opinion

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add peterkrueck/Claude-Code-Development-Kit --skill second-opinion -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install peterkrueck/Claude-Code-Development-Kit second-opinion --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/peterkrueck/Claude-Code-Development-Kit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/second-opinion .claude/skills/second-opinion && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
second-opinion
GitHub stars
1.4k
Token cost
~2.4k tokens
SKILL.md length
1,249 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

Get a second opinion from OpenAI's Codex CLI running locally.

  • Works in 3 steps: Prepare the Prompt → Invoke Codex → Present the Result
  • In Plan Mode for large
  • SKILL.md covers When to Use, Process and Important Rules
  • Calls codex

What it does

Second Opinion is an agent skill from peterkrueck/Claude-Code-Development-Kit. Get a second opinion from OpenAI's Codex CLI running locally. Use this skill when in Plan Mode for large or critical tasks, when stuck on a debugging dead end, when facing architecture trade-offs, for subtle edge cases in code review, or any situation where an independent perspective would add value. Also use when the user explicitly asks for a "second opinion", "another perspective", "cross-check this", "ask Codex", or "ask GPT". This is the DEFAULT second-opinion engine — Codex runs a completely different model…

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Planning. It works with OpenAI. The repository describes itself as: Claude Code Workflow for beginners & intermediate users. Tutorial and Installer included. The licence is MIT.

When your agent uses it

  • In Plan Mode for large
  • Stuck on a debugging dead end
  • Facing architecture trade-offs
  • For subtle edge cases in code review

Example prompts

  • “second opinion”
  • “another perspective”
  • “cross-check this”
  • “/second-opinion”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Prepare the Prompt
  2. Invoke Codex
  3. Present the Result

What it can do on your machine

Read from SKILL.md and the folder at commit ba85375. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • codex

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Second Opinion loads about 2.4k tokens when it runs. Until then it costs about 195 tokens; SKILL.md has 1,249 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~195
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • WarningTells the agent its actions are pre-authorized / not to stop for confirmationSKILL.md:80
    ulti-turn conversation autonomously** — do NOT ask the user for permission between rounds. Push back on Codex's points,

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from peterkrueck/Claude-Code-Development-Kit at commit ba85375, republished under its MIT licence (© peterkrueck). 1,249 words, ~2,384 tokens.

Download SKILL.mdSave it as .claude/skills/second-opinion/SKILL.md (or your agent's skills folder).
name
second-opinion
description
Get a second opinion from OpenAI's Codex CLI running locally. Use this skill when in Plan Mode for large or critical tasks, when stuck on a debugging dead end, when facing architecture trade-offs, for subtle edge cases in code review, or any situation where an independent perspective would add value. Also use when the user explicitly asks for a "second opinion", "another perspective", "cross-check this", "ask Codex", or "ask GPT". This is the DEFAULT second-opinion engine — Codex runs a completely different model architecture from Claude, so it catches blind spots Claude shares with itself. For a Gemini second opinion specifically, the user says "ask Gemini" (separate second-opinion-gemini skill); "ask both" runs this skill and that one, then synthesizes.
user_invocable
false

Second Opinion — OpenAI Codex

Get an independent second opinion from OpenAI's Codex CLI. It uses Codex's default model — a completely different architecture and training run from Claude, which makes it genuinely useful for catching blind spots, validating reasoning on edge cases, or surfacing trade-offs Claude would miss (Claude's own errors tend to be invisible to Claude).

Codex has full read access to the project — it can read files, grep code, and explore the codebase. Its project instructions (AGENTS.md at the repository root) tell it to prime itself on the key docs before answering. You provide the specific question and any focused context; Codex handles the rest.

This is the default second-opinion engine. For a Gemini second opinion specifically, the user invokes the separate second-opinion-gemini skill ("ask Gemini"). When the user says "ask both", run this skill and that one, then synthesize all three views (yours + Codex + Gemini).

When to Use

  • Architecture decisions with real trade-offs
  • Debugging where you've been going in circles
  • Code review on tricky logic or subtle edge cases
  • Validating your reasoning before the user acts on it
  • When the user explicitly asks for a second opinion

Don't use this for routine tasks — every call takes 10-60+ seconds and consumes ChatGPT-plan quota. Reserve it for decisions where being wrong has real consequences.

Process

Step 1: Prepare the Prompt

Codex has NO access to your conversation history, but it CAN read project files. Structure your prompt as:

  1. The question — what exactly you want Codex to weigh in on
  2. Your current thinking (recommended) — share your position so Codex can challenge it
  3. Relevant area (optional) — if the project has distinct modules or components, state which one this is about so Codex primes on the right docs. Default is the whole project; only narrow this when it helps.
  4. Specific context (if needed) — pipe code snippets or diffs via stdin when the relevant code is scattered or you want to focus attention on specific sections

For questions about existing project code, you can simply reference file paths — Codex will read them itself.

Step 2: Invoke Codex

In the commands below, <repo-root> is the root of your repository — the directory containing AGENTS.md (and your .git directory). Use an absolute path so AGENTS.md and the project docs are discoverable regardless of the current working directory.

CRITICAL: Permission-free invocation pattern. The command MUST start with codex (matches the Bash(codex:*) allow rule) and MUST NOT use $() command substitution or /tmp/ file redirects — both trigger permission prompts.

Standard call (Codex reads project files itself — preferred):

bash
codex exec -s read-only -C <repo-root> '<your question here>' < /dev/null

With context piped via stdin (for code snippets, diffs, or focused excerpts — Codex appends piped stdin as a <stdin> block):

bash
codex exec -s read-only -C <repo-root> '<your question here>' <<'CONTEXT_EOF'
<relevant code, diff, or context here>
CONTEXT_EOF

Required flags / arguments — no exceptions:

FlagWhy
execNon-interactive headless mode. Tool calls are auto-approved in this mode.
-s read-onlySandbox the consultant to read-only — it explores files but cannot modify anything. Matches its AGENTS.md "do not modify" instruction with a hard guarantee.
-C <repo-root>Working root = repository root, so AGENTS.md and the project docs are discoverable regardless of cwd.
< /dev/null (standard call)Close stdin so Codex doesn't block waiting on it when no context is piped.

DO NOT pass -m. Leave the model unset so Codex uses its own default. Pinning a slug goes stale, and the -codex model family (e.g. *-codex) is rejected on a ChatGPT-account login — only the chat models work, so leaving it unset is correct. If the default ever resolves to something that is NOT a real GPT chat model, treat the run as unavailable rather than accepting a degraded second opinion (see Important Rules).

Output shape. Codex prints a running transcript to stdout: a startup banner, its reasoning, any exec/tool calls it makes (e.g. rg, file reads), a tokens used line, and then the final answer as the trailing block. The Bash tool captures everything. The noise is easily identified and ignored — the final agent message is the last paragraph(s) after the tokens used line. If the output contains a 429, usage limit, quota, or rate limit error, treat as unavailable.

Set a 600-second timeout on the Bash tool call (Codex may need time to read files and reason through complex questions).

DO NOT use:

  • $() command substitution (e.g., RESPONSE=$(codex ...)) — triggers a permission prompt
  • /tmp/ file redirects (e.g., -o /tmp/out.txt or 2>/tmp/err.txt) — triggers an "allow access to tmp/" prompt
  • Nested heredocs inside $() — same issue
Show full SKILL.md (529 more words)Show less
Step 2b: Multi-Turn Discussion (Autonomous)

When the topic warrants debate (architecture, design reviews, trade-off analysis), run the full multi-turn conversation autonomously — do NOT ask the user for permission between rounds. Push back on Codex's points, let Codex push back on yours, iterate until you reach consensus or clearly identify the disagreements. Typically 2-4 rounds.

Resume the session instead of starting fresh to preserve conversation history:

bash
codex -C <repo-root> -s read-only exec resume --last '<your follow-up question>' < /dev/null

Flag order matters on resume. The resume sub-subcommand does NOT accept -s/--sandbox or -C/--cd (unlike codex exec, which does) — passing them after resume fails with error: unexpected argument '-s' found. Put both globals BEFORE the exec resume chain (they're root-level flags on codex and propagate down), as shown above.

You can also resume a specific session by id: codex -C <repo-root> -s read-only exec resume <SESSION_ID> '<follow-up>' < /dev/null. The session id is printed in the startup banner of the first call (session id: <uuid>).

When to use multi-turn:

  • Design reviews or architecture discussions — run the full debate autonomously
  • Codex's answer is vague — ask it to be specific about the part that matters
  • You want to challenge Codex's reasoning — push back and see if it holds
  • The question naturally has layers — e.g., "which approach?" then "what are the migration risks of that one?"

When NOT to use multi-turn:

  • The first answer was clear and complete — just present it
  • You're asking an unrelated question — start a fresh session (omit resume)
Step 3: Present the Result

If multi-turn: Present a consolidated synthesis — the key agreements, remaining disagreements, and your joint recommendation. Don't dump each round's raw output; the user wants the conclusion, not the transcript.

If single-turn: Present Codex's response, then add your own brief synthesis: where you agree, where you disagree, and what the user should take away from both perspectives. The value is in the synthesis, not just the raw second opinion.

If Codex is unavailable (quota / usage limit / 429 / rate limit):

Codex is currently unavailable (usage limit / rate limited). I won't silently swap in a weaker model. You can say "ask Gemini" for an independent second opinion from a different architecture, or I'll proceed with my own analysis only.

Do NOT silently fall back to a different model within Codex. Report unavailability, offer Gemini as the alternate independent voice, and continue with your own reasoning.

If there's another error, show the filtered output and continue with your own reasoning.

Important Rules

  1. Don't accept a degraded model silently. The whole value is an independent second architecture. Leaving the model unset (Codex's default chat model) is correct; if the default ever resolves to a non-GPT or a thin/local model, report it rather than presenting it as a meaningful second opinion.
  2. Don't over-use. This is for genuinely tricky decisions, not routine coding questions you can answer confidently yourself.
  3. Shell quoting matters. For prompts containing single quotes, escape with '\''. For very complex prompts, use the stdin heredoc form (see Step 2).
  4. Command must start with codex to match the Bash(codex:*) allow rule. Never wrap in $() or redirect to /tmp/.
  5. Codex is read-only here. Always pass -s read-only. Never grant it write/danger-full-access sandbox modes for a second opinion — it's a consultant, not a builder.

© peterkrueck, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/second-opinion of peterkrueck/Claude-Code-Development-Kit.

Open the folder on GitHubat commit ba85375

Compare with similar skills

Second Opinion next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Second Opinion compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Second Opinion this skillpeterkrueck/Claude-Code-Development-Kit1.4k—~2.4kAutomated safety check: WarnMIT
Coding Protocollencx/skills196—~2.4kAutomated safety check: PassMIT
Codex with ChatGPT Planning LoopXiaoDuoYa/codex-with-chatgpt7.1k—~11kAutomated safety check: NotesMIT
LLM Councilgcpdev/llm-council-skill461—~1kAutomated safety check: NotesMIT
Test Ocas Openclawpwrdrvr/openclaw-codex-app-server265—~4kAutomated safety check: PassMIT
Reviewraine/consult-llm140—~2.4kAutomated safety check: NotesMIT

Similar skills

  • Coding Protocol

    lencx/skills

    Risk-scaled repo execution and code-evidence protocol. An agent skill from lencx/skills.

    196 GitHub stars~2.4k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Codex with ChatGPT Planning Loop

    XiaoDuoYa/codex-with-chatgpt

    Uses ChatGPT in the browser as the planning and review brain for a Codex session, with Codex keeping all execution and ChatGPT reading the workspace through a bridge.

    7.1k GitHub stars~11k tokensUpdated 8 days ago
    Agent WorkflowsAuto-check: notes
  • LLM Council

    gcpdev/llm-council-skill

    Multi-LLM collaborative brainstorming and planning. An agent skill from gcpdev/llm-council-skill.

    461 GitHub stars~1k tokensUpdated 9 mo ago
    Agent WorkflowsAuto-check: notes
  • Test Ocas Openclaw

    pwrdrvr/openclaw-codex-app-server

    Regression test the OpenClaw Codex App Server plugin against a live local OpenClaw instance in Telegram or Discord.

    265 GitHub stars~4k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Review

    raine/consult-llm

    Collect critical feedback from all registered LLMs on an artifact (architecture doc, implementation, plan).

    140 GitHub stars~2.4k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check: notes
  • Build Software Component

    GAIK-project/gaik-toolkit

    Creates a new GAIK software component as an installable Python package.

    100 GitHub stars~3k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from peterkrueck/Claude-Code-Development-Kit

All 9 skills in this repo
  • Image Edit

    peterkrueck/Claude-Code-Development-Kit

    Edit images with precision — crop, resize, mirror, rotate, trim, and reframe.

    1.4k GitHub stars~1.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Image Gen

    peterkrueck/Claude-Code-Development-Kit

    Generate character art and image variations using AI image generation (Google Gemini) with reference images for style and character consistency.

    1.4k GitHub stars~1.4k tokensUpdated 2 mo ago
    Auto-check passed
  • Bg Remove

    peterkrueck/Claude-Code-Development-Kit

    Remove backgrounds from images using local AI (rembg). An agent skill from peterkrueck/Claude-Code-Development-Kit.

    1.4k GitHub stars~1.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Context7 Guidance

    peterkrueck/Claude-Code-Development-Kit

    Fetch CURRENT library/framework/API/CLI documentation via Context7 instead of relying on training data.

    1.4k GitHub stars~671 tokensUpdated 2 mo ago
    Auto-check passed
  • Deploy

    peterkrueck/Claude-Code-Development-Kit

    Test and deploy changes safely. An agent skill from peterkrueck/Claude-Code-Development-Kit.

    1.4k GitHub stars~3.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Second Opinion Gemini

    peterkrueck/Claude-Code-Development-Kit

    Get a second opinion from Google's Gemini Pro via the locally installed Gemini CLI (defaults to gemini-3.1-pro-preview; override with the CLAUDESECONDOPINIONMODEL env var).

    1.4k GitHub stars~2.3k tokensUpdated 2 mo ago
    Auto-check: warnings

Works with

Questions about Second Opinion

What does Second Opinion do?

Get a second opinion from OpenAI's Codex CLI running locally. Second Opinion is an agent skill from peterkrueck/Claude-Code-Development-Kit. Get a second opinion from OpenAI's Codex CLI running locally.

When should I use Second Opinion?

Second Opinion fits situations like: in Plan Mode for large; stuck on a debugging dead end; facing architecture trade-offs; for subtle edge cases in code review.

How do I install Second Opinion in Claude Code?

Run `npx skills add peterkrueck/Claude-Code-Development-Kit --skill second-opinion -a claude-code`. Or copy the skill folder (skills/second-opinion in peterkrueck/Claude-Code-Development-Kit) into .claude/skills/second-opinion in your project. Claude Code loads it when a task matches its description.

How do I install Second Opinion in Codex?

Run `npx skills add peterkrueck/Claude-Code-Development-Kit --skill second-opinion -a codex`. Or copy the skill folder (skills/second-opinion in peterkrueck/Claude-Code-Development-Kit) into .agents/skills/second-opinion in your project. Codex loads it when a task matches its description.

Can I use Second Opinion in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add peterkrueck/Claude-Code-Development-Kit --skill second-opinion -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/second-opinion, .gemini/skills/second-opinion, .github/skills/second-opinion and .opencode/skills/second-opinion in your project.

What does Second Opinion need to run?

Going by SKILL.md and its folder, Second Opinion needs the command-line tools its instructions call (codex).

Does Second Opinion access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Second Opinion safe to install?

Our automated static check of SKILL.md flagged 1 warning(s): tells the agent its actions are pre-authorized / not to stop for confirmation. Read the flagged lines before installing; the check is not a guarantee either way.

What licence does Second Opinion use?

Second Opinion is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Second Opinion use?

About 2.4k tokens (SKILL.md is roughly 9.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Second Opinion?

Skills that share tags, products or a category with Second Opinion: Coding Protocol (lencx/skills, 196 stars), Codex with ChatGPT Planning Loop (XiaoDuoYa/codex-with-chatgpt, 7.1k stars), LLM Council (gcpdev/llm-council-skill, 461 stars) and Test Ocas Openclaw (pwrdrvr/openclaw-codex-app-server, 265 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Second Opinion?

peterkrueck (a GitHub user) maintains it in peterkrueck/Claude-Code-Development-Kit, which has 1,386 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on July 22, 2026.

Source: peterkrueck/Claude-Code-Development-Kit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.