Demo project: Claude AI integrated with GitHub Actions for automated code review, bug fixes, and task execution.
- Fork or clone this repo
- Add
ANTHROPIC_API_KEYto GitHub repository secrets (get key) - Create a
feature/*branch, open PR → auto-review triggers - Comment
@claude fix thison any PR → Claude makes changes
| Workflow | Trigger | Action |
|---|---|---|
| claude.yml | @claude comment on Issue or PR |
Execute requests (PR) or analyze (Issue) |
| claude-pr-review.yml | PR opened/updated from feature/* or bugfix/* |
Automatic code review |
git checkout -b feature/my-feature
# make changes
git add . && git commit -m "feat: my feature"
git push -u origin feature/my-feature
# Open PR to main → Claude automatically posts code review# On any open PR, add a comment:
@claude fix the typo in greetUser
# → Claude makes changes, commits, pushes
# → Claude replies with summary
# Create an Issue, then comment:
@claude how should I implement caching?
# → Claude analyzes codebase
# → Claude replies with recommendations
# (No code changes - create a PR to implement)
@claude fix the typos in this code
@claude add error handling to the greetUser function
@claude analyze this codebase and suggest improvements
| Branch | Purpose |
|---|---|
main |
Regular development |
feature/* |
New features - triggers PR review |
bugfix/* |
Bug fixes - triggers PR review |
npm start # Run app (greets "Guest")
node index.js "Name" # Run with custom name- index.js: Main app with
greetUser()andformatDate()functions (CommonJS) - .github/workflows/: Two Claude workflows (claude.yml, claude-pr-review.yml)
- .claude/settings.local.json: Pre-configured git permissions
Action not running?
- Check
ANTHROPIC_API_KEYsecret is set in repo settings - Ensure comment contains
@claude - Verify Actions are enabled in repo settings