answered from live GitHub & Hugging Face data
How do I use commit trailers like Assisted-by for code contributions from AI coding agents like Codex?
Use a plain Assisted-by: trailer to disclose agent help, and never add Signed-off-by for the agent. Only the human adds that line.
The real question is how to label agent-written commits without breaking the kernel's sign-off rules. The steps below cover both.
What the rules say
- Kernel rule: "AI agents MUST NOT add Signed-off-by tags. Only humans can legally certify the Developer Certificate of Origin (DCO)." The human reviews the code, checks licensing, adds their own
Signed-off-by, and takes responsibility (docs.kernel.org). - Bug-fix commits: The kernel guide says to commit the fix with a Fixes tag and "Do not add a Signed-off-by tag" (docs.kernel.org).
- Gap: The kernel page I read did not show an exact
Assisted-byformat. The format below comes from a third-party skill's description, not from the kernel text. - Codex: I found no official Codex document on commit trailers. Do not assume Codex adds any trailer by default.
How trailers work in git
Git reads a trailer as a key: value line in the final block of the message. That block must follow a blank line (git-interpret-trailers).
Steps
- Write the commit subject and body first.
- Leave one blank line before the trailer block.
- Add the trailer. Name the agent and the work type. For example:
Assisted-by: <model> (code generation). - Review the code yourself. Then add your own
Signed-off-byline. - Check the result with
git log -1 --format=%B.
To add the trailer with git's own tool, run:
git interpret-trailers --trailer "Assisted-by: <model> (code generation)" --in-place msg.txt
GitHub co-author lines
Co-authored-by is a different feature. It credits a person, and it counts toward that person's contribution graph only if the email is linked to their GitHub account (GitHub Docs). Do not use it to mark agent help unless your project asks for it.
Helper tools
I checked four small projects. None has broad adoption. Star counts come from search results.
| Project | Stars | Last push | License | Verdict |
|---|---|---|---|---|
| bcmyguest/assisted-by | 2 | 148 days ago | NOASSERTION | ⚠️ Enforces kernel-style trailers. Covers Codex. |
| rokokol/ai-commit-trailers-skill | 0 | 49 days ago | MIT | ⚠️ Adds Assisted-by and Generated-by. |
| franks-ai-skills/assisted-by-trailers | 0 | 3 days ago | AGPL-3.0 | ✅ Newest. Its description uses the Assisted-by: <model> (code generation|code review) form. |
| JordanNewell/assisted-by | 0 | 4 days ago | MIT | ✅ A commit hook that rewrites vendor trailers into one Assisted-by: line. |
I could not load full metadata for the first two because of a rate limit. Their maintenance status comes from search results only.
Recommendation
Use plain git. A single git interpret-trailers command does the job, with no dependency. Add a helper only if you need automatic enforcement across many agents.
- Choose a helper like
bcmyguest/assisted-byif you want a hook that checks every commit. - Choose plain git if you want no extra code to trust.
If you run agents that push to GitHub, githug gives each agent its own key. Its commits name the accountable human, the agent and the run in trailers. Its Co-authored-by line for the human is opt-in and off by default.