
second-opinion
by Kurichi
SKILL.md
name: second-opinion description: "Automatically initiates Codex review sessions in tmux for implementation plans and significant code changes. Use this skill proactively when: (1) Exiting plan mode with a completed implementation plan, (2) Making substantial code changes that would benefit from peer review (multi-file refactors, architectural changes, complex features), (3) User explicitly requests Codex review. The skill manages tmux panes, polls for Codex responses, iterates on feedback, and closes the session when review is complete."
Second Opinion
Automatically leverage Codex for code review by launching review sessions in tmux panes, managing the review conversation, and iterating until approval.
When to Use
Use this skill proactively in these scenarios:
- After creating an implementation plan - Automatically when exiting plan mode
- Significant code changes - Multi-file refactors, architectural changes, new features
- User request - When explicitly asked to get Codex feedback
Decision heuristic: If the change is non-trivial and would benefit from a second opinion, use this skill.
Workflow
-
Start Review Session
- Create tmux horizontal split with Codex in right pane
- Send initial review prompt with context (plan file or code changes)
- Set up output monitoring
-
Poll for Response
- Check Codex output every 3-5 seconds
- Wait for response completion (detect output pause)
- Read and analyze feedback
-
Iterate on Feedback
- If issues found: Address them and send updated version
- If questions raised: Provide clarifications or counterarguments
- If approved: Proceed to closure
-
Close Session
- When review complete (no more concerns, implicit approval)
- Kill Codex pane
- Clean up session files
Implementation
Starting a Review
# Create review session with tmux split
OUTPUT_DIR="/tmp/codex-review-$(date +%s)"
./scripts/start_codex_review.sh "$REVIEW_PROMPT" "$OUTPUT_DIR"
The script creates:
- Horizontal tmux split (left: Claude Code, right: Codex)
- Output directory with session metadata
- Log file for Codex responses
Monitoring Progress
# Poll for new output (call every 3-5 seconds)
STATUS=$(./scripts/check_codex_status.sh "$OUTPUT_DIR")
if echo "$STATUS" | head -1 | grep -q "new_output"; then
# New response available
NEW_CONTENT=$(echo "$STATUS" | tail -n +2)
# Analyze and respond
fi
Sending Follow-ups
# Send response to Codex
./scripts/send_to_codex.sh "$OUTPUT_DIR" "Updated the plan to address your concerns: ..."
Ending the Session
# Close Codex pane when done
./scripts/close_codex_session.sh "$OUTPUT_DIR"
Review Prompts
For Implementation Plans
Review the following implementation plan for potential issues, architectural concerns,
or improvements. Focus on:
- Correctness and completeness
- Potential edge cases or bugs
- Better approaches or patterns
- Security or performance concerns
[Plan content here]
Provide specific, actionable feedback. If the plan looks good, say so clearly.
For Code Changes
Review these code changes:
Files modified:
- [List of files]
Changes summary:
[Brief description]
Code diff:
[Actual changes]
Point out any issues, suggest improvements, or confirm if it looks good.
Completion Detection
Determine review completion by analyzing Codex's response tone and content:
- Approved: "Looks good", "LGTM", "No issues", "Approved", positive without new concerns
- Needs work: Specific issues listed, questions raised, suggestions for changes
- Ambiguous: Ask follow-up to clarify
Important: Don't wait for explicit "DONE" signal. Use natural language understanding to detect completion.
Error Handling
- Tmux not running: Error early, ask user to start tmux session
- Codex not found: Verify
codexcommand is in PATH - Pane closed unexpectedly: Detect in polling loop, restart if needed
- Codex hangs: Timeout after 60s of no output, prompt user
Scripts
start_codex_review.sh- Initialize tmux split and Codex sessioncheck_codex_status.sh- Poll for new Codex outputsend_to_codex.sh- Send follow-up message to Codexclose_codex_session.sh- Clean up tmux pane and session files
スコア
総合スコア
リポジトリの品質指標に基づく評価
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
レビュー
レビュー機能は近日公開予定です