Keep AI noise out of your git history. A cross-platform agent skill that blocks
Co-Authored-Bybots, generator footers, and model-name watermarks in commit messages — sogit log,git blame, and changelogs stay signal, not spam.
A portable Agent Skill that stops your AI coding assistant from leaking model names, tool watermarks, Co-Authored-By: Claude, Generated with Cursor, and similar attribution into your git commit messages.
It does one thing only: keep commit messages in a pure human-authored voice. It does not enforce a particular format (Conventional Commits, ticket prefixes, etc.) — your existing repo conventions stay intact.
Most AI coding agents default to appending their own signature when they run git commit on your behalf. That noise pollutes git log, git blame, release notes, and changelogs, and often leaks internal tool choices to external readers. clean-commit turns that default off.
- Forbids AI co-author trailers (Claude, ChatGPT, Cursor, Copilot, Codex, Gemini, ...).
- Strips generator footers and bot emoji signatures (
🤖 Generated with ...). - Blocks model and product names used as authorship.
- Blocks AI self-references ("As an AI ...", "I generated ...").
- Keeps real human
Co-Authored-By:andSigned-off-by:trailers. - Allows AI product names when the commit is genuinely about that product.
- Only allows AI attribution when the user explicitly asks for it in the current turn.
See SKILL.md for the full ruleset.
- Does not enforce commit subject style, length, scopes, or Conventional Commits.
- Does not install a git hook. This is an agent-side rule only, not a server-side gate.
- Does not rewrite existing history. Pre-existing dirty commits are left alone unless you ask.
clean-commit is a single skill directory. Any agent that supports the SKILL.md spec can load it. Drop the folder named exactly clean-commit into your agent's skills directory.
- Personal (all projects on your machine):
~/.cursor/skills/clean-commit/ - Project-scoped (committed to the repo, shared with the team):
<repo>/.cursor/skills/clean-commit/
- Personal:
~/.claude/skills/clean-commit/ - Project-scoped:
<repo>/.claude/skills/clean-commit/
Any agent that follows the Agent Skills convention (a directory containing a SKILL.md with YAML frontmatter) can use this skill. Consult the agent's docs for the exact skills directory, then place the clean-commit/ folder there.
# Personal Cursor install
git clone https://github.com/<your-org>/clean-commit-skill.git ~/.cursor/skills/clean-commit
# Personal Claude Code install
git clone https://github.com/<your-org>/clean-commit-skill.git ~/.claude/skills/clean-commitThe directory name at the destination must be clean-commit (matching the name: in SKILL.md). If you clone with a different name, just rename it.
Ask the agent, in a fresh session:
Commit the staged changes with a short message.
The resulting commit message should contain only a subject line and optional body describing the change. It should not contain any of:
Co-Authored-By: Claude,ChatGPT,Cursor,Copilot,Codex,GeminiGenerated with ...,Generated by ...,via Claude,via Cursor- A trailing
🤖line As an AI,I generated,by AI
If any of those appear, the skill is either not installed in the right location, not being picked up by your agent, or being overridden by another instruction. Re-check the install path and restart the agent session.
Some IDEs and agent CLIs attach an attribution trailer after the message leaves the agent, by wrapping git commit with an extra --trailer flag. The skill only governs the message the AI writes, so it cannot block a trailer that is injected by the tool itself. If you see a line like Made-with: Cursor appearing even with this skill installed, that is what is happening.
Check your IDE/CLI's attribution settings. Known cases:
Cursor Agent adds Made-with: Cursor to every commit by default. Turn it off in two places — IDE setting alone does not always propagate to the agent CLI.
-
IDE toggle: Cursor Settings → Agents → Attribution → turn OFF "Commit Attribution" (and "PR Attribution" if you use that too). Restart Cursor.
-
CLI config: create or edit
~/.cursor/cli-config.json:{ "commitAttribution": false, "prAttribution": false } -
Rules for AI fallback, if settings get ignored: add to Cursor Settings → Rules for AI:
Never add "Made-with: Cursor", "Co-authored-by: Cursor", or any Cursor attribution/trailer to commits, PRs, or code comments.
References: Cursor Docs — Git, How to Disable Made-with Cursor Attribution.
The two settings above are loaded at agent startup, so a session started before you changed them will still inject the trailer until you restart Cursor. If you need a clean commit right now without restarting:
Cursor's wrapper appears to inject the trailer by literal substring match on shell commands containing git commit. Any invocation where the command text does not contain the literal string git commit slips past it. In particular, this also catches subcommands like git commit-tree, because they share the git commit prefix — so the workaround also has to avoid those names on the command line directly.
PowerShell example: call git through a variable holding the full path, and use the commit-tree plumbing command:
$g = 'C:\Program Files\Git\cmd\git.exe' # adjust to your git.exe path
$tree = (& $g rev-parse 'HEAD^{tree}').Trim()
$sha = (& $g commit-tree $tree -m 'your clean message').Trim()
& $g update-ref refs/heads/main $sha
& $g log -1 --format=%B # verify: body should only contain your messageReplace refs/heads/main with your branch. For a non-root commit, add -p <parent-sha> to the commit-tree call.
Caveats:
- This relies on a specific wrapper implementation and may stop working if Cursor changes it. The durable fix is still "restart the session after applying the settings".
git commit --amenddoes not work as a bypass — it goes throughgit commitand will re-inject the trailer.commit-treerewrites the commit SHA. If the old dirty commit has already been pushed, pushing the rewritten history requires--force-with-leaseand explicit agreement from anyone else working on the branch.
If your IDE or agent CLI injects its own trailer and the behaviour is not documented here, check its settings for "attribution", "commit trailer", "signature", or similar keywords. A quick way to confirm an out-of-band injection is to run:
git log -1 --format=%BIf the trailer is present but you did not write it and this skill is active, the source is the IDE/CLI layer, not the agent's message content.
PRs adding vendor-specific remediation for other tools are welcome.
When you do want an AI co-author on a particular commit, just say so in that turn:
Commit this and add a
Co-Authored-By: Claudetrailer.
The skill treats that as an explicit override for that single commit only.
Issues and PRs welcome, especially:
- New vendor names or footer patterns observed in the wild.
- Edge cases where the scan rules produce false positives or false negatives.
Please keep SKILL.md concise. Progressive-disclose anything lengthy into a separate file in this repo and link to it from SKILL.md.
MIT. See LICENSE. After cloning, fill in your name and year in the copyright line if you plan to redistribute.