From smart-dev
Delegates code review, fixes, security audits, performance analysis, error explanations, and second opinions to OpenAI Codex CLI via /codex commands with git diff context.
How this skill is triggered — by the user, by Claude, or both
Slash command
/smart-dev:codexThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Delegate tasks to OpenAI Codex CLI from within Claude Code.
Delegate tasks to OpenAI Codex CLI from within Claude Code.
| User says | Resolves to |
|---|---|
/codex review | codex review --uncommitted |
/codex review --base main | codex review --base main |
/codex review with o3 effort: high | codex review --uncommitted -m o3 -c model_reasoning_effort="high" |
/codex security | codex review --uncommitted -c model_reasoning_effort="high" "Focus on security: injection, auth bypass, data exposure, OWASP Top 10" |
/codex perf --base main | codex review --base main -c model_reasoning_effort="high" "Focus on performance: N+1 queries, unnecessary allocations, missing indexes, expensive loops" |
/codex quick explain this error | codex exec --full-auto -c model_reasoning_effort="low" "explain this error" |
/codex thorough refactor auth | codex exec --full-auto -c model_reasoning_effort="xhigh" "refactor auth" |
/codex fix | Capture git diff + git diff --cached → codex exec --full-auto "Review and fix issues in this diff: ..." |
/codex fix the broken test | codex exec --full-auto "fix the broken test" |
/codex second-opinion | Rerun last user prompt through Codex, present both answers |
/codex <anything else> | codex exec --full-auto "<prompt>" |
digraph routing {
"Parse input" [shape=ellipse];
"Preset?" [shape=diamond];
"second-opinion?" [shape=diamond];
"Bare fix?" [shape=diamond];
"Review keyword?" [shape=diamond];
"Expand preset" [shape=box];
"Second opinion flow" [shape=box];
"Diff-scoped fix" [shape=box];
"codex review" [shape=box];
"codex exec" [shape=box];
"Parse input" -> "Preset?";
"Preset?" -> "Expand preset" [label="yes"];
"Preset?" -> "second-opinion?" [label="no"];
"second-opinion?" -> "Second opinion flow" [label="yes"];
"second-opinion?" -> "Bare fix?" [label="no"];
"Bare fix?" -> "Diff-scoped fix" [label="yes"];
"Bare fix?" -> "Review keyword?" [label="no"];
"Review keyword?" -> "codex review" [label="yes"];
"Review keyword?" -> "codex exec" [label="no"];
}
Review keywords: review, code review, check changes, audit, inspect, critique
Default: Everything else routes to codex exec --full-auto
After routing, for all commands: extract model/effort flags → inject project context (review + presets only) → execute via Bash → summarize results.
Detect as first token after /codex. Additional text appends to the prompt. User can override model/effort.
| Preset | Mode | Effort | Focus prompt |
|---|---|---|---|
security | review | high | Security: injection, auth bypass, data exposure, OWASP Top 10 |
perf | review | high | Performance: N+1 queries, unnecessary allocations, missing indexes, expensive loops |
quick | exec | low | (user's remaining prompt) |
thorough | exec | xhigh | (user's remaining prompt) |
Trigger: /codex second-opinion or /codex second opinion
codex exec --full-auto "<original prompt>"Append custom focus: /codex second-opinion focus on error handling
Trigger: /codex fix with NO additional prompt text
git diff + git diff --cached — if empty, stop with "No uncommitted changes"codex exec --full-auto "Review the following diff and fix any bugs, logic errors, or code quality issues:\n\n<diff>"/codex fix <something> (with a prompt) routes to normal exec mode instead.
Extract model/effort from user input before building the command. Strip from the prompt.
| Input pattern | Flag produced |
|---|---|
-m o3 / --model o3 / with o3 / using o3 | -m o3 |
--effort high / --thinking high / effort: high | -c model_reasoning_effort="high" |
Valid levels: low, medium, high, xhigh
Default: Inherit from ~/.codex/config.toml
Applies to: review commands and preset commands only (not plain exec).
Read CLAUDE.md from project root. Extract key conventions (~200 words max) and prepend:
Project conventions: <framework>, <DB>, <patterns>.
<extracted rules>
---
<original prompt>
Focus on rules Codex would otherwise violate: architecture layers, DB conventions, code style.
--uncommitted and --base are mutually exclusive — default to --uncommitted-m, --base, -c, etc.) verbatimnpx claudepluginhub coolwuu/smart-dev-plugin --plugin smart-devCross-model review using OpenAI Codex to independently verify plans or code diffs, iterating up to 5 rounds. Useful for architecture decisions, non-trivial refactors, and critical config changes.
Runs cross-model code reviews using the external Codex CLI tool from a Claude session. Catches bugs that single-model self-review would miss by leveraging a different reviewer architecture.
Consults Codex CLI for second opinions on code reviews, designs, or implementations by crafting context-based prompts, executing via bash with configurable depth (light/normal/deep), and summarizing results.