Prerequisites
Before setting up the GitHub Action, you need:Anthropic API Key
Get an API key from Anthropic Console. You can also use OAuth tokens from Claude Code.
Configuration File
Create a
warden.toml in your repository root. Run npx warden init to generate one:Basic Setup
Create.github/workflows/warden.yml in your repository:
.github/workflows/warden.yml
The action automatically installs Claude Code CLI v2.1.32. No additional setup required.
Add API Key as Secret
Using GitHub App Token (Recommended)
For better review thread management, use a GitHub App token instead ofGITHUB_TOKEN:
.github/workflows/warden.yml
Schedule Workflow
Run Warden on a schedule to analyze your entire codebase and create issues:.github/workflows/warden-schedule.yml
warden.toml:
warden.toml
Authentication Methods
Warden supports multiple authentication methods (checked in order):anthropic-api-keyinputWARDEN_ANTHROPIC_API_KEYenvironment variableANTHROPIC_API_KEYenvironment variableCLAUDE_CODE_OAUTH_TOKENenvironment variable (OAuth)
Using OAuth Token
Permissions Reference
| Permission | Required | Purpose |
|---|---|---|
contents: write | Yes | Resolve review threads via GraphQL |
pull-requests: write | Auto (via GITHUB_TOKEN) | Post review comments |
checks: write | Auto (via GITHUB_TOKEN) | Create check runs |
issues: write | Schedule only | Create/update issues for schedule triggers |
What Happens on Pull Requests
When a PR is opened or updated, Warden:- Installs Claude Code CLI (v2.1.32)
- Loads
warden.tomlconfiguration - Matches triggers against the PR event
- Runs matched skills in parallel
- Posts inline review comments for findings
- Creates a check run with summary
- Auto-resolves stale comments from previous pushes
- Evaluates fix attempts using Claude
- Fails the check if findings exceed threshold (configurable)
Next Steps
Configuration
Learn how to configure the action inputs and behavior
Inputs & Outputs
Reference for all action inputs and outputs