Skip to main content Go to GitLab Docs homepage
What's new?
What's new? Get free trial
  • Use GitLab
  • GitLab Duo
  • GitLab Orbit
  • Extend
  • Install
  • Administer
  • Subscribe
  • Contribute
  • Solutions
GitLab Duo Agent Platform
GitLab Duo Non-Agentic
Getting started
Availability
Chat
Code Suggestions
Code Review
Custom review instructions
Contextual awareness
Amazon Q
Models
Prompt examples
Refactor legacy code
Generate tests
Debug failing code
Analyze security vulnerabilities
Troubleshooting
Data usage
  1. GitLab Docs /
  2. GitLab Duo /
  3. GitLab Duo Non-Agentic /
  4. Prompt examples
Help us learn about your current experience with the documentation. Take the survey.

GitLab Duo prompt examples

GitLab Duo can help you accomplish a variety of development tasks. Use these examples to instruct GitLab Duo.

Refactor legacy code
Refactor legacy code in your repository.
Generate tests
Generate comprehensive tests for existing functions and classes.
Debug failing code
Identify and fix bugs in failing code or tests.
Analyze security vulnerabilities
Analyze security vulnerabilities and prioritize fixes based on business impact.
GitLab Docs logo
  • Facebook
  • LinkedIn
  • Twitter
  • YouTube
Creative Commons License
Company
  • About GitLab
  • View pricing
  • Try GitLab for free
Feedback
  • View page source
  • Edit in Web IDE
  • Contribute to GitLab
  • Suggest updates
Help & Community
  • Get certified
  • Get support
  • Post on the GitLab forum
Resources
  • Terms
  • Privacy statement
  • Use of generative AI
  • Acceptable use of user licenses