Add an Assisted-by git trailer to commits to provide transparency about AI involvement in code changes.
- GitHub stars
- 244
- Files
- 2
- Last commit
- Nov 3, 2026
- License
- Apache-2.0
- Allowed tools
- 5
What does the commit-assisted-by skill do?
commit-assisted-by is an agent skill. Add an Assisted-by git trailer to commits to provide transparency about AI involvement in code changes.
Summary generated from the skill's SKILL.md.
About the commit-assisted-by skill
Developers who want to maintain transparency regarding AI involvement in their version control history can use this skill to add specific git trailers to commits. It automatically inserts an Assisted-by tag containing the agent name and model ID into the commit metadata. This ensures that every code change clearly identifies which AI assistant and LLM version contributed to the work.
An agent should load this skill to monitor git activity during a session. It can apply trailers to new commits using the git commit command with the trailer flag, or amend existing commits on HEAD if they were made via external terminal escapes. For commits that appear outside the agent's direct control, the skill utilizes a safety-check.sh script to verify if an amendment is appropriate before proceeding.
When a user explicitly requests to tag an entire branch, the skill performs a rebase to backfill trailers across multiple commits. It defaults to using the upstream branch as a base to avoid rewriting pushed history, but it can handle custom base references. The skill relies on bash tools including git log, git commit, and git rebase to manage these updates.
What an agent can do with it
- 1Tagging new AI commitsAn agent can automatically include its identity in every new commit it creates during a coding session.
- 2Amending external commitsThe skill can add transparency to commits that a user made manually in a separate terminal.
- 3Backfilling an entire branchA developer can request that all unpushed commits in a branch be updated with the assistance trailer.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the commit-assisted-by skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the commit-assisted-by skill in Claude Code
~/.claude/skills/commit-assisted-by/SKILL.md
$ npx degit fluxcd/agent-skills/internal/skills/commit-assisted-by ~/.claude/skills/commit-assisted-byInstall the commit-assisted-by skill in Claude Code (project)
.claude/skills/commit-assisted-by/SKILL.md
$ npx degit fluxcd/agent-skills/internal/skills/commit-assisted-by .claude/skills/commit-assisted-byInstall the commit-assisted-by skill in Codex
~/.agents/skills/commit-assisted-by/SKILL.md
$ npx degit fluxcd/agent-skills/internal/skills/commit-assisted-by ~/.agents/skills/commit-assisted-byInstall the commit-assisted-by skill in Gemini CLI
~/.gemini/skills/commit-assisted-by/SKILL.md
$ npx degit fluxcd/agent-skills/internal/skills/commit-assisted-by ~/.gemini/skills/commit-assisted-byInstall the commit-assisted-by skill in Claude.ai
npx degit fluxcd/agent-skills/internal/skills/commit-assisted-by commit-assisted-by && zip -r commit-assisted-by.zip commit-assisted-by # claude.ai → Customize → Skills → + → Create skill → Upload a skill → commit-assisted-by.zip
Automated checks
Ran Nov 15, 2026Full report →Passed our automated checks. That is not a security audit: read the scripts before you let an agent run them. How checks work
- Source repository linked and reachablefluxcd/agent-skills/internal/skills/commit-assisted-by is public and reachablegithub.com/fluxcd/agent-skills/tree/HEAD/internal/skills/com ↗Pass
- Open source license (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗Pass
- Commit or release in the last yearLast commit 2026-11-03github.com/fluxcd/agent-skills/commits ↗Pass
- No download-and-run or credential theft in scripts1 script read; no download-and-run, remote eval, base64 execution or credential uploadPass
- No hidden instructions in SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/fluxcd/agent-skills/blob/HEAD/internal/skills/com ↗Pass
- Pre-approved tools are scopedPre-approved: Bash(*/safety-check.sh), Bash(git, commit:*), Bash(git, log:*)github.com/fluxcd/agent-skills/blob/HEAD/internal/skills/com ↗Pass
- SKILL.md follows the Agent Skills formatValid name and description; says when to use it; 105 linesgithub.com/fluxcd/agent-skills/blob/HEAD/internal/skills/com ↗Pass
SKILL.md
View on GitHubCommit Assisted-by trailer
Record the assisting agent's involvement in a commit by adding an Assisted-by: <agent-name>/<model-id> git
trailer. The <agent-name> identify the specific AI assistant (CLI/harness) and <model-id> is the LLM version
that contributed to the commit. This disclosure provides transparency about AI involvement in code changes.
In the command examples below, substitute <agent-name>/<model-id> with your own values before running anything.
Mode 1 — commits you create yourself
When you create a commit in a session, limit the commit subject to 50 characters. Use the imperative mood in the subject line (e.g., "Add support for X" instead of "Added support for X").
If the commit message body is needed to explain what and why, wrap it at 72 characters. Avoid verbose explanations in the body, be as concise as possible while still conveying the necessary information.
Pass --trailer directly on the commit command. This is the clean path and avoids amend noise:
git commit -s -m "Add support for X" --trailer "Assisted-by: <agent-name>/<model-id>"
Note that all commits must be signed off with a real human name and email to meet the DCO requirement. Never use your agent's name or a pseudonym in the sign-off or co-author fields.
Mode 2 — commits that appear outside your own git commit invocations
Sometimes a commit lands on HEAD that you did not run yourself — the user invoked git via a shell escape (e.g.
Claude Code's ! git commit ...) or a separate terminal. Your only window is after the fact.
Run the bundled safety-check script before amending. It prints safe, or skip:<reason> if HEAD is already
pushed, already trailered, a merge, or has a rebase/cherry-pick/revert/bisect in progress.
Invoke it with the script's full path — resolve scripts/safety-check.sh against the directory this SKILL.md was
loaded from, not the current working directory (the two are almost never the same):
<skill-dir>/scripts/safety-check.sh
Only when the output is exactly safe, amend:
git commit --amend --no-edit --trailer "Assisted-by: <agent-name>/<model-id>"
Follow up with one short line so the user knows the hash moved, e.g. "Amended HEAD to add Assisted-by trailer." If
the output starts with skip:, tell the user why the commit was skipped.
Mode 3 — explicit "tag the whole branch" request
Triggered by phrases like "add assisted-by to commits in this branch", "tag the commits on this branch", or "backfill the trailer". This is the only mode that rewrites more than HEAD, and only because the explicit request authorizes it. Never enter this mode on autopilot.
Pick the base
Default to @{u} — it guarantees the range is only unpushed commits, which removes the force-push question
entirely. If the branch has no upstream, ask the user for an explicit base ref rather than guessing. If the user
names a base themselves ("from the last release tag"), honor it.
Show the plan, then confirm
git log --oneline <base>..HEADso the user can see the commits that will be rewritten.- If
<base>is anything other than@{u}, rungit rev-list <base>..@{u} 2>/dev/null. If non-empty, those commits are already on the remote — warn the user that after the rebase they will need to force-push to publish the rewrite, and confirm before proceeding. - If the range contains merge commits, stop and ask how to handle them. Default rebase linearizes merges
(destructive), and
--rebase-mergeswith--execon merges is fragile — not worth the risk without the user's judgment.
Run it
The exec short-circuits on commits that already carry the trailer, so the pass is idempotent:
git rebase <base> --exec 'git log -1 --format=%B | git interpret-trailers --parse | grep -qi "^Assisted-by:" || git commit --amend --no-edit --trailer "Assisted-by: <agent-name>/<model-id>"'
Afterwards, report how many commits were tagged vs skipped. If the branch was already pushed, tell the user they
will need to run git push --force-with-lease themselves to publish the rewrite.
If the rebase hits a conflict, do not try to resolve it. Surface the conflict to the user and let them choose
--continue vs --abort.
Anti-patterns
- Never run
git pushyourself in any mode, even after a rebase. Publishing rewritten history is the user's call — surface the state and let them decide. - Don't use
Co-authored-by:— AI assistants are not GitHub users and the co-author convention is reserved for human collaborators.Assisted-by:is the correct semantic. - Don't fabricate or prettify either token. Use the actual agent/CLI/harness name and model ID/version.
Files in this skill
2commit-assisted-by skill questions
How do I install the commit-assisted-by skill in Claude Code?
Run npx degit fluxcd/agent-skills/internal/skills/commit-assisted-by ~/.claude/skills/commit-assisted-by. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the commit-assisted-by skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
How should I format the Assisted-by trailer?
The trailer should follow the format Assisted-by: <agent-name>/<model-id>, where the agent name identifies the assistant and the model ID is the LLM version.
Can I use Co-authored-by for AI assistants?
No, you should not use Co-authored-by because AI assistants are not GitHub users; the Assisted-by trailer is the correct semantic for this purpose.
What should I do if I need to amend a commit that was made outside of my tool calls?
You should run the bundled safety-check script first. Only if the output is exactly 'safe' should you proceed to amend the commit using the --trailer flag.