Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>Git PR PromptNew to Visual Studio Code? Get it now.
Git PR Prompt

Git PR Prompt

arch-33

|
5 installs
| (0) | Free
Generate AI-ready PR descriptions and commit messages from git history and staged changes.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Git PR Prompt

Generate AI-ready Pull Request descriptions and commit message prompts from your git history and staged changes. Copy a prompt to your clipboard and paste it into ChatGPT, Claude, Cursor, or any AI assistant.

Features

  • Generate PR Prompt — Build a prompt from commits between your branch and a chosen parent (e.g. main). Includes your PR template, commitlint rules, and optional extra context.
  • Generate Commit Message — Build a prompt from your staged diff and commitlint rules for AI-generated commit messages.
  • Conventional Commits & Commitlint — Detects your project’s commitlint config and instructs the AI to follow it.
  • Customizable prompts — Override the default prompts with Mustache templates (see Custom templates).
  • Excluded files — Exclude files from diffs via regex or glob patterns (e.g. lockfiles, generated code).
  • Multi-root workspaces — Pick the workspace folder when you have more than one.

Commands

Command Description
Generate PR Prompt Select workspace → parent branch → (optional) extra context → prompt copied to clipboard.
Generate Commit Message Select workspace (if needed) → prompt with staged diff copied to clipboard.

Run from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P).

Configuration

In Settings → search for Git PR Prompt (or edit settings.json under gitPrPrompt).

Setting Type Default Description
gitPrPrompt.excludedFilesRegex string[] [] Regex patterns for file paths to exclude from diffs (e.g. "\\.lock$", "dist/.*").
gitPrPrompt.excludedFilesGlobs string[] [] Git glob pathspecs to exclude (e.g. "*.lock", "dist/*"). Merged with default lock-file exclusions.
gitPrPrompt.prPromptTemplate string "" Custom Mustache template for the PR prompt. Empty = use built-in template.
gitPrPrompt.commitPromptTemplate string "" Custom Mustache template for the commit message prompt. Empty = use built-in template.

Custom templates (Mustache)

Use Mustache syntax to customize prompts. Variables are passed as described below; use {{{variable}}} for unescaped content (e.g. markdown/diffs).

PR prompt variables:

  • template — Contents of .github/pull_request_template.md (or “No pull request template found.”).
  • commitlintSection — Formatted commitlint section (or empty).
  • commitSection — Commit blocks (hash, subject, diff) joined.
  • extraContext — Optional text from the “extra context” input.
  • hasCommitlint — Boolean: commitlint config was found.
  • hasExtraContext — Boolean: user entered extra context.

Commit prompt variables:

  • commitlintSection — Same as above.
  • diff — Staged diff text.
  • hasCommitlint — Boolean.

Example settings.json snippet for a custom PR prompt:

{
  "gitPrPrompt.prPromptTemplate": "Write a PR description.\n\n## Template\n{{{template}}}\n\n## Commits\n{{{commitSection}}}"
}

Project setup the extension uses

  • PR template — If present, .github/pull_request_template.md (any depth under .github) is included in the PR prompt.
  • Commitlint — Config is read from .commitlintrc*, commitlint.config.*, or package.json → commitlint.

Requirements

  • VS Code ^1.109.0
  • Git in PATH
  • For PR prompt: at least one remote branch and commits on your branch not in the parent
  • For commit prompt: staged changes (git add)

Troubleshooting

  • “No commits found between … and HEAD” — Make sure you have local commits that are not on the selected parent branch.
  • “No staged changes found” — Stage files with git add before running Generate Commit Message.
  • “Failed to get git log” / “Failed to get staged changes” — Ensure the chosen folder is a git repo and Git is available in the terminal.

Development

pnpm install
pnpm run compile   # typecheck, lint, build
pnpm run watch     # watch build

Publishing (maintainers)

  1. Bump version in package.json and commit.
  2. Create a GitHub Release (tag e.g. v0.1.0). This triggers the Publish extension workflow.
  3. Set GitHub secret VSCE_TOKEN: create a Personal Access Token with Marketplace (Publish) scope from the same account that owns the arch-33 publisher, and add it as VSCE_TOKEN in the repo secrets.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft