git

git is a cursor rule for Cursor from timurgaleev/vibestack. It costs 505 tokens per session, scanned A, original, MIT.

A Git workflow guide covering commit messages, pull requests, pushing changes, and destructive commands. Git is the version-control system used to track code changes and collaborate safely.

In plain words
What is it for?
It helps decide when commits or pushes are allowed, write commit messages, prepare pull requests, and handle resets, force pushes, rebases, and branch deletion cautiously.
Why use it?
It prevents unauthorized publishing, accidental loss of work, and risky changes to shared history.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc). Also seen: mentions subagents.

Good fit It helps decide when commits or pushes are allowed, write commit messages, prepare pull requests, and handle resets, force pushes, rebases, and branch deletion cautiously.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/timurgaleev/vibestack/git
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/timurgaleev/vibestack

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for git

README.md
[![agentmods](https://agentmods.dev/badge/rules/timurgaleev/vibestack/git/github.svg)](https://agentmods.dev/rules/timurgaleev/vibestack/git)
Your own site
<a href="https://agentmods.dev/rules/timurgaleev/vibestack/git"><img src="https://agentmods.dev/badge/rules/timurgaleev/vibestack/git/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for git

Your own site · 80×15
<a href="https://agentmods.dev/rules/timurgaleev/vibestack/git"><img src="https://agentmods.dev/badge/rules/timurgaleev/vibestack/git.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 505 This file is loaded in full into every session.
When invoked 505 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00505 $0.00505
Opus 5 $0.00253 $0.00253
Sonnet 5 $0.00101 $0.00101
Haiku 4.5 $0.00051 $0.00051

Measured yesterday against content hash bddcc850c904, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-20, from the pricing page.

Security

Grade A, and why

git scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

config/cursor/rules/git.mdc · 74 lines

What it actually says

Git Workflow

CRITICAL: Commit & Push Policy

NEVER commit or push without explicit user permission.

  • Only run git commit when explicitly requested by the user
  • Only run git push when explicitly requested by the user
  • Do not auto-commit after code changes
  • Only proceed when there is a clear instruction such as "commit"

Never, unless the user explicitly asks

  • Committing secrets (.env, API keys, tokens), binaries, or generated files
  • Bypassing hooks or signing (--no-verify, --no-gpg-sign, --no-signoff)
  • Reverting unrelated changes in the working tree

Destructive & Irreversible Operations

Run these only when the user clearly asks. State the blast radius first and wait for confirmation:

  • git reset --hard, git checkout -- <path>, git restore --
  • git push --force, git push --force-with-lease
  • Branch deletion (git branch -D, deleting a remote branch)
  • Amending or rebasing published commits
  • git clean -f

Commit Message Format

<type>: <description>

<optional body>

Types: feat, fix, refactor, docs, test, chore, perf, ci

Pull Request Workflow

When creating PRs:

  1. Analyze full commit history (not just latest commit)
  2. Use git diff [base-branch]...HEAD to see all changes
  3. Draft comprehensive PR summary
  4. Include test plan with TODOs
  5. Push with -u flag if new branch

Feature Implementation Workflow

  1. Plan First

    • Use task-planner subagent to create implementation plan
    • Identify dependencies and risks
    • Break down into phases
  2. Implementation

    • Write tests for new functionality
    • Implement functionality
    • Run tests to verify correctness
    • Verify 80%+ test coverage
  3. Code Review

    • Use quality-guard subagent for quality and security review
    • Address CRITICAL and HIGH issues
    • Fix MEDIUM issues when possible
  4. Commit & Push

    • Detailed commit messages
    • Follow conventional commits format
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 74 lines · 505 tokens per session scan A bddcc850c904

Subscribe to this mod's changes

git is a cursor rule published in the GitHub repository timurgaleev/vibestack (6 stars, last pushed yesterday), licensed MIT. It adds 505 tokens to every session, about $0.0025 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-19.