claude-code-action README

The project's README from github.com/anthropics/claude-code-action. As one markdown file: README.md.

Claude Code Action responding to a comment

Claude Code Action

A general-purpose Claude Code action for GitHub PRs and issues that can answer questions and implement code changes. This action intelligently detects when to activate based on your workflow context—whether responding to @claude mentions, issue assignments, or executing automation tasks with explicit prompts. It supports multiple authentication methods including Anthropic direct API (API key or workload identity federation), Amazon Bedrock, Google Vertex AI, and Microsoft Foundry.

Features

📦 Upgrading from v0.x?

See our Migration Guide for step-by-step instructions on updating your workflows to v1.0. The new version simplifies configuration while maintaining compatibility with most existing setups.

Quickstart

The easiest way to set up this action is through Claude Code in the terminal. Just open claude and run /install-github-app.

This command will guide you through setting up the GitHub app and required secrets.

Note:

📚 Solutions & Use Cases

Looking for specific automation patterns? Check our Solutions Guide for complete working examples including:

Each solution includes complete working examples, configuration details, and expected outcomes.

Documentation

📚 FAQ

Having issues or questions? Check out our Frequently Asked Questions for solutions to common problems and detailed explanations of Claude's capabilities and limitations.

License

This project is licensed under the MIT License—see the LICENSE file for details.

claude-code-action (anthropics/claude-code-action)

Searching Database…

这是什么?Claude Code Action 是 Anthropic 推出的一个 GitHub Action,让 Claude 可以直接在你的仓库的拉取请求和 issue 中回答问题并实现代码更改。它通过 @claude 提及、issue 分配或显式的自动化提示来激活。
这是一个独立应用,还是我要加进 CI 工作流的东西?它是一个 GitHub Action,放进你仓库的 workflow YAML 里即可,而且它完全在你自己的 GitHub runner 上运行,而不是在 Anthropic 托管的基础设施上。
如何让它在自己的仓库上跑起来?在终端中打开 Claude Code 并运行 '/install-github-app',它会引导你完成 GitHub 应用的安装和所需密钥的添加。
它支持哪些身份验证提供商?在身份验证方面,它支持 Anthropic 直接 API(API 密钥或工作负载身份联合)、Amazon Bedrock、Google Vertex AI 和 Microsoft Foundry。
安装它需要特殊权限吗?需要。你必须拥有仓库管理员权限才能安装 GitHub 应用并添加密钥;而且一条命令的快速开始只适用于直接使用 Anthropic API 的用户——Bedrock、Vertex AI 或 Foundry 的配置需要手动设置。
Claude 如何决定何时在 PR 或 issue 上激活?它使用智能模式检测,根据工作流上下文——@claude 提及、issue 分配或显式的自动化提示——自动选择合适的执行模式,无需额外配置。
Claude 在仓库里实际能做哪些任务?它可以回答有关代码和架构的问题、审查 PR 差异并提出改进建议、实现简单的修复或新功能,并在工作过程中发布带复选框的进度跟踪评论。
我之前用的是旧的 v0.x 版本——需要重写我的工作流吗?不需要完全重写:v1.0 把配置统一到 'prompt' 和 'claudeargs' 输入上,同时与大多数现有的 v0.x 设置保持兼容;升级还有专门的 Migration Guide。
它能把结果传给其他自动化步骤吗?可以。它能返回经过验证的 JSON 结果,这些结果会自动成为 GitHub Action 的输出,因此你可以把它串联进更复杂的自动化流水线。
Creator
anthropics
Size
3.1 MB
Stars
9.6K
Age
1y
Commits · 90 Days