# git_ui: Add setting for custom commit message instructions \(\#58188\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/6d605b393cea083a8c8b4bdbc2c78ab26704900a)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 6d605b393cea083a8c8b4bdbc2c78ab26704900a

Requested commit: 6d605b393cea083a8c8b4bdbc2c78ab26704900a

Commit: 6d605b393cea083a8c8b4bdbc2c78ab26704900a

Tree: 7dd9acdeaebbeff73b6827b38784bf9dc739f6a8

Author: Richard Boisvert

Committer: GitHub

## Message

````
git_ui: Add setting for custom commit message instructions (#58188)

There's currently no way to customize AI-generated commit messages on a
per-commit basis. You can put instructions in AGENTS.md or a project
rules file, but those get fed into every agent interaction, not just
commit generation. The built-in "Commit message" prompt used to be
editable in the Rules Library, but that was replaced by Skills, which
aren't used when generating commit messages.

This PR adds an `agent.commit_message_instructions` setting. Its
contents are added to the commit message prompt in their own section,
alongside any project rules, so you can ask for a specific format
(Conventional Commits, a ticket prefix, etc.) without changing how the
agent behaves elsewhere:

```json
{
  "agent": {
    "commit_message_instructions": "Use the Conventional Commits format: <type>(<scope>): <description>."
  }
}
```

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Addresses #26503

Release Notes:

- Added an `agent.commit_message_instructions` setting to customize
AI-generated git commit messages.

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
````

## Parents

- [83c52e38785efbed6c0b9013cae1866f72218921](https://git.cafe/gitcafe/zed/commit/83c52e38785efbed6c0b9013cae1866f72218921?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/6d605b393cea083a8c8b4bdbc2c78ab26704900a?format=markdown)
