Customize GitLab Duo

You can customize GitLab Duo to match your workflow, coding standards, or project requirements.

Customization options

Method AI feature Use cases
Use custom rules to provide instructions. - GitLab Duo Chat - Apply personal preferences.
- Enforce team standards.
Create an AGENTS.md file to provide instructions. - GitLab Duo Chat
- Flows
- Other non-GitLab AI coding tools
- Account for project-specific context.
- Organize a monorepo.
- Enforce directory-specific conventions.
Create MR review instructions to ensure consistent and specific code review standards in your project. - GitLab Duo Code Review (Classic)
- Code Review Flow
Apply:
- Language-specific review rules.
- Security standards.
- Code quality requirements.
- File-specific guidelines.

Best practices

When you customize GitLab Duo, apply the following best practices:

  • Start with minimal, clear, and simple instructions, and add more as needed. Keep the instruction file as short as possible.
  • Make sure the instructions are specific and actionable. Provide examples as needed.
  • Choose the method that matches your use case.
  • Combine multiple methods to tailor and control how GitLab Duo behaves.
  • Document your choices in comments to explain why certain instructions exist.
  • Protect customization files with Code Owners to manage changes.