no-ai-coauthors — the byline is not shared
commit-msg hook · github action
No AI co‑authors
A commit-msg hook and GitHub Action that rejects commits carrying<br>AI attribution trailers — because the byline is the one place<br>accountability can’t be shared.
Install the hook<br>Read the manifesto
$ pre-commit install --hook-type commit-msg<br>copy
COMMIT_EDITMSG<br>~/work · 9f2c1ab
1feat: add a retry budget to the sync worker
3Author: Ada Lovelace
4Signed-off-by: Ada Lovelace
5Co-Authored-By: Claude Opus 4.8
6Claude-Session: https://claude.ai/code/session_01T…
✗ commit rejected<br>✓ commit accepted · no AI co-authors
2 trailers removed
@@ why @@
the manifesto
The byline is not a shared resource.
AI co-author git-commit bylines are an impressive marketing hook —<br>but they provide no useful signal of provenance.
It is mid-2026. All code written is facilitated by a host of sophisticated tools.<br>The most recent of these are AI ‘co-authors.’ These have incredible utility,<br>but — as with the other tools in the development toolchain —<br>they are not meaningfully accountable for their output.
At best, tagging the bot that generated code as a ‘co-author’ adds noise to the<br>single most important accountability and attribution mechanism in the development<br>hierarchy. At worst, the practice implies similarly diffused responsibility.
As much as the act of code authorship is changing, the social rules for authorship<br>must not slip: we are responsible for our contributions.
The ‘author’ is, as ever, the contributing person.
Remove corporate spam from commit messages.
— No AI co-authors.
@@ diff @@
what it catches
It strikes the tool. It keeps the person.
Matching runs on both the display name and the email, normalized — so a renamed bot<br>or a numeric noreply address doesn’t slip through. A human is<br>never in the blast radius.
Rejected
# the commit will not be created
-Co-Authored-By: Claude Opus 4.8
-Claude-Session: https://claude.ai/code/…
-Co-authored-by: Copilot
-Co-authored-by: Cursor
-Co-authored-by: aider
ChatGPTGPTCodex<br>GeminiDevinWindsurf<br>OpenCodeAmazon QLlama<br>MistralDeepSeekQwen<br>GrokCodyCodeium<br>ClineTabnine+ more
Kept
# the commit goes through, untouched
+Co-authored-by: Claude Shannon
+Co-authored-by: Grace Hopper
+Signed-off-by: Ada Lovelace
## commented lines are ignored, too
It blocks the bot named Claude.
It welcomes the human named Claude Shannon.
@@ use @@
install
Pin 1.0.0. Pick your hook manager.
Every path points at the public repo and a tagged release, so installs are repeatable. Swap the tag when you upgrade.
pre-commit<br>prek<br>Lefthook<br>GitHub Actions<br>Plain Git<br>Husky
Add the repo to .pre-commit-config.yaml, then install the commit-msg stage.
.pre-commit-config.yamlcopy
default_install_hook_types: [pre-commit, commit-msg]<br>repos:<br>- repo: https://github.com/GoodHatsLLC/no-ai-coauthors<br>rev: 1.0.0<br>hooks:<br>- id: no-ai-coauthors
terminalcopy
$ pre-commit install --hook-type commit-msg
prek reads the same config, or use a native prek.toml entry.
prek.tomlcopy
default_install_hook_types = ["pre-commit", "commit-msg"]
[[repos]]<br>repo = "https://github.com/GoodHatsLLC/no-ai-coauthors"<br>rev = "1.0.0"<br>hooks = [{ id = "no-ai-coauthors" }]
terminalcopy
$ prek install --hook-type commit-msg
Consume it as a Lefthook remote config, then install.
lefthook.ymlcopy
remotes:<br>- git_url: https://github.com/GoodHatsLLC/no-ai-coauthors<br>ref: 1.0.0<br>configs:<br>- lefthook.yml
terminalcopy
$ lefthook install
Use the repo directly as a composite action. On push it reads the event payload; on pull_request it reads the PR commits.
.github/workflows/no-ai-coauthors.ymlcopy
name: no-ai-coauthors<br>on:<br>pull_request:<br>push:<br>jobs:<br>no-ai-coauthors:<br>runs-on: ubuntu-latest<br>permissions:<br>contents: read<br>pull-requests: read<br>steps:<br>- uses: GoodHatsLLC/no-ai-coauthors@1.0.0
No hook manager at all — download the script and point core.hooksPath at it.
terminalcopy
$ mkdir -p .githooks<br>$ curl -fsSL \<br>https://raw.githubusercontent.com/GoodHatsLLC/no-ai-coauthors/1.0.0/hooks/no-ai-coauthors \<br>-o .githooks/commit-msg<br>$ chmod +x .githooks/commit-msg<br>$ git config core.hooksPath .githooks
The package exposes a no-ai-coauthors bin for Node-oriented managers.
.husky/commit-msgcopy
no-ai-coauthors "$1"
package.json · simple-git-hookscopy
"simple-git-hooks": {<br>"commit-msg": "no-ai-coauthors \"$1\""
Your name is on the commit. Mean it.
Get it on GitHub ↗<br>Install paths