Agent skill

Cursor Git Integration

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Integrate Git workflows with Cursor IDE: AI commit messages, @Git context, diff review, and conflict resolution.

MITAuto-check: notesDevelopment

Install Cursor Git Integration

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill cursor-git-integration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace cursor-git-integration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/cursor-git-integration .claude/skills/cursor-git-integration && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cursor-git-integration
GitHub stars
2.8k
Token cost
~2k tokens
SKILL.md length
500 words
Files
9 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Integrate Git workflows with Cursor IDE: AI commit messages, @Git context, diff review, and conflict resolution.

  • Works in 4 steps: Inspect status and diff before staging;… → Draft but verify commit messages and… → Run required local checks, push through… → …
  • Cursor version control
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 12 more sections
  • Calls git and cursor

What it does

Cursor Git Integration is an agent skill from jeremylongshore/tons-of-skills-marketplace. 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".

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including reference files (for example `references/advanced-git-operations.md`, `references/ai-powered-git-workflows.md` and `references/best-practices.md`). Compatibility notes: Designed for Claude Code

It sits in Development, covering Git workflow and Commit messages. It works with Git. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Cursor version control
  • Tasks that involve Git workflow
  • Tasks that involve Commit messages

Example prompts

  • “cursor git”
  • “git in cursor”
  • “cursor version control”
  • “/cursor-git-integration”

Requirements

  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash(cmd:*)

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Inspect status and diff before staging; stage only reviewed, intended files.
  2. Draft but verify commit messages and never include secrets or unrelated changes.
  3. Run required local checks, push through the normal branch/PR workflow, and resolve feedback with evidence.
  4. Use revert or a new corrective commit for mistakes rather than rewriting shared history.

What it can do on your machine

Read from SKILL.md and the folder at commit 23ea8d4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash(cmd:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • cursor

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.cursor.com
    • git-scm.com
    • conventionalcommits.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Cursor Git Integration loads about 2k tokens when it runs, and up to ~3.4k if it reads all its reference files. Until then it costs about 62 tokens; SKILL.md has 500 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:238
    [ ] No .env or secret files staged

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit 23ea8d4, republished under its MIT licence (© jeremylongshore). 500 words, ~2,047 tokens.

Download SKILL.mdSave it as .claude/skills/cursor-git-integration/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
cursor-git-integration
description
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".
allowed-tools
Read, Write, Edit, Bash(cmd:*)
compatibility
Designed for Claude Code
version
1.19.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, cursor, git, workflow

Cursor Git Integration

Overview

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.

Prerequisites

  • A clean or recoverable working tree, repository contribution rules, and correct remote identity.
  • Required checks and reviewer/approval expectations for the target branch.

Instructions

  1. Inspect status and diff before staging; stage only reviewed, intended files.
  2. Draft but verify commit messages and never include secrets or unrelated changes.
  3. Run required local checks, push through the normal branch/PR workflow, and resolve feedback with evidence.
  4. Use revert or a new corrective commit for mistakes rather than rewriting shared history.

Output

  • A scoped, reviewable Git change with validation evidence and a normal revert path.

Error Handling

ConditionSafe response
Working tree has unrelated changesSeparate/stash them before staging.
Generated commit message misstates workEdit it to match the actual diff.
Protected branch rejects pushUse the approved PR/check process; do not weaken controls.

Examples

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.

Source Control Panel

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]                      │
└─────────────────────────────────────────────────┘

AI-Generated Commit Messages

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 inputs

Tips for better commit messages:

  • Stage related changes together (not unrelated edits)
  • The AI reads the diff, so clean diffs produce better messages
  • Edit the generated message before committing if needed
  • Configure Conventional Commits in project rules:
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).

@Git Context in Chat

Use @Git in Chat or Composer to include git context:

Show full SKILL.md (202 more words)Show less
@Git (Working State)
@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 (Branch Diff)
@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.

Merge Conflict Resolution

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 too
Systematic Conflict Resolution Workflow
bash
# 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"

Code Review with AI

Reviewing a PR Before Pushing
@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
Reviewing Specific Commits
# 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.

Branch Management Workflows

Feature Branch Setup
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
Pre-Push Review
@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 blocks

Git-Aware Project Rules

Create 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)

Integrations

GitLens Extension

GitLens works in Cursor and enhances git features:

  • Inline blame annotations
  • File history and line history
  • Interactive rebase editor
  • Commit graph visualization

Install from Open VSX: Cmd+Shift+X > search "GitLens"

Cursor Blame

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.

