Remove Claude Code branding from commit messages using output styles
When Claude Code creates git commits for you, it automatically adds its own signature to every commit message, including a promotional link and co-author attribution. Personally I think this is pretty annoying but especially for professional work or team repositories you may prefer cleaner commit messages.
By default, Claude Code adds these lines to every commit:
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fortunately, since version 1.0.81, Claude Code supports 'output styles' (here is my own summary). Output styles are configuration files that allow you to customise Claude Code's behaviour by modifying its system prompt (the internal instructions that control how Claude responds).
This feature allows us to remove Claude Code's behaviour of adding itself to every commit message.
Creating the Custom Output Style
Start
claude.Create a new output-style using the
/output-style:newcommand. Name it, I usedno-claude-in-commit-msg.Complete the creation wizard. The initial content you enter doesn't matter since we'll replace it entirely in the next step.
Configuring the System Prompt
Locate the new output style file. Look for a
.mdfile with your chosen name in the.claude/output-styles/directory (either in your project folder or home directory) and open it in your text editor.Replace the entire file content with a modified system prompt that excludes commit message branding. You have two options:
Manual approach: Find the system prompt yourself to remove Claude Code references
Ready-to-use version: Use my version based on the system prompt of Claude Code 1.0.85
If you're curious about the changes, view the diff showing exactly which lines were removed to eliminate Claude Code self-references in commits and pull requests.
Save the file.
In
claude:/output-styleshould now show the updated style.
Testing the Changes
Now let's verify that our custom output style works as expected:
Before: Default Output Style
First, let's see what happens with the default output style:
> /output-style
⎿ Set output style to default
> commit changes
â•───────────────
│ Bash command
│
│ git commit -m "chore(claude): Add default output
│ style configuration
│
│ 🤖 Generated with [Claude Code](https://claude.ai/code)
│
│ Co-Authored-By: Claude <noreply@anthropic.com>"
╰───────────────
Notice the Claude Code branding and co-author attribution in the commit message.
After: Custom Output Style
Now let's switch to our custom output style and try the same operation:
> /output-style
⎿ Set output style to 'no-claude-in-commit-msg'
> commit changes
â•───────────────
│ Bash command
│
│ git commit -m "chore(claude): set output style
│ to no-claude-in-commit-msg"
╰───────────────
Nice! The commit message is now clean, containing only the actual commit description without any Claude Code references.
Conclusion
You've successfully customised Claude Code to remove its self-referential branding from commit messages. Your git history will now be cleaner and more professional, containing only the essential commit information without promotional content.
For more details on output styles, check the official documentation or my own summary.