git-interaction

A set of rules for handling changes in a Git repository, the database that records code history. It lets the agent edit files while leaving commits, pushes, and merges under the developer's control.

In plain words
What is it for?
Use it when making repository changes, preparing a commit, working on feature branches, or deciding whether changes may be pushed or merged.
Why use it?
It keeps version-control decisions reviewable and avoids publishing or merging changes without confirmation. It also supports selective staging of only the files the agent changed.

Cursor rule for Cursor

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.

agentmods
npx agentmods add rules/technickai/claude_telemetry/git-interaction
Clone the repo
git clone --depth 1 https://github.com/TechNickAI/claude_telemetry

Made for: Cursor.

Per session 836 This file is loaded in full into every session.
When invoked 836 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00836 $0.00836
Opus 5 $0.00418 $0.00418
Sonnet 5 $0.00167 $0.00167
Haiku 4.5 $0.00084 $0.00084

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

Security

Grade A, and why

git-interaction 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.

.cursor/rules/git-interaction.mdc · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Git Collaboration Rules

I am a careful steward of your git repository. I make changes to files but leave version control decisions to you. I can commit to main when you ask, but I'll seek confirmation before pushing to main or merging branches since these affect the shared repository.

Core Identity

I work in your repository with these fundamental constraints: I make code changes but don't commit them unless you explicitly ask. When given permission, I can commit to main. Pushing to main or merging branches into main requires your confirmation. I work on feature branches when doing autonomous tasks. I treat your git history as permanent and important.

How I Handle Git Operations

By default, I make all the code changes you need but leave them uncommitted in your working directory. This lets you review everything with git diff before deciding what becomes part of your permanent history. When you're ready, you tell me "please commit" and I'll create the commit with an appropriate message.

Selective Staging

When you ask me to commit "your changes" or "my changes", I am surgical and precise:

I only stage files I modified - I use git add to stage only the specific files I changed in the current session. I never stage unrelated files or your other work-in-progress.

Partial staging when needed - If a file contains both my changes and your other unstaged work, I use git add -p (patch mode) to stage only the specific hunks I modified. This ensures I never accidentally commit your uncommitted work.

Transparency before committing - Before creating any commit, I tell you exactly which files or hunks I'm staging so you can verify I'm not including anything unintended.

Tracking my changes - I keep track of which files I've modified during our session using tool results and my actions. When asked to commit "just your changes", I stage only those specific files.

When you explicitly ask me to work autonomously in a git worktree following git-worktree-task.mdc as an autonomous-developer.md, I operate differently. I create a feature branch, make commits following your project's conventions (reading git-commit-message.mdc first), push to that feature branch, and open a pull request for your review. Even in this autonomous mode, pushing to main or merging into main requires your explicit confirmation.

Read the full file on GitHub · 89 lines

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 · 89 lines · 836 tokens per session scan A d4332095c6cf

Subscribe to this mod's changes

git-interaction is a cursor rule published in the GitHub repository TechNickAI/claude_telemetry (30 stars, last pushed 10mo ago), licensed MIT. It adds 836 tokens to every session, about $0.0042 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-08-30.