claude-code-action  by anthropics

GitHub Action for Claude to interact with code

Created 4 months ago
3,283 stars

Top 14.7% 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

1 day

Pull Requests (30d)
63
Issues (30d)
58
Star History
616 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Chaoyu Yang Chaoyu Yang(Founder of Bento), and
6 more.

pr-agent by qodo-ai

0.7%
9k
AI tool for pull request automation, feedback, and suggestions
Created 2 years ago
Updated 1 day ago
Starred by Chris Van Pelt Chris Van Pelt(Cofounder of Weights & Biases), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
30 more.

developer by smol-ai

0.1%
12k
Agent for embedding a developer in your app
Created 2 years ago
Updated 1 year ago
Feedback? Help us improve.