claude-code-action  by anthropics

GitHub Action for Claude to interact with code

created 2 months ago
2,268 stars

Top 20.4% on sourcepulse

GitHubView on GitHub
Project Summary

This GitHub Action integrates Claude, an AI assistant, to automate tasks within GitHub Pull Requests and Issues. It allows developers to interact with Claude via comments to ask questions about code, request code reviews, implement fixes, and even automate documentation updates. The primary benefit is streamlining code-related workflows by leveraging AI for assistance directly within the development environment.

How It Works

The action monitors comments for a trigger phrase (defaulting to @claude) or issue assignments. Upon detection, it gathers context from the PR/issue, including code changes and comments. Claude then either answers questions or implements requested code changes, creating commits on a new branch or directly on the PR branch. It communicates progress and results by updating its initial comment.

Quick Start & Requirements

  • Install: Use the anthropics/claude-code-action@beta GitHub Action in your workflow file.
  • Authentication: Supports Direct Anthropic API (requires ANTHROPIC_API_KEY secret), Amazon Bedrock, and Google Vertex AI (both use OIDC authentication).
  • Prerequisites: GitHub repository admin access for initial setup, GITHUB_TOKEN (provided by GitHub Actions), and potentially cloud provider credentials/configurations for Bedrock/Vertex AI.
  • Docs: Examples

Highlighted Details

  • Supports image analysis for fixing bugs from screenshots.
  • Can automatically update documentation based on code changes.
  • Offers author-specific code reviews for targeted contributors.
  • Commits are automatically signed with commit signatures.

Maintenance & Community

The action is marked as @beta, indicating potential for API changes. Further community or maintenance details are not explicitly provided in the README.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: Permissive for commercial use and integration with closed-source projects.

Limitations & Caveats

Claude cannot submit formal PR reviews or approve PRs. It is limited to updating a single comment for communication and cannot execute arbitrary bash commands unless explicitly allowed via allowed_tools. It also cannot access CI/CD results or perform advanced Git operations like merging or rebasing.

Health Check
Last commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
80
Issues (30d)
63
Star History
2,355 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), and
3 more.

AutoPR by irgolic

0.1%
1k
AI-powered workflows for codebase automation
created 2 years ago
updated 1 year ago
Feedback? Help us improve.