Skip to content
Skills Library
Programming · Automation

commit-assisted-by

/commit-assisted-by

Add an `Assisted-by: <agent-name>/<model-id>` git trailer to commits made during an AI-assisted coding session. Trigger on any `git commit` activity visible in the session — either commits you make yourself, or commits the user makes outside your tool calls that surface in the conversation — even without an explicit request. Also trigger when the user explicitly asks to tag existing commits in a branch (e.g. "add assisted-by to commits in this branch").

Licence
Apache-2.0
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
1
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/safety-check.sh

What it does and when to use it

Add an `Assisted-by: <agent-name>/<model-id>` git trailer to commits made during an AI-assisted coding session. Trigger on any `git commit` activity visible in the session — either commits you make yourself, or commits the user makes outside your tool calls that surface in the conversation — even without an explicit request. Also trigger when the user explicitly asks to tag existing commits in a branch (e.g. "add assisted-by to commits in this branch").

Triggers from the description

add assisted-by to commits in this branch
Original author description

Add an `Assisted-by: <agent-name>/<model-id>` git trailer to commits made during an AI-assisted coding session. Trigger on any `git commit` activity visible in the session — either commits you make yourself, or commits the user makes outside your tool calls that surface in the conversation — even without an explicit request. Also trigger when the user explicitly asks to tag existing commits in a branch (e.g. "add assisted-by to commits in this branch").

How it works

  1. Mode 1 — commits you create yourself
  2. Mode 2 — commits that appear outside your own git commit invocations
  3. Mode 3 — explicit "tag the whole branch" request
  4. Anti-patterns
Original SKILL.md headings · 94 lines, 743 words
SKILL.md preview
---
name: commit-assisted-by
description: >
  Add an `Assisted-by: <agent-name>/<model-id>` git trailer to commits made during an AI-assisted coding
  session. Trigger on any `git commit` activity visible in the session — either commits you make yourself,
  or commits the user makes outside your tool calls that surface in the conversation — even without an
  explicit request. Also trigger when the user explicitly asks to tag existing commits in a branch (e.g.
  "add assisted-by to commits in this branch").
license: Apache-2.0
allowed-tools: Bash(*/safety-check.sh) Bash(git commit:*) Bash(git log:*)
---

# Commit 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

1. `git log --oneline <base>..HEAD` so the user can see the commits that will be rewritten.
2. If `<base>` is anything other than `@{u}`, run `git 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.
3. If the range contains merge commits, stop and ask how to handle them. Default rebase linearizes merges
   (destructive), and `--rebase-merges` with `--exec` on 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 push` yourself 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 package (2)
  • SKILL.md 5 KB
  • scripts/safety-check.sh 1 KB

Versions

The database has no other skills named commit-assisted-by.

Database snapshot: 13.11.2026 · package version 93089b733e12 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100git-commit
    Inspect Git changes, organize logical commits, and write Conventional Commits messages. Use for /git-commit, explicit commit requests, message drafting, commit planning, and commit review. Excludes general Git troubleshooting, branch strategy, and history repair.
  • 100git-commit
    Guide for creating git commits in this repository: conventional commit format, allowed types, and branch naming conventions. Use when staging changes and writing a commit message, creating a branch, or naming a branch. Trigger on: "commit", "create a commit", "git commit",…
  • 100git-commit-and-workflow
    Git commit, branch and pull request best practices using Conventional Commits. Use whenever creating commits, naming branches, preparing pull requests, writing commit messages, or when asked to commit, push, merge or release code.
  • 100commit-message
    Generate conventional commit messages - use when creating commits, writing commit messages, or asking for git commit help
  • 100git-commit
    Guide for Git commit messages and pushing code. Use when user says "commit", "push code", "push to git", "save changes to git", "git add and commit", "commit and push", or needs help writing commit messages following Conventional Commits.
  • 100git-workflow
    Git workflow best practices. Covers branching, commits, and collaboration. Use for version control guidance. USE WHEN: user mentions "git", "commit", "branch", "pull request", "PR", "merge", "rebase", "version control", asks about "commit message", "branching strategy", "git…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.