なぜ設定するのか
空文字にすると表記なし、文字列を入れるとその文面になります。古い includeCoAuthoredBy は attribution に置き換えられました。
チームのルールで AI 利用を明記する場合は消さないこと。
設定方法
~/.claude/settings.jsonを開く(なければ作る)- スニペットを JSON の中に統合する。既存の設定は消さず、キーを足す形で入れる
- Claude Code を起動し直す
- 既定値
- コミットに Co-Authored-By、PR に「🤖 Generated with Claude Code」
- 書く場所
~/.claude/settings.json- 型
- object with
commitandprstrings and asessionUrlBoolean, orfalseto hide all attribution. Thefalsevalue 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.