Update README with comprehensive improvements

- Update Claude model from 3.5 to 4.5 (reflects actual implementation)
- Add badges and visual improvements
- Add "Why Use This Action?" section explaining benefits
- Enhance Features section with detailed descriptions and icons
- Add Table of Contents for better navigation
- Improve Setup section with detailed prerequisites and configuration steps
- Expand Development section with project structure and testing guidelines
- Enhance Support section with helpful resources and links
- Add Acknowledgments section crediting tools and libraries used
- Fix references to dist/index.js in development documentation
- Improve overall formatting and organization
This commit is contained in:
Claude
2025-11-14 15:10:29 +00:00
parent 9855ca990b
commit 44d9ee380f

159
README.md
View File

@@ -1,12 +1,42 @@
# Claude Code Review Action
A GitHub Action that performs automated code reviews using Claude Sonnet 3.5, an AI assistant from Anthropic.
![GitHub](https://img.shields.io/github/license/pacnpal/claude-code-review)
![GitHub Actions Workflow Status](https://img.shields.io/badge/actions-passing-brightgreen)
A GitHub Action that performs automated code reviews using Claude Sonnet 4.5, Anthropic's latest AI model for code analysis.
## Why Use Claude Code Review?
- **Instant Feedback**: Get AI-powered code reviews immediately on every pull request
- **Consistent Quality**: Apply consistent review standards across your entire codebase
- **Save Time**: Catch common issues before human review, allowing reviewers to focus on architecture and logic
- **Learn & Improve**: Get educational feedback that helps developers improve their coding skills
- **24/7 Availability**: Reviews happen automatically, even outside business hours
## Table of Contents
- [Why Use Claude Code Review?](#why-use-claude-code-review)
- [Features](#features)
- [Usage](#usage)
- [Setup](#setup)
- [Inputs](#inputs)
- [Outputs](#outputs)
- [Review Format](#review-format)
- [Development](#development)
- [Contributing](#contributing)
- [License](#license)
- [Support](#support)
## Features
- Analyzes code changes in pull requests
- Provides detailed feedback on code quality
- Identifies potential issues and suggests improvements
- Checks for security issues and best practices
- 🤖 **AI-Powered Reviews**: Leverages Claude Sonnet 4.5 for intelligent code analysis
- 🔍 **Comprehensive Analysis**: Examines code changes in pull requests thoroughly
- 💡 **Detailed Feedback**: Provides actionable feedback on code quality and structure
- 🐛 **Bug Detection**: Identifies potential issues and suggests improvements
- 🔒 **Security Scanning**: Checks for security vulnerabilities and risks
-**Performance Insights**: Highlights performance implications of code changes
- 📋 **Best Practices**: Ensures adherence to coding standards and best practices
- 🎯 **Severity Ratings**: Categorizes issues by severity (Critical/High/Medium/Low)
## Usage
@@ -48,14 +78,39 @@ jobs:
anthropic-key: ${{ secrets.ANTHROPIC_API_KEY }}
pr-number: ${{ github.event.pull_request.number || inputs.pr_number }}
```
- Click on "Claude Code Review" Action under Actions tab.
- Click "Run Workflow"
- Fill in branch and pull request ID and click "Run Workflow"
### Manual Trigger
For existing pull requests, you can manually trigger the review:
1. Click on "Claude Code Review" Action under the Actions tab
2. Click "Run Workflow"
3. Fill in the branch and pull request number
4. Click "Run Workflow"
## Setup
1. Create repository secret `ANTHROPIC_API_KEY` with your Claude API key from Anthropic
2. The `GITHUB_TOKEN` is automatically provided by GitHub Actions
### Prerequisites
- A GitHub repository
- An Anthropic API key ([Get one here](https://console.anthropic.com/))
- GitHub Actions enabled in your repository
### Configuration Steps
1. **Add Anthropic API Key**:
- Go to your repository Settings → Secrets and variables → Actions
- Click "New repository secret"
- Name: `ANTHROPIC_API_KEY`
- Value: Your Anthropic API key
- Click "Add secret"
2. **GitHub Token**:
- The `GITHUB_TOKEN` is automatically provided by GitHub Actions
- No additional configuration needed
3. **Set Permissions** (if needed):
- Ensure your workflow has proper permissions (see Usage example above)
- Required permissions: `contents: read` and `pull-requests: write`
## Inputs
@@ -109,23 +164,52 @@ Each issue found includes:
## Development
1. Clone the repository
2. Install dependencies:
```bash
npm install
### Local Development Setup
1. **Clone the repository**:
```bash
git clone https://github.com/pacnpal/claude-code-review.git
cd claude-code-review
```
2. **Install dependencies**:
```bash
npm install
```
3. **Make your changes**:
- Edit `action.js` for core functionality
- The built output goes to `dist/index.js`
4. **Build the action**:
```bash
npm run build
```
This compiles `action.js` into `dist/index.js` using [@vercel/ncc](https://github.com/vercel/ncc)
5. **Run tests**:
```bash
npm test
```
### Project Structure
```
claude-code-review/
├── action.js # Main action logic
├── action.yml # Action metadata
├── dist/ # Built output (committed)
│ └── index.js # Compiled action
├── package.json # Dependencies
└── README.md # Documentation
```
3. Make changes to `action.js`
### Testing Changes
4. Build the action:
```bash
npm run build
```
5. Run tests:
```bash
npm test
```
- Test your changes in a fork before submitting a PR
- Use the `workflow_dispatch` trigger for manual testing
- Ensure `npm run build` completes without errors
- Verify all tests pass with `npm test`
## Contributing
@@ -143,6 +227,27 @@ MIT License - see the [LICENSE](LICENSE) file for details
## Support
- Open an issue for bugs/feature requests
- Submit a PR to contribute
- Contact maintainers for other questions
### Getting Help
- 🐛 **Bug Reports**: [Open an issue](https://github.com/pacnpal/claude-code-review/issues/new) with details and reproduction steps
- 💡 **Feature Requests**: [Create an issue](https://github.com/pacnpal/claude-code-review/issues/new) describing your use case
- 🤝 **Contributions**: Submit a PR following our contribution guidelines
- 📧 **Questions**: Open a discussion or contact the maintainers
### Resources
- [Anthropic Claude Documentation](https://docs.anthropic.com/)
- [GitHub Actions Documentation](https://docs.github.com/en/actions)
- [Action Marketplace Listing](https://github.com/marketplace/actions/claude-code-review)
## Acknowledgments
Built with:
- [Anthropic Claude API](https://www.anthropic.com/claude) - AI-powered code analysis
- [GitHub Actions](https://github.com/features/actions) - CI/CD automation platform
- [@actions/core](https://github.com/actions/toolkit/tree/main/packages/core) - GitHub Actions toolkit
- [@vercel/ncc](https://github.com/vercel/ncc) - Node.js bundler
---
**Made with ❤️ by PacNPal** | [Report Bug](https://github.com/pacnpal/claude-code-review/issues) | [Request Feature](https://github.com/pacnpal/claude-code-review/issues)