Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Integrate Git workflows with Cursor IDE: AI commit messages, @Git context, diff review, and conflict resolution. Triggers on "cursor git", "git in cursor", "cursor version control", "cursor commit", "cursor branch", "@Git".
.claude/skills/jeremylongshore-cursor-git-integration/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 69% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 47% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 47% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 32% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 64% | 0% |
Use Cursor's Git features as a view and drafting aid while preserving repository branch protection, reviews, signed checks, and human ownership of commits/merges.
| Condition | Safe response | |---|---| | Working tree has unrelated changes | Separate/stash them before staging. | | Generated commit message misstates work | Edit it to match the actual diff. | | Protected branch rejects push | Use the approved PR/check process; do not weaken controls. |
Review a Cursor-generated diff, stage only its intended files, run the focused suite, and push a topic branch for review. If an accidental file is staged, unstage it and recheck the diff before committing.
Leverage Cursor's AI features within Git workflows: AI-generated commit messages, @Git context for code review, merge conflict resolution, and branch management.
Access with Cmd+Shift+G / Ctrl+Shift+G:
┌─ SOURCE CONTROL ────────────────────────────────┐
│ main ← current branch │
│ │
│ Changes (3) │
│ M src/api/users.ts │
│ A src/api/products.ts │
│ M prisma/schema.prisma │
│ │
│ Commit message: [✨ Generate with AI] │
│ [Commit] [Commit & Push] │
└─────────────────────────────────────────────────┘Click the sparkle/AI icon next to the commit message input. Cursor reads the staged diff and generates a message:
Example output:
feat: add product catalog CRUD API with Prisma model
- Add Product model to Prisma schema with name, price, category fields
- Create GET/POST/PUT/DELETE endpoints in src/api/products.ts
- Add Zod validation for product creation and update inputsTips for better commit messages:
yaml# .cursor/rules/git-conventions.mdc --- description: "Git commit conventions" globs: "" alwaysApply: true --- Use Conventional Commits format: - feat: new feature - fix: bug fix - refactor: code restructure without behavior change - docs: documentation only - test: adding or updating tests - chore: maintenance tasks Keep subject line under 72 characters. Body explains WHY, not WHAT (the diff shows what).
Use @Git in Chat or Composer to include git context:
@Git
Review my uncommitted changes. Check for:
- Any debugging code left in (console.log, debugger)
- Missing error handling
- Type safety issues
- Potential performance problems@Git includes the diff of all uncommitted changes (staged + unstaged).
@Git
Summarize all changes in this branch compared to main.
What features/fixes were implemented?
Are there any breaking changes?When on a feature branch, @Git shows the cumulative diff between your branch and main.
When a merge conflict occurs, use Chat for AI assistance:
@src/api/users.ts
I have a merge conflict in this file. The markers show:
<<<<<<< HEAD (my changes)
Added email validation with Zod
=======
Added phone number field to user schema
>>>>>>> feature/phone-support
Help me resolve this to keep both changes:
- Keep the Zod email validation from my branch
- Add the phone number field from the other branch
- Ensure the Zod schema includes phone validation toobash# 1. Start the merge git merge feature/other-branch # 2. List conflicted files git diff --name-only --diff-filter=U # 3. For each conflicted file, open in Cursor and use Chat: # @the-conflicted-file.ts # "Resolve the merge conflict. Keep both sets of changes where possible." # 4. After resolving, stage and commit git add . git commit -m "merge: resolve conflicts between feature branches"
@Git
I'm about to push this branch for code review. Act as a senior
reviewer and identify:
1. Code smells or anti-patterns
2. Missing test coverage
3. Security vulnerabilities
4. Performance concerns
5. Documentation gaps# In terminal, get the diff for a specific commit:
git show abc1234 > /tmp/commit-diff.txt
# In Chat:
@/tmp/commit-diff.txt
Review this commit for correctness and best practices.bash# Create and switch to feature branch git checkout -b feature/add-favorites # Open Cursor, use Chat to plan: # Cmd+L: # "@Codebase I need to add a favorites feature. # What existing patterns should I follow?" # Work with Composer/Tab... # When ready: git add . # Use AI commit message via Source Control panel git push -u origin feature/add-favorites
@Git
Before I push, check this branch for:
[ ] No .env or secret files staged
[ ] No TODO/FIXME comments that should be addressed
[ ] All new functions have type annotations
[ ] No commented-out code blocksCreate rules that leverage git context:
yaml# .cursor/rules/pr-standards.mdc --- description: "Standards for AI-assisted code review" globs: "" alwaysApply: false --- When reviewing code changes (@Git): - Flag any function without error handling - Flag any API endpoint without input validation - Flag any database query without parameterization - Suggest test cases for untested code paths - Check for proper HTTP status codes (not always 200)
GitLens works in Cursor and enhances git features:
Install from Open VSX: Cmd+Shift+X > search "GitLens"
Cursor has built-in Cursor Blame that attributes code to the AI agent that generated it, helping teams track which code was AI-generated vs human-written.
git commit -S for GPG/SSH signed commits (works normally in Cursor's terminal)| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 11,218 | 10,542 | -6% | 1 | 1 | 0% | 2,232 | 3,669 | +64% | 0 | 0 | — |
case-02 | fail→pass | 8,147 | 4,097 | -50% | 1 | 1 | 0% | 1,323 | 2,235 | +69% | 0 | 0 | — |
case-03 | pass→pass | 5,623 | 2,622 | -53% | 1 | 1 | 0% | 1,022 | 1,975 | +93% | 0 | 0 | — |
case-04 | pass→pass | 11,504 | 5,220 | -55% | 1 | 1 | 0% | 1,934 | 2,377 | +23% | 0 | 0 | — |
case-05 | pass→pass | 8,750 | 5,643 | -36% | 1 | 1 | 0% | 1,466 | 2,502 | +71% | 0 | 0 | — |
case-12 | pass→pass | 17,302 | 13,328 | -23% | 1 | 1 | 0% | 2,358 | 3,318 | +41% | 0 | 0 | — |
case-06 | pass→pass | 9,334 | 3,598 | -61% | 1 | 1 | 0% | 1,667 | 2,132 | +28% | 0 | 0 | — |
case-07 | fail→pass | 12,028 | 8,474 | -30% | 1 | 1 | 0% | 2,036 | 2,986 | +47% | 0 | 0 | — |
case-08 | fail→pass | 12,757 | 9,177 | -28% | 1 | 1 | 0% | 2,040 | 2,997 | +47% | 0 | 0 | — |
case-09 | pass→pass | 18,292 | 10,326 | -44% | 1 | 1 | 0% | 990 | 1,848 | +87% | 0 | 0 | — |
case-10 | pass→pass | 9,411 | 8,609 | -9% | 1 | 1 | 0% | 1,651 | 2,992 | +81% | 0 | 0 | — |
case-11 | fail→pass | 11,065 | 7,469 | -32% | 1 | 1 | 0% | 1,846 | 2,437 | +32% | 0 | 0 | — |
case-13 | pass→pass | 11,652 | 18,482 | +59% | 1 | 1 | 0% | 1,538 | 1,739 | +13% | 0 | 0 | — |
case-14 | fail→pass | 13,389 | 11,636 | -13% | 1 | 1 | 0% | 2,088 | 3,420 | +64% | 0 | 0 | — |
case-15 | pass→pass | 11,221 | 4,857 | -57% | 1 | 1 | 0% | 1,924 | 2,428 | +26% | 0 | 0 | — |
case-16 | pass→pass | 8,889 | 4,408 | -50% | 1 | 1 | 0% | 1,622 | 2,261 | +39% | 0 | 0 | — |
case-17 | pass→pass | 7,210 | 2,596 | -64% | 1 | 1 | 0% | 1,279 | 1,944 | +52% | 0 | 0 | — |
case-18 | fail→pass | 6,230 | 1,480 | -76% | 1 | 1 | 0% | 1,150 | 1,737 | +51% | 0 | 0 | — |
case-19 | pass→pass | 3,631 | 1,494 | -59% | 1 | 1 | 0% | 593 | 1,770 | +198% | 0 | 0 | — |
case-20 | pass→pass | 9,051 | 5,920 | -35% | 1 | 1 | 0% | 1,620 | 2,652 | +64% | 0 | 0 | — |
case-21 | pass→pass | 8,437 | 7,354 | -13% | 1 | 1 | 0% | 1,632 | 3,017 | +85% | 0 | 0 | — |
case-22 | pass→pass | 8,045 | 10,791 | +34% | 1 | 1 | 0% | 1,708 | 3,561 | +108% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +27 percentage points is the difference between those two pass rates over the 22 comparable cases.
The publisher has shipped newer versions since this run, so these numbers describe v1, not the version currently listed.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.