ai-attribution

ai-attribution is a cursor rule for Cursor from mhmdreza-rafiei/agent-tools. It costs 1,070 tokens per session, scanned A, original, MIT.

A set of Git rules for explaining, preventing, and safely removing AI authorship information from commits.

In plain words
What is it for?
Use it to manage AI co-author lines, author identities, future commit settings, and carefully planned history changes.
Why use it?
It helps keep commits credited to the human developer and avoids accidentally rewriting shared project history.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc). Also seen: positional $N argument; mentions Codex; mentions Cursor.

Good fit Use it to manage AI co-author lines, author identities, future commit settings, and carefully planned history changes.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/mhmdreza-rafiei/agent-tools/ai-attribution
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/mhmdreza-rafiei/agent-tools

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 ai-attribution

README.md
[![agentmods](https://agentmods.dev/badge/rules/mhmdreza-rafiei/agent-tools/ai-attribution/github.svg)](https://agentmods.dev/rules/mhmdreza-rafiei/agent-tools/ai-attribution)
Your own site
<a href="https://agentmods.dev/rules/mhmdreza-rafiei/agent-tools/ai-attribution"><img src="https://agentmods.dev/badge/rules/mhmdreza-rafiei/agent-tools/ai-attribution/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 ai-attribution

Your own site · 80×15
<a href="https://agentmods.dev/rules/mhmdreza-rafiei/agent-tools/ai-attribution"><img src="https://agentmods.dev/badge/rules/mhmdreza-rafiei/agent-tools/ai-attribution.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,070 This file is loaded in full into every session.
When invoked 1,070 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.01070 $0.01070
Opus 5 $0.00535 $0.00535
Sonnet 5 $0.00214 $0.00214
Haiku 4.5 $0.00107 $0.00107

Measured 9d ago against content hash 9c2f23868dbb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

ai-attribution 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 9d ago.

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.

rules/global/ai-attribution.mdc · 88 lines

How it starts

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

AI git attribution (Cursor and other agents)

What "AI contribute" means

Some tools add machine authorship to commits so GitHub can show an AI as a contributor:

  1. Trailer (most common): a blank line, then something like:
    • Co-authored-by: Cursor <...>
    • Co-authored-by: Claude <...>
    • Co-authored-by: GitHub Copilot <...>
  2. Author / committer identity: Author: or Committer: set to an agent name/email (e.g. Cursor Agent) instead of the human.

Trailers live in the commit message. Changing only future commits does not rewrite old history. GitHub's Contributors list can lag after a rewrite.

Default policy

  • Prefer human-only authorship unless the user explicitly wants AI co-author trailers.
  • Never add Co-authored-by: for Cursor, Claude, Copilot, or other agents unless asked.
  • Never rewrite git history, force-push, or amend published commits unless the user explicitly asks and understands the risk.
  • Before any history rewrite: full backup of .git (or a clearly named sibling backup), then confirm backup exists.

Prevent (do this first)

  1. Cursor: Settings -> Agents -> Attribution -> turn off (stops new Cursor co-author injection).
  2. Optional local guard -- .git/hooks/prepare-commit-msg (strip known AI trailers on every commit):
#!/bin/sh
MSG_FILE=$1
# Drop AI co-author lines (extend patterns as needed)
sed -i.bak -E '/^Co-authored-by:.*(Cursor|Claude|Copilot|ChatGPT|Gemini|Codex).*/Id' "$MSG_FILE"
rm -f "${MSG_FILE}.bak"

On Windows Git Bash, sed -i works; for PowerShell-only setups, use a small Node/Python stripper instead. Make the hook executable (chmod +x on Unix).

  1. Confirm git config user.name / user.email are the human's (do not change git config unless the user asks).

Detect

# Trailers in reachable history
git log --all --grep='Co-authored-by:' -i
# Agent as author/committer
git log --all --format='%H %an <%ae> | %cn <%ce> | %s' | grep -iE 'cursor|claude|copilot|chatgpt|gemini|codex'

Read the full file on GitHub · 88 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. 9d ago First seen · 88 lines · 1,070 tokens per session scan A 9c2f23868dbb

Subscribe to this mod's changes

ai-attribution is a cursor rule published in the GitHub repository mhmdreza-rafiei/agent-tools (5 stars, last pushed 21d ago), licensed MIT. It adds 1,070 tokens to every session, about $0.0053 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-31.