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
 / 
    • GitLab Docs
    • GitLab Duo
    • GitLab Duo Non-Agentic
    • Prompt examples

    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.
    Was this page helpful?
    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