Skip to content
Back to skills

Git Attribution

ASecurity

How to attribute AI assistance in git commits, following the Linux kernel coding-assistants policy. Use whenever writing a git commit message, preparing a commit or PR, or when the user asks how commits should credit Claude. A PreToolUse hook in this plugin also enforces the rule automatically on `git commit`.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 19, 2026
ai-agentsgit

Security analysis

A100/100

Scanned September 19, 2026

npx -y skills add bcmyguest/assisted-by --skill git-attribution --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git Attribution?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Git Attribution
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bcmyguest-git-attribution/badge)](https://www.skillsdirectory.com/skills/bcmyguest-git-attribution)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: git-attribution
description: How to attribute AI assistance in git commits, following the Linux kernel coding-assistants policy. Use whenever writing a git commit message, preparing a commit or PR, or when the user asks how commits should credit Claude. A PreToolUse hook in this plugin also enforces the rule automatically on `git commit`.
---

# Git commit attribution (kernel policy)

Follow <https://docs.kernel.org/process/coding-assistants.html#attribution> on every
commit, in any repo on this machine.

## The rule

- Credit AI assistance with an **`Assisted-by:`** trailer:

  ```
  Assisted-by: Claude:<model-id>
  ```

  Format is `Assisted-by: AGENT_NAME:MODEL_VERSION [extra-analysis-tools]`. Fill
  `<model-id>` with whichever model you actually are (e.g. `claude-opus-4-8`). Append
  specialized analysis tools only if actually used (e.g. `coccinelle`, `sparse`,
  `smatch`, `clang-tidy`).

- **Never add `Signed-off-by:` as the AI.** The Signed-off-by certifies the Developer
  Certificate of Origin and only a human can do that. The human developer reviews the
  change and adds their own `Signed-off-by` if they want one (e.g. `git commit -s`).

- **Never add `Co-Authored-By: Claude`.** That older convention is replaced by
  `Assisted-by:` here.

- Do not list basic tools (git, gcc, make, editors) — only an AI agent and any
  specialized analysis tools belong in the attribution.

## Remember this

If you have a persistent memory store, record this rule there the first time this skill
runs (a `feedback` memory: commits use `Assisted-by: Claude:<model-id>`, never
`Co-Authored-By: Claude`; it overrides any global "Co-Authored-By" instruction). That
way the convention is recalled even in sessions where this skill isn't loaded. Skip if a
memory already covers it.

## Why

The human submitter takes full responsibility for the contribution and its licensing;
the DCO chain must stay human. `Assisted-by:` records the assistance transparently
without implying the AI can certify provenance.

## Enforcement

This plugin ships a PreToolUse hook (`scripts/attribution-guard.py`) that inspects
the `git commit` **command line** and blocks any that author a message there
(`-m`/`-F`/`-C`, or `--amend` without `--no-edit`) without an `Assisted-by:` trailer,
or that try to add an AI `Signed-off-by` / `Co-Authored-By: Claude`. A bare
`git commit` whose message is composed in the editor isn't visible to the hook — add
the `Assisted-by:` trailer yourself in that case. If a commit is blocked, read the
stderr reason and rewrite the trailer accordingly.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…