๐ง Claude AI Updates and FeaturesMarch 11, 2026โ
Tests passing
Claude Code Reviewer
A CLI tool for leveraging Claude AI's enhanced coding capabilities to perform automated code reviews. It allows developers to submit code files or directories, receive feedback, and iterate faster on their projects with the help of Claude.
What It Does
- Analyze individual Python files or entire directories containing Python files.
- Send code to the Claude AI API for automated review.
- Save the analysis results to a JSON file.
Installation
1. Clone this repository:
git clone https://github.com/yourusername/claude_code_reviewer.git
cd claude_code_reviewer2. Install the required dependencies:
pip install -r requirements.txtUsage
To run the tests, use pytest:
pytest test_claude_code_reviewer.pySource Code
import argparse
import requests
from pathlib import Path
import json
def analyze_code(file_path, api_url):
"""Send a code file to the Claude AI API for analysis."""
try:
with open(file_path, 'r') as file:
code_content = file.read()
except FileNotFoundError:
return {"error": f"File not found: {file_path}"}
except Exception as e:
return {"error": f"Error reading file {file_path}: {str(e)}"}
try:
response = requests.post(api_url, json={"code": code_content})
response.raise_for_status()
return response.json()
except requests.exceptions.RequestException as e:
return {"error": f"Network error: {str(e)}"}
def process_path(input_path, api_url):
"""Process a file or directory and analyze code files."""
path = Path(input_path)
if not path.exists():
return {"error": f"Path does not exist: {input_path}"}
results = {}
if path.is_file():
results[path.name] = analyze_code(path, api_url)
elif path.is_dir():
for file in path.rglob("*.py"):
results[file.name] = analyze_code(file, api_url)
else:
return {"error": f"Invalid path type: {input_path}"}
return results
def save_report(results, output_file):
"""Save the analysis results to a JSON file."""
try:
with open(output_file, 'w') as file:
json.dump(results, file, indent=4)
except Exception as e:
print(f"Error saving report: {str(e)}")
def main():
parser = argparse.ArgumentParser(description="Claude Code Reviewer")
parser.add_argument('--path', required=True, help="Path to a file or directory to analyze")
parser.add_argument('--api-url', required=True, help="Claude AI API endpoint URL")
parser.add_argument('--output', help="Output file to save the review report")
args = parser.parse_args()
results = process_path(args.path, args.api_url)
if args.output:
save_report(results, args.output)
print(f"Analysis report saved to {args.output}")
else:
print(json.dumps(results, indent=4))
if __name__ == "__main__":
main()Community
Downloads
ยทยทยท
Rate this tool
No ratings yet โ be the first!
Details
- Tool Name
- claude_code_reviewer
- Category
- Claude AI Updates and Features
- Generated
- March 11, 2026
- Tests
- Passing โ
- Fix Loops
- 3
Quick Install
Clone just this tool:
git clone --depth 1 --filter=blob:none --sparse \ https://github.com/ptulin/autoaiforge.git cd autoaiforge git sparse-checkout set generated_tools/2026-03-11/claude_code_reviewer cd generated_tools/2026-03-11/claude_code_reviewer pip install -r requirements.txt 2>/dev/null || true python claude_code_reviewer.py