A Chrome extension that brings a Claude assistant directly into the "Files Changed" section of GitHub PRs, allowing you to ask questions inline about code changes, mark sections for action, and let Claude answer or implement changes at your instruction - all from your browser. Features an in-browser streaming interface for viewing Claude’s live logs, enabling you to redirect it with new prompts if it deviates, or immediately terminate the session if needed.
- Ask Questions: Highlight code in PR diffs and ask Claude questions about it
- Mark for Action: Flag code sections that need changes and give Claude instructions
- Auto-Answer: Claude can answer all your questions in one go via Agent SDK
- Auto-Complete Actions: Claude can implement marked actions directly in the repository
- Inline Display: Answers and actions appear as GitHub-style comments in the PR
- Markdown Files: Questions and actions saved to markdown files for review and version control
Quick version:
# Copy environment template
cp .env.example .env
# Edit .env with your paths
# - NODE_PATH (find with: which node)
# - HTTP_PORT / WS_PORT
# - PROJECTS_DIR
# - PR_REVIEWS_DIRcd server
npm install# Daemon mode (recommended - runs in background)
./launchers/start_server_daemon.command
# Foreground mode (legacy)
./Start Server.command
# Or manual
cd server && node server.jsServer management:
./launchers/server_status.command # Check if running
./launchers/stop_server.command # Stop daemon
./launchers/server_logs.command # View logsThe server runs on http://localhost:13030 (configurable in .env) and handles file I/O and Claude Agent SDK integration.
Chrome/Edge/Brave/Opera:
- Open
chrome://extensions/(oredge://extensions/for Edge) - Enable "Developer mode" (top-right toggle)
- Click "Load unpacked"
- Select the
extension/folder
Open Settings from the extension dropdown menu to configure:
- Server URL: Should match HTTP_PORT in
.env(default:http://localhost:13030) - Projects Directory: Where git repositories are cloned (syncs from
.env) - Questions & Actions Directory: Where markdown files are saved (syncs from
.env) - Agent Permissions: Which tools Claude can use automatically
Important: Use Unified diff view mode for best results. Split view will work but may provide incomplete context to Claude since line selection is isolated between left/right panes.
- Go to any GitHub PR → "Files changed" tab
- Ensure you're in Unified view (recommended) - toggle at top-right of diff
- Click line numbers to highlight code (yellow highlight)
- Click the Claude icon that appears
- Type your question → "Save Question"
- Question saved to markdown file
- Click "Answer Questions" button in the PR
- Claude automatically answers all unanswered questions
- Answers appear inline in the PR
- Highlight code in PR diff
- Click Claude dropdown → "Mark for Action"
- Give Claude instructions on what to change
- Action saved to markdown file
- Click "Start Actions" button in the PR
- Claude automatically implements all pending actions
- Changes committed to the repository
- Summaries appear in the markdown file
claude-github-buddy/
├── extension/ # Browser extension
│ ├── manifest.json # Extension config
│ ├── scripts/
│ │ ├── content.js # Main UI logic
│ │ ├── background.js # Markdown generation
│ │ ├── agent-client.js # Agent SDK client
│ │ └── ...
│ ├── styles/
│ │ └── content.css # GitHub-native styling
│ └── icons/
├── server/
│ ├── server.js # HTTP server
│ ├── agent-server.js # Agent SDK integration
│ ├── git-helper.js # Repository management
│ └── config.js # Configuration
└── questions and actions/ # Generated markdown files (gitignored)
Full configuration guide: See SETUP.md for detailed setup instructions.
Configuration is managed via .env file (copy from .env.example):
Server configuration:
NODE_PATH- Full path to Node.js binary (required for launchd/daemon mode)HTTP_PORT- HTTP server port (default: 13030)WS_PORT- WebSocket server port (default: 13031)
Directory configuration:
PROJECTS_DIR- Where your git repositories are locatedPR_REVIEWS_DIR- Where markdown review files are saved
Git configuration (optional):
GIT_GITHUB_PROTOCOL- Git protocol for github.com (default: ssh)GIT_GITHUB_SSH_KEY- SSH key path (default: ~/.ssh/id_ed25519)
Claude API (required for Agent SDK features):
ANTHROPIC_API_KEY- Your Claude API keyANTHROPIC_VERTEX_PROJECT_ID- GCP project ID for Vertex AI (alternative)CLOUD_ML_REGION- GCP region for Vertex AI
Example .env:
NODE_PATH=/opt/homebrew/bin/node
HTTP_PORT=13030
WS_PORT=13031
PROJECTS_DIR=/Users/yourusername/Projects
PR_REVIEWS_DIR=/Users/yourusername/claude-github-buddy/questions and actions
ANTHROPIC_API_KEY=your-api-keyThe server loads configuration in this order (highest priority first):
.envfile variablesserver/config.json(UI settings)- Hardcoded defaults
The server exposes these endpoints:
POST /writeFile- Write markdown filePOST /readFile- Read markdown fileGET /listFiles- List all markdown filesPOST /deleteFile- Delete markdown filePOST /archiveFile- Archive markdown file with timestampGET /getConfig- Get current configurationPOST /updateConfig- Update configurationGET /getDefaultConfig- Get default configuration valuesPOST /startSession- Start Agent SDK sessionPOST /answerQuestions- Answer questions via Agent SDKPOST /completeActions- Complete actions via Agent SDKGET /health- Server health check
# Claude PR Review: myorg/myrepo - Feature Implementation
**PR Number:** #123
**Generated:** 2025-01-15T10:30:00.000Z
## Question 1
**File:** `src/server.js`
**Lines:** L42-L58
**Code:**
\```javascript
+ async function handleRequest(req, res) {
+ // ...
+ }
\```
**QUESTION:**
Why are we using async here instead of callbacks?
**ANSWER:**
_[Claude, please fill in your answer here]_# Claude Actions: myorg/myrepo
**PR Number:** #123
**Generated:** 2025-01-15T10:30:00.000Z
## Action 1
**File:** `src/utils.js`
**Lines:** L15-L20
**Type:** Question-Linked
**ORIGINAL QUESTION:**
Should we add error handling here?
**ORIGINAL ANSWER:**
Yes, we should wrap this in a try-catch block...
**ACTION:**
Add try-catch error handling as suggested
**SUMMARY:**
_[Claude, please fill in your action summary here]_Full troubleshooting guide: See SETUP.md
Server won't start:
# Check configuration
cat .env
# Check port availability
lsof -i :13030
# Verify Node.js installation
node --version # Should be v16 or higher
# Check logs
./launchers/server_logs.commandExtension can't save files:
- Verify server is running:
./server_status.command - Check health endpoint:
curl http://localhost:13030/health - Check Chrome DevTools → Console for errors
- Verify server URL in extension settings matches
.envport
Agent SDK not working:
- Set
ANTHROPIC_API_KEYin.envfile - Restart server after updating
.env - Check server logs for authentication errors:
./server_logs.command - Verify API key has sufficient credits
Running in dev mode:
cd server
npm install
node server.jsExtension development:
- Make changes to
extension/files - Go to
chrome://extensions/ - Click reload icon on the extension
- Refresh GitHub page
Testing Agent SDK:
# Set up environment
export ANTHROPIC_API_KEY=your-key
# Run server with debug logging
DEBUG=* node server.js- Server runs locally only (
localhost:47382) - No data sent to external servers except Claude API
- Questions and actions stored locally in markdown files
- Agent SDK requires explicit user action (button click)
- Tool permissions configurable in Settings
MIT
Contributions welcome! Please open an issue or PR.
For contributors:
- Copy
.env.exampleto.envand configure for your setup - Never commit
.envorserver/config.json(already gitignored) - Update
.env.exampleif adding new configuration options - Test setup on a fresh clone to ensure it works for others
- Update SETUP.md with any new setup steps
Built with:
- Anthropic Claude Agent SDK
- Chrome Extensions Manifest V3
- GitHub Primer CSS