An AI-powered code review framework for Elixir/Phoenix applications using Claude and MCP servers. This framework provides automated detection of anti-patterns, architectural issues, and code quality problems with targeted suggestions and GitHub integration.
This repository provides:
- 26+ individual anti-pattern detection rules organized by category
- Automated PR review workflow using GitHub MCP integration
- Sequential-thinking AI analysis for complex architectural issues
- Real-time cost/time tracking (avg. $2-3k savings per major PR)
- Standardized pattern templates for easy extensibility
elixir-code-review/
├── patterns/ # Individual pattern files
│ ├── architectural/ # System-wide patterns
│ ├── file-level/ # Single-file issues
│ ├── one-liners/ # Quick mechanical fixes
│ └── integrations/ # 3rd party library patterns
├── scripts/ # Automation tools
├── config/ # Configuration files
├── docs/ # Documentation
└── templates/ # Pattern file templates
# 1. Clone and setup
git clone https://github.com/VMWepinion/elixir-code-review.git
cd elixir-code-review
./scripts/install.sh
# 2. Configure target repository
cp config/repositories.yaml.example config/repositories.yaml
# Edit config/repositories.yaml with your repo details
# 3. Run automated review
./scripts/review-pr.sh --pr-name "Your PR Name"
# Or interactively select from open PRs
./scripts/review-pr.sh --interactive- Manual authorization bypassing Bodyguard policies
- PubSub data leak vulnerabilities
- Race condition detection
- Configuration anti-patterns
- Import statement violations
- Boolean logic errors and tautologies
- Function complexity issues
- Error handling pattern violations
- Module organization problems
- Formatting and style issues
- Variable naming conventions
- Simple mechanical refactors
- Ecto: Schema, migration, query anti-patterns
- Phoenix: Controller, PubSub, view patterns
- Mock: Testing and mocking anti-patterns
- Bodyguard: Authorization pattern enforcement
- Postgrex: Database connection and Aurora DSQL patterns
This framework leverages:
- Claude Code MCP: File system and repository operations
- GitHub MCP: PR analysis and automated commenting
- Sequential-thinking MCP: Complex architectural analysis
- Browser MCP: Documentation and research capabilities
- Pattern Library: 26+ documented anti-patterns
- Time Savings: ~8.5 hours per major PR review
- Cost Savings: $2,250-$3,000 per review cycle
- Issue Categories: 4-tier complexity classification
- Detection Methods: Regex, AST analysis, semantic analysis
Key configuration files:
config/repositories.yaml- Target repositoriesconfig/severity-levels.yaml- Issue severity definitionsconfig/github-templates.yaml- PR comment templatesconfig/review-workflow.yaml- Automation workflow settings
- Setup Guide - Installation and configuration
- Usage Guide - How to run reviews
- Adding Patterns - Contributing new patterns
- Architecture - System design overview
- Integration Examples - Real-world usage examples
- Fork the repository
- Create a feature branch
- Add new patterns using
templates/pattern-template.md - Test with
scripts/test-patterns.sh - Submit a pull request
- VS Code extension for real-time detection
- CI/CD pipeline integration
- Multi-language support expansion
- Advanced metrics dashboard
- Machine learning pattern discovery
MIT License - see LICENSE for details.
Generated by Claude Code with MCP server integration
Saving time, improving code quality, one pattern at a time ⚡