AI-powered code review using external models (Codex, Gemini)
Get AI-powered code reviews using Codex and Gemini models. Use it to analyze files, git diffs, staged changes, or PRs with configurable focus areas like security, performance, and bugs.
/plugin marketplace add physics91/claude-vibe/plugin install claude-vibe@physics91-pluginsPerforms AI-powered code review using the embedded ai-code-agent-mcp server with Codex and/or Gemini CLI tools.
/ai-review [scope] [options]
/cr [scope] [options]
file <path> - Review a specific filediff - Review uncommitted git changesstaged - Review staged changes onlypr [number] - Review pull request changes--model=codex - Use only OpenAI Codex--model=gemini - Use only Google Gemini--model=combined - Use both with result aggregation (default)--focus=security - Security-focused review--focus=performance - Performance-focused review--focus=bugs - Bug detection focus--focus=style - Code style and best practices--focus=all - Comprehensive review (default)--severity=critical - Show only critical issues--severity=high - Show high and critical issues--severity=all - Show all issues (default)--preset=react-web - React web application--preset=nodejs-api - Node.js API server--preset=mcp-server - MCP server project--preset=cli-tool - CLI tool--preset=library - Reusable library--preset=auto - Auto-detect from code (default)--format=markdown - Markdown output (default)--format=json - JSON structured output--verbose - Include detailed findings# Review current context with both models
/cr
# Review specific file with Codex only
/cr file src/api/auth.ts --model=codex
# Security-focused review of git diff
/cr diff --focus=security
# Review staged changes with high severity filter
/cr staged --severity=high
# Combined review with auto-detection
/cr file lib/parser.js --model=combined --preset=auto
# Verbose security review
/cr file .env.example --focus=security --verbose
This command requires the ai-code-agent-mcp MCP server and at least one CLI tool:
# Install
npm install -g @openai/codex
# Authenticate
codex auth
# Install
npm install -g @google/gemini-cli
# Authenticate
gemini auth login
## AI Code Review Results
**Analysis ID**: combined-1735300000000
**Models Used**: codex, gemini
**Duration**: 3240ms
### Overall Assessment
The code demonstrates good structure but has potential security issues in input validation and a performance concern with database queries.
### Summary
| Severity | Count |
|----------|-------|
| Critical | 1 |
| High | 2 |
| Medium | 4 |
| Low | 3 |
| **Total** | **10** |
### Findings
#### Critical Issues
1. **SQL Injection Vulnerability** (Line 42)
- **Description**: User input directly concatenated into SQL query
- **Suggestion**: Use parameterized queries
- **Confidence**: High (both models agree)
...
/r - Quick Claude-only code review/security-scan - Security-focused scan with security-scanner skill/context-setup - Configure MCP servers including ai-code-agent-mcpEnsure Codex or Gemini CLI is installed and in PATH:
which codex # or: where codex (Windows)
which gemini
Re-authenticate with the respective CLI:
codex auth
gemini auth login
--model=codex or --model=gemini for faster single-model reviewAnalysis results are cached for 1 hour. To force fresh analysis:
# Clear cache (if needed)
rm -rf ~/.claude/claude-vibe/data/ai-code-agent.db