Enterprise Considerations

  • Commit signing: Configure git commit -S for GPG/SSH signed commits (works normally in Cursor's terminal)
  • Protected branches: AI-generated commit messages still go through normal branch protection rules
  • Audit trail: AI-generated code is committed under the developer's name, not the AI's
  • Pre-commit hooks: Enforce linting, testing, and secret scanning via git hooks -- AI-generated code must pass all checks

Resources

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files (references) in skills/.curated/cursor-git-integration of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/advanced-git-operations.md
  • references/ai-powered-git-workflows.md
  • references/best-practices.md
  • references/errors.md
  • references/examples.md
  • references/git-commands-via-terminal.md
  • references/git-hooks-integration.md
  • references/viewing-history.md

Open the folder on GitHubat commit 23ea8d4

Compare with similar skills

Cursor Git Integration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cursor Git Integration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cursor Git Integration this skilljeremylongshore/tons-of-skills-marketplace2.8k—~2kAutomated safety check: NotesMIT
ToolJet Multi-Repo CommitToolJet/ToolJet41k—~1.3kAutomated safety check: PassAGPL-3.0
Git Workflow and Versioningaddyosmani/agent-skills103k2 repos~3.5kAutomated safety check: NotesMIT
React Router Pull Request Creatorremix-run/react-router57k—~2.5kAutomated safety check: PassMIT
Saleor Commit Workflowsaleor/saleor23k—~575Automated safety check: PassBSD-3-Clause
Emoji Commit ConventionsbaptisteArno/typebot.io11k—~424Automated safety check: PassCustom licence

Similar skills

  • Commits changes across ToolJet's root repo and its server/ee and frontend/ee submodules, writing messages from the diffs and updating submodule pointers in order.

    41k GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Git Workflow and Versioning

    addyosmani/agent-skills

    Sets git habits for every change: short-lived branches, atomic commits with descriptive messages, clean pull requests, plus versioning, tagging and changelogs for releases.

    103k GitHub starsUsed in 2 repos~3.5k tokens
    DevelopmentAuto-check: notes
  • React Router Pull Request Creator

    remix-run/react-router

    Packages finished React Router work into a draft pull request: branch, commit, push, a written PR body and the right GitHub labels.

    57k GitHub stars~2.5k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Commits changes in the Saleor codebase and works through pre-commit hook failures from ruff, mypy, the GraphQL schema check and the migrations check.

    23k GitHub stars~575 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Emoji Commit Conventions

    baptisteArno/typebot.io

    Sets the repository's convention for commit messages and pull request titles: one emoji prefix for the main intent, a concise title and clean follow-up commits.

    11k GitHub stars~424 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Draft Pull Request Creator

    wordpress-mobile/WordPress-Android

    Commits and pushes current changes, writes a pull request title and body from the branch history and template, and opens a draft PR on GitHub after you approve it.

    3.2k GitHub stars~881 tokensUpdated today
    DevelopmentAuto-check: notes

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Analyzing Text With NLP

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to perform natural language processing and text analysis using the nlp-text-analyzer plugin.

    2.8k GitHub starsUsed in 1 repo~819 tokens
    Auto-check passed
  • Building Neural Networks

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill allows AI assistant to construct and configure neural network architectures using the neural-network-builder plugin.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Detecting Data Anomalies

    jeremylongshore/tons-of-skills-marketplace

    Process identify anomalies and outliers in datasets using machine learning algorithms.

    2.8k GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • Explaining Machine Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill enables AI assistant to provide interpretability and explainability for machine learning models.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Optimizing Prompts

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill optimizes prompts for large language models (llms) to reduce token usage, lower costs, and improve performance.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed

Works with

Categories

Questions about Cursor Git Integration

What does Cursor Git Integration do?

Integrate Git workflows with Cursor IDE: AI commit messages, @Git context, diff review, and conflict resolution. Cursor Git Integration is an agent skill from jeremylongshore/tons-of-skills-marketplace. Integrate Git workflows with Cursor IDE: AI commit messages, @Git context, diff review, and conflict resolution.

When should I use Cursor Git Integration?

Cursor Git Integration fits situations like: Cursor version control; tasks that involve Git workflow; tasks that involve Commit messages.

How do I install Cursor Git Integration in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill cursor-git-integration -a claude-code`. Or copy the skill folder (skills/.curated/cursor-git-integration in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/cursor-git-integration in your project. Claude Code loads it when a task matches its description.

How do I install Cursor Git Integration in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill cursor-git-integration -a codex`. Or copy the skill folder (skills/.curated/cursor-git-integration in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/cursor-git-integration in your project. Codex loads it when a task matches its description.

Can I use Cursor Git Integration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill cursor-git-integration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cursor-git-integration, .gemini/skills/cursor-git-integration, .github/skills/cursor-git-integration and .opencode/skills/cursor-git-integration in your project.

What does Cursor Git Integration need to run?

Going by SKILL.md and its folder, Cursor Git Integration needs the command-line tools its instructions call (git and cursor). Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(cmd:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Cursor Git Integration access the network?

SKILL.md names 3 domains. As links in the text: docs.cursor.com, git-scm.com and conventionalcommits.org. This is read from the text; nothing was executed.

Is Cursor Git Integration safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Cursor Git Integration use?

Cursor Git Integration is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cursor Git Integration use?

About 2k tokens (SKILL.md is roughly 8.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.4k tokens, read only when the agent opens those files.

What are the alternatives to Cursor Git Integration?

Skills that share tags, products or a category with Cursor Git Integration: ToolJet Multi-Repo Commit (ToolJet/ToolJet, 41k stars), Git Workflow and Versioning (addyosmani/agent-skills, 103k stars), React Router Pull Request Creator (remix-run/react-router, 57k stars) and Saleor Commit Workflow (saleor/saleor, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cursor Git Integration?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,821 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 8, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.