Skip to main content

Overview

Devin can analyze existing codebases, identify areas for improvement, or execute on refactoring requirements you share without breaking functionality.

Common Use Cases

  1. Writing and expanding test coverage
  2. Code refactoring and optimization
  3. API endpoint development and modification
  4. Performance improvements
  5. Code review and quality assurance
  6. Automated testing workflows via the API Reference

Example Prompts

Write unit test
Can you get https://github.com/markedjs/marked set up, use the command line tool with the --output/-o flag, then add a unit test to test the --output flag?
There should already be similar tests in bin.test.js that you can add to.
Endpoint refactor
Currently when users sends a POST to <endpoint>, we <describe endpoint behavior>. It would be better to split this endpoint into 2 separate endpoints because <explain reasoning>.
<Describe what the first endpoint should do>.
<Describe what the second endpoint should do>.
Test by <explain how Devin can test each endpoint to verify it's on the right track>.
General refactor
In the slack server, refactor AppRegistry into its own file.

Example Sessions

Code Coverage Tutorial

Learn how to improve test coverage systematically through our detailed tutorial:
  • Writing comprehensive unit tests
  • Identifying coverage gaps
  • Implementing missing test cases
View the Code Coverage Tutorial

Connect4 Code Refactor

A complete refactoring session showing:
  • Code structure improvement
  • Component separation
  • Performance optimization
  • Test coverage enhancement
View Session: https://app.devin.ai/sessions/8965de5e3ae0436985bf3dd2e1a5b4af
I