# 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:

```bash
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
```

Since version 1.0.81, Claude Code supports ['output styles'](https://docs.anthropic.com/en/docs/claude-code/output-styles) (here is [my own summary](https://hans.lhoest.eu/claude-code-output-styles)). 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.

<div data-node-type="callout">
<div data-node-type="callout-emoji">💡</div>
<div data-node-type="callout-text">The below is an exercise in output styles. Claude Code has a general setting that allows you to configure whether to include the <code>co-authored-by Claude</code> byline in git commits and pull requests. The default value of this setting is <code>true</code>. See <a target="_self" rel="noopener noreferrer nofollow" href="https://docs.claude.com/en/docs/claude-code/settings#available-settings" style="pointer-events: none">settings.json</a> and set the value to <code>false</code>.</div>
</div>

## Creating the Custom Output Style

1. Start `claude`.
    
2. Create a new output-style using the `/output-style:new` command. Name it, I used `no-claude-in-commit-msg`.
    
3. 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

4. Locate the new output style file. Look for a `.md` file 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.
    
5. 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](https://raw.githubusercontent.com/lhohan/references/refs/heads/main/claude-config-example/.claude/output-styles/no-claude-in-commit-msg.md)
        
    
    If you're curious about the changes, [view the diff](https://github.com/lhohan/references/commit/c5501c775496b2e8500eb307a632a0abae48e2f1) showing exactly which lines were removed to eliminate Claude Code self-references in commits and pull requests.
    
6. Save the file.
    
7. In `claude`: `/output-style` should 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:

```bash
> /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:

```bash
> /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](https://docs.anthropic.com/en/docs/claude-code/output-styles) or my [own summary](https://hans.lhoest.eu/claude-code-output-styles).
