git-attribution
Skill1 starsChanged 2 months agoMITView on GitHub
Find and remove AI co-author attribution from a git repo - the Co-Authored-By trailer and "Generated with" footer that Claude Code, Codex, Copilot, Cursor, Gemini and others add to commits and that put the agent in your GitHub contributor graph. Works from any agent. Use this whenever the user says Claude, Codex or an AI showed up as a contributor, asks to remove Co-Authored-By or stop adding it, asks whether commits are still being attributed to an agent, wants AI attribution scrubbed from history, wants a repo checked for AI co-authors before pushing or publishing, or asks to block pushes that carry the trailer. Also use it before you push to a repo where the user has said they want no AI attribution.
- Deletes or force-pushes
- Installs packages
- Commits and pushes
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Londopy/git-attributionword for word, first seen Oct 15, 2026
- Londopy/claude-skillsword for word, first seen Sep 21, 2026
Other versions2 projects use a version of this.
Word for word · 2
- Londopy/claude-skills★ 1100% same
- Londopy/git-attribution★ 1100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- mcp-rollcallSkill
- settings-effectiveSkill
- skill-rollcallSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 61
Run the default report first, even when they asked for the fix.
- Very specific: line 80
Before --fix --apply, show them the plan (--fix alone) and confirm two things out loud: that the working tree is clean (the rewrite refuses …
- Very specific: line 87
After a rewrite the tool re-scans and reports how many remain (it should be 0).
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
git-attribution
Claude Code appends Co-Authored-By: Claude ... <noreply@anthropic.com> to every commit
it writes and Generated with Claude Code to every PR body, unless a setting turns it
off. Codex appends Co-authored-by: Codex <noreply@openai.com> and Generated with
[Codex](https://openai.com/codex/). when its ChatGPT workspace policy says so. Copilot,
Cursor, Gemini, Devin and Aider sign in their own ways. Nothing tells the user it
happened; they find out when the agent appears in their contributor graph. This skill
answers three questions - is it still being added, where is it already, and how do I
get it out - and installs a guard so it does not come back, whichever agent wrote it.
The script is scripts/attribution.py next to this file - run it from wherever this
skill was installed (~/.claude/skills/git-attribution/, ~/.agents/skills/git-attribution/,
~/.cursor/skills/..., or a project's .agents/skills/). Stdlib-only Python 3.10+,
read-only unless --apply is passed, and it never pushes.
Which host
The report's host line names the agent it detected from the environment
(CLAUDECODE, CODEX_SANDBOX, CURSOR_AGENT, GEMINI_CLI) and where that agent's
attribution switch lives:
| Host | Switch |
| Claude Code | attribution.commit / attribution.pr in settings.json (older: includeCoAuthoredBy). Read, with the file that decided it; --fix flips it off. |
| Codex | A ChatGPT workspace policy fetched at runtime - nothing on disk to read or flip. The pre-push guard is the local control. |
| Cursor, Gemini CLI, Copilot | No documented local switch. The guard is the local control. |
The Claude Code lines are printed whatever the host, because a machine often runs
more than one agent. The commit scan, the rewrite and the guard cover every agent in
--agents regardless of host.
Pick the mode from what the user asked
| The user says | Run |
| "is Claude / Codex still being added", "did the setting take", "check this repo" | default |
| "Claude is in my contributors", "remove the co-authored-by lines" | default, then --fix |
| "just turn it off" (Claude Code) | --fix --settings-only --apply |
| "scrub the history" (they already confirmed the force-push) | --fix --history-only --apply |
| "make sure it never gets pushed again" (any agent) | --guard --apply |
| "check my PRs too" | add --prs |
| "only Codex, I don't care about Copilot" | add --agents codex |
| "check before I publish" / CI | --strict --no-settings |
Pass --repo PATH when they mean a repo other than the cwd. --json when you need to
process the result.
Steps
- Run the default report first, even when they asked for the fix. It tells you what
the fix would touch. Read the lines that matter:
- host - which agent you are and where its switch is. Under Codex, say plainly that the trailer is workspace policy and the guard is what they control locally.
- claude -
ONmeans new Claude Code commits will keep getting the trailer. The source column says which file decided it. A project.claude/settings.jsoncan override a user-levelOFF; say so when that is the case, because switching it off in the user file will not help. - commits - how many carry attribution, from which agent (the hit column names it), and how many are pushed. Local-only ones can be rewritten freely. Pushed ones need a force-push afterwards, and that is the user's call, not yours.
- prs (with
--prs) - PR bodies with the footer. These are not fixed by a history rewrite; the plan lists the URLs to edit by hand. - guard - whether the pre-push hook is installed.
- Answer the question first. If they asked "is it still being added", the host and claude lines are the answer; do not lead with the commit list. If they asked "why is Claude in my contributors", the commit list is the answer; name the oldest one.
- Before
--fix --apply, show them the plan (--fixalone) and confirm two things out loud: that the working tree is clean (the rewrite refuses otherwise), and, if any tainted commit is pushed, that they are willing to force-push and that nobody else has a clone that will break. Do not run the rewrite on a shared branch without that confirmation. The rewrite keeps a backup atrefs/original/*and leaves remotes alone; commits older than the first tainted one keep their sha. - After a rewrite the tool re-scans and reports how many remain (it should be 0).
The push is yours to run only if the user asks:
git push --force-with-lease --all && git push --force-with-lease --tags. Tell them GitHub's contributor graph lags the push by a few hours, so the agent will still show for a while after the history is clean. Once they are happy, the backup can go:git for-each-ref --format='%(refname)' refs/original | xargs -n1 git update-ref -d. - Offer
--guard --applywhen the guard line says none. It installs apre-pushhook that refuses any push whose commits still carry a trailer (from any of the known agents unless--agentsnarrows it). If a pre-push hook already exists that is not ours, the tool refuses;--guardprints the hook text so you can merge it in by hand.git push --no-verifybypasses it once, which is fine to mention. - The settings change writes
attribution: {commit: "", pr: ""}to~/.claude/settings.jsonand removes the olderincludeCoAuthoredBykey. It takes effect for new Claude Code sessions; in the current one, just leave the trailer off when you write commit messages, whatever your host's reminder says. Under Codex there is no equivalent write; leave the trailer off yourself and rely on the guard.
Related, not overlapping
git log --grep finds the commits; this adds the pushed/local split, the per-host
switch, the rewrite with a backup and the hook. git filter-repo is the better
engine for a huge repo, but it needs a pip install and strips the remotes on purpose;
filter-branch ships with git and keeps them, which is the right trade for a
handful of commits.
What this cannot do
It does not push, and it does not edit PR bodies - both are outward-facing and stay
with the user. It cannot turn the setting off for a managed (enterprise) policy file
or for a project file it does not own; it tells you which file to edit. It cannot
change Codex's workspace policy, Cursor's or Gemini's behaviour - only Claude Code has
a local switch it can write. Host detection is best effort; with no marker the host
line is simply omitted. It finds the agents it knows (--agents lists them); a
trailer from an unfamiliar tool needs the name added to AGENTS. And it does not
make GitHub recompute the contributor graph faster; only time does that.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

