mykaarma/kaarma-skills/second-opinion
Claude Code and agent skill by mykaarma/kaarma-skills
- community
Checking that the SKILL.md file is still in the repository.
Use when you have a written implementation plan and want an independent review before execution. Dispatches Codex CLI or a Claude subagent to analyze the plan for flaws, gaps, and risks. Invoke manually with /second-opinion.
Install
npx vskill@latest install mykaarma/kaarma-skills/second-opinionSKILL.md
Second Opinion — Independent Plan Review
Overview
Review an implementation plan before execution by dispatching an independent reviewer — either Codex CLI (local) or a Claude subagent. The reviewer analyzes the plan against the actual codebase and returns a structured report with a verdict: PROCEED, REVISE, or RETHINK.
Where this fits:
<HARD-GATE> This skill NEVER modifies the plan file. It NEVER invokes execution skills. It only presents findings. The user decides what to do next. </HARD-GATE>
When to Use
- After
/write-planproduces a plan and before/execute-plan - When a plan touches unfamiliar parts of the codebase
- When a plan involves risky changes (migrations, schema changes, breaking APIs)
- When you want a fresh perspective before committing to execution
Process
You MUST follow these 5 steps in order:
Step 1: Locate the Plan
Check if the user provided a plan path as an argument. If not:
- Scan
docs/plans/for plan files - List the most recent plans with their dates and names
- Ask the user to pick one
If docs/plans/ doesn't exist or is empty, ask the user for the plan file path directly.
Step 2: Gather Context
- Read the plan file completely
- Extract file paths mentioned in the plan — look for patterns like:
- Explicit paths:
src/main/java/...,path/to/file.ext - Code blocks referencing files:
Modify: path/to/file - Import statements referencing project files
- Present detected files to the user:
- If the user types "no", "none", "skip", or "done" — proceed with detected files only
- If the user @ mentions files — add those files to the context and proceed
- Read all confirmed files and store their contents
Step 3: Choose Reviewer
Always ask the user:
If user picks Codex CLI:
- Check if
codexis installed: runwhich codex - If not found, tell the user:
`` Codex CLI not found. Install it with: npm install -g @openai/codex Then authenticate with: codex login Or choose option 2 (Claude subagent) instead. ``
- If installed but not authenticated (command fails with auth error), tell the user:
`` Codex CLI is not authenticated. Run: codex login Or choose option 2 (Claude subagent) instead. ``
- Do not proceed with Codex path if not installed or not authenticated
If user picks Claude subagent:
- No prerequisites needed, proceed directly
Step 4: Dispatch Review
Build the prompt:
- Read the review prompt template from
reference/review-prompt-template.md(relative to this skill's directory) - Replace
{{PLAN_CONTENT}}with the full plan file contents - Replace
{{FILE_CONTENTS}}with all gathered context files, each preceded by its file path as a header:
``` ### File: src/main/java/.../PaymentService.java <file contents>
### File: src/main/resources/.../V42__add_column.sql <file contents> ```
Codex CLI path:
- Write the assembled prompt to a temp file:
/tmp/second-opinion-prompt-<timestamp>.md - Run Codex in non-interactive mode, capturing only the final response:
``bash codex exec --output-last-message /tmp/second-opinion-result-<timestamp>.md "$(cat /tmp/second-opinion-prompt-<timestamp>.md)" 2>/dev/null ``
- Use
codex exec(non-interactive mode) — NOT the interactivecodexcommand - Use
--output-last-message <file>to capture the final agent message cleanly - Redirect stderr (
2>/dev/null) to suppress session logs, model info, and connection noise - Tell the user: "Codex is reviewing the plan... this may take a minute."
- Read the result file and present it
- Clean up both temp files (
/tmp/second-opinion-prompt-*and/tmp/second-opinion-result-*)
Claude subagent path:
- Dispatch a
general-purposeAgent with the assembled prompt as the task - The prompt already contains all instructions and the required output format
- Capture the returned result
Step 5: Present Results
- Display the reviewer's structured report as-is (it follows the template format):
- Verdict (PROCEED / REVISE / RETHINK)
- Critical Issues
- Gaps
- Suggestions
- What's Good
- Based on the verdict, add guidance:
If PROCEED: `` The plan looks solid. You can proceed to execution with /execute-plan. ``
If REVISE: `` The plan needs updates before execution. Address the Critical Issues and Gaps above, then re-run /second-opinion to verify, or proceed to /execute-plan if you're confident in your fixes. ``
If RETHINK: `` The reviewer found fundamental issues with the approach. Consider revisiting the design with /brainstorm before creating a new plan. ``
Key Constraints
- Manual only — this skill is never auto-triggered. User must invoke
/second-opinion. - Read-only — never modify the plan file, never modify codebase files.
- No execution — never invoke
/execute-planor any implementation skill. - Context size — if the assembled prompt (plan + files) is very large, warn the user and suggest trimming context or switching to the subagent path which handles larger context better.
- Temp file cleanup — always delete
/tmp/second-opinion-prompt-*.mdafter Codex finishes.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/second-opinion/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mykaarma/kaarma-skills/second-opinion)