Skip to content

Implementing guard against AI attribution in git commands#51

Merged
tutods merged 2 commits into
mainfrom
copilot/prevent-ai-attribution
Jul 9, 2026
Merged

Implementing guard against AI attribution in git commands#51
tutods merged 2 commits into
mainfrom
copilot/prevent-ai-attribution

Conversation

Copilot AI commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Pull request created by AI Agent

Copilot finished work on behalf of tutods July 9, 2026 12:06
Copilot AI requested a review from tutods July 9, 2026 12:06
Copilot finished work on behalf of tutods July 9, 2026 12:09
@tutods
tutods marked this pull request as ready for review July 9, 2026 12:09
Copilot AI review requested due to automatic review settings July 9, 2026 12:09
@tutods
tutods merged commit b052f10 into main Jul 9, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to prevent AI attribution text from being included in git commits and GitHub PR-related commands run through Claude Code, by adding explicit attribution settings and a PreToolUse hook guard script.

Changes:

  • Adds attribution settings intended to suppress commit/PR attribution in Claude Code settings generation.
  • Replaces the existing PreToolUse(Bash) hook command with a new hook script intended to deny commit/PR commands containing AI attribution or co-author trailers.
  • Installs a new block-ai-attribution.sh hook script into ~/.claude/hooks/ via Home Manager.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
home/common/cli/ai/tools/claude/settings.nix Adds attribution config and updates Claude Code PreToolUse hook wiring; installs the new hook script into ~/.claude/hooks/.
home/common/cli/ai/tools/claude/block-ai-attribution.sh Introduces a PreToolUse guard that scans git commit / gh pr / gh api command content and denies if AI attribution patterns are detected.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 37 to 41
type = "command";
command = "rtk hook claude";
command = "\"$HOME/.claude/hooks/block-ai-attribution.sh\"";
timeout = 10;
statusMessage = "Checking commit/PR for AI attribution";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants