なぜ設定するのか

空文字にすると表記なし、文字列を入れるとその文面になります。古い includeCoAuthoredBy は attribution に置き換えられました。

チームのルールで AI 利用を明記する場合は消さないこと。

設定方法

  1. ~/.claude/settings.json を開く(なければ作る)
  2. スニペットを JSON の中に統合する。既存の設定は消さず、キーを足す形で入れる
  3. Claude Code を起動し直す
既定値
コミットに Co-Authored-By、PR に「🤖 Generated with Claude Code」
書く場所
~/.claude/settings.json
型
object with commit and pr strings and a sessionUrl Boolean, or false to hide all attribution. The false value requires Claude Code v2.1.281 or later; earlier versions reject it and skip the whole user, project, or local settings file that holds it
置ける場所
Any file

公式ドキュメントの説明

Customize the attribution Claude Code adds to git commits and pull requests. Commits get a git trailer such as Co-Authored-By by default; pull request descriptions get plain text. Set each part separately with the sub-keys below.

公式リファレンスを見る