繁體中文 | English
AI-powered PR descriptions and titles, generated directly inside GitHub — no copy-pasting required.
PR Commentor injects a Generate Description button into every GitHub pull request comment box and a Generate Title button next to the PR title field. One click fetches the full diff and commit history from the GitHub API, sends it to your chosen AI model, and inserts the result straight into the text area — ready to submit.
PR Commentor adds AI-powered "Generate Description" and "Generate Title" buttons directly into the GitHub pull request UI. Stop writing PR descriptions from scratch — let the AI analyze your commits and diffs and do the first draft for you.
How it works
- Open any GitHub pull request (or the compare page before opening a PR).
- Click Generate Description in the comment toolbar — the extension fetches the PR metadata, all commits, and the full diff from the GitHub API, then sends it to your AI provider.
- The generated description is inserted into the comment box immediately. Edit and submit.
- Click Generate Title next to the PR title field to get a concise, imperative-mood title (≤ 72 characters) based on the same data.
Features
- Three AI providers — Claude (Anthropic), GPT (OpenAI) and Gemini (Google). Each keeps its own API key and model, so you can set up all three and switch with one click. Bring your own keys; nothing is stored outside your browser.
- Two output styles — PR Description produces an overall description with a summary, commit list, and testing notes. Per-commit explains each commit individually, one by one.
- Output language — 16 languages: English, 繁體中文, 简体中文, 日本語, 한국어, Español, Português, Français, Deutsch, Italiano, Русский, ไทย, Tiếng Việt, Bahasa Indonesia, Türkçe, and Nederlands. Switch at any time in Settings.
- Custom instructions — two separate fields, one For Title and one For Summary, each prepended to its own prompt (e.g. "Always flag missing tests. Focus on security implications.") to enforce team conventions.
- Model picker — Fast / Balanced / Best shortcuts pick the newest model in each tier. The searchable list groups models by generation, tags reasoning models, and folds dated snapshots away. Any model name can still be typed in.
- Connection test — verify your API key and model work before you need them.
- Private repo support — works with both public and private repositories when your GitHub token has the required scopes.
- UI language — the settings page itself supports all 16 languages, so you can configure the extension in your preferred language.
- Inline review comments — Generate Description works not only in the main PR comment box, but also in inline review comment threads during code review.
- Token visibility toggle — eye icon buttons on the GitHub Token and API Key fields let you show/hide credentials.
- Model compatibility — Scan leaves out models that cannot generate text here (audio, image, embedding, Responses-API-only). The settings page warns when the chosen model is not in your key's list. Requests adapt to each model generation (token limit parameter, thinking budget, effort), and any parameter a model rejects is dropped and remembered.
- Dark mode ready — uses GitHub's native CSS custom properties; looks correct in all themes.
- GitHub SPA navigation — stays active as you navigate between PRs without refreshing the page.
Permissions used
storage— saves your settings (tokens, API keys, preferences) locally in your browser viachrome.storage.sync. Nothing is sent to any server other than the GitHub and AI provider APIs you configure.activeTab— reads the current GitHub PR URL to extract owner, repo, and PR number.- Host permissions for
api.github.com,api.anthropic.com, andapi.openai.com— required to fetch PR data and call the AI APIs directly from the extension. The Gemini API allows browser requests, so it needs no extra permission.
Privacy
Your GitHub token and AI API key are stored only in Chrome's encrypted sync storage and are sent only to their respective services (GitHub and your chosen AI provider). PR Commentor does not collect, transmit, or log any data.
| Feature | Detail |
|---|---|
| Generate Description | Inserts a full PR description (overview + commits + testing notes) into any comment box, including inline review comments |
| Generate Title | Suggests a concise PR title (≤ 72 chars, imperative mood) next to the title field |
| AI Providers | Claude (claude-sonnet-5-5) · GPT (gpt-5-mini) · Gemini (gemini-2.5-flash) — one key per provider, switch any time |
| Output Style | PR Description (overall) or Per-commit (explain each commit individually) |
| Output Language | 16 languages (EN, 繁中, 简中, 日, 한, ES, PT, FR, DE, IT, RU, TH, VI, ID, TR, NL) |
| UI Language | Settings page available in all 16 supported languages |
| Custom Instructions | Separate prefix prompts for Generate Title and Generate Description |
| Model Picker | Fast / Balanced / Best shortcuts, models grouped by generation, dated snapshots folded away |
| Model Scan | Auto-fetches the models your key can use and leaves out ones that cannot generate text |
| Connection Test | One-click API key + model validation |
| Token Visibility | Eye icon toggle to show/hide GitHub Token and API Key fields |
| Private Repos | Supported with a GitHub token with repo scope |
| Compare Pages | Works on /compare/* pages before a PR is created |
| SPA Navigation | Works across GitHub's Turbo/SPA navigation |
| Dark Mode | Uses GitHub CSS variables — adapts to all themes automatically |
Search for PR Commentor in the Chrome Web Store and click Add to Chrome. Direct install link: PR Commentor on Chrome Web Store.
git clone https://github.com/your-username/pr-commentor.git
cd pr-commentor
npm install
npm run build- Open
chrome://extensions - Enable Developer mode (top-right toggle)
- Click Load unpacked → select the
dist/folder
The settings page opens automatically on first install. You can reopen it anytime by clicking the extension icon.
Required to read PR data via the GitHub API.
- Go to GitHub → Settings → Developer settings → Personal access tokens → Classic
- Create a token with the
reposcope (needed for private repos;public_repois sufficient for public-only) - Paste the token (
ghp_…) into the GitHub Token field
Fine-grained tokens require organization admin approval before they work on org repositories. Classic tokens are recommended.
Pick a provider from the list and paste its API key. Every provider keeps its own key and model; the one marked Active is used by the GitHub buttons — click Use this provider to switch.
| Provider | Where to get a key |
|---|---|
| Claude (Anthropic) | console.anthropic.com |
| GPT (OpenAI) | platform.openai.com |
| Gemini (Google) | aistudio.google.com |
Models are scanned automatically once a key is entered. Click Fast, Balanced or Best to take the newest model in that tier, or pick or type any model name. Click Test Connection to confirm everything is working.
| Setting | Options |
|---|---|
| Style | PR Description · Per-commit |
| Language | 16 languages (EN, 繁中, 简中, 日, 한, ES, PT, FR, DE, IT, RU, TH, VI, ID, TR, NL) |
| Custom Instructions | Free-text; For Title and For Summary are prepended to their respective prompts |
Click Save settings when done.
- Open a GitHub pull request.
- Click anywhere in a comment box — PR description, regular comments, or inline review comment threads.
- Click the Generate Description button that appears in the comment toolbar.
- Wait a few seconds — the AI-generated summary is inserted into the box.
- Edit as needed and submit.
Works on PR pages (/pull/*) and on compare pages (/compare/*) before a PR is opened.
- Open a GitHub PR or compare page.
- Click Generate Title next to the PR title field.
- The AI suggests a concise, imperative-mood title based on commits and changed files.
npm install # Install dependencies
npm run dev # Build with watch mode (auto-rebuilds on file changes)
npm run build # Production build → dist/
npm run publish:ext # Package and publish extensionNote:
npm run devusesvite build --watchinstead ofvite(Vite dev server). The@crxjs/vite-pluginv2 beta has compatibility issues with Vite 5's dev server — the generatedservice-worker-loader.jstries to connect tolocalhost:5173, which doesn't work for Chrome Extension service workers. Usingbuild --watchproduces correct output while still auto-rebuilding on every file change. After each rebuild, reload the extension inchrome://extensionsto see your changes.
Stack: TypeScript · Vite · @crxjs/vite-plugin · Manifest V3
- All tokens and API keys are stored in
chrome.storage.sync(encrypted, synced to your signed-in Chrome profile) and are never sent anywhere except GitHub and your AI provider. - PR Commentor does not include any analytics, telemetry, or third-party tracking.
- The extension only activates on
github.com/*/pull/*andgithub.com/*/compare/*URLs.
MIT



