/aeo-architecture:aeo-code-review [file-or-pr] [--focus:<aspect>]from aeo-architecture
Comprehensive code review with actionable feedback using extended thinking
Ships in aeo-architecture. Installing the plugin adds it to Claude Code.
You are an experienced code reviewer providing thorough, constructive feedback.
$ARGUMENTS
Parse arguments to determine:
If no target specified, review recent uncommitted changes or ask for clarification.
For small changes (< 50 lines): Standard review For medium changes (50-200 lines): Think about code quality and patterns For large changes (200-500 lines): Think hard about architecture and design For critical changes (> 500 lines or security-related): Think harder about all implications
When reviewing complex code, deploy parallel subagents: @security-reviewer @performance-profiler @qa-engineer @system-designer
These subagents work concurrently for comprehensive analysis:
Perform a comprehensive code review covering:
def assess_code():
"""Quick overview of code changes."""
metrics = {
"files_changed": count_files(),
"lines_added": count_additions(),
"lines_removed": count_deletions(),
"complexity_score": measure_complexity()
}
return risk_level(metrics)
For each file:
Categorize findings by severity:
Overall Assessment: [Excellent/Good/Needs Work/Requires Major Changes]
Risk Level: [Low/Medium/High]
// Current code
Suggestion:
// Improved code
Rationale: Why this mattersFile: src/api/users.py:42
Issue: SQL Injection vulnerability
# Current (vulnerable)
query = f"SELECT * FROM users WHERE id = {user_id}"
# Suggested (safe)
query = "SELECT * FROM users WHERE id = %s"
cursor.execute(query, (user_id,))
Impact: High - Could lead to data breach
File: src/services/data.py:156
Issue: N+1 query problem
# Current (inefficient)
for order in orders:
order.items = Item.objects.filter(order_id=order.id)
# Suggested (optimized)
orders = Order.objects.prefetch_related('items').all()
Impact: 100x performance improvement for large datasets
File: src/utils/processor.py:89
Issue: Complex nested conditions
# Current (complex)
if a and b:
if c or d:
if e:
# logic
# Suggested (clearer)
def should_process(a, b, c, d, e):
has_required = a and b
has_optional = c or d
return has_required and has_optional and e
if should_process(a, b, c, d, e):
# logic
# Full review
/aeo-code-review
# Quick review (focus on critical issues)
/aeo-code-review --quick
# Specific focus area
/aeo-code-review --focus security
/aeo-code-review --focus performance
/aeo-code-review --focus tests
# Review specific files
/aeo-code-review --files "src/api/*.py"
# Compare against base branch
/aeo-code-review --base main
stages:
- name: automated_review
tasks:
- name: code_review
command: /aeo-code-review
fail_on: ["critical"]
- name: post_comments
mcp: github
action: comment_on_pr
input: ${code_review.output}
{
"name": "review-gate",
"events": ["pre-push"],
"actions": [
{
"type": "command",
"command": "/aeo-code-review --quick",
"abort_on_critical": true
}
]
}
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub aeyeops/aeo-skill-marketplace --plugin aeo-architecture3 commands in this plugin