Back/Engineering/Devin
BeginnerEngineeringDevin

How to Use an AI Agent for Quick Code Maintenance and Internal Tool Improvements

Follow Sahil Lavingia's method for delegating small but impactful maintenance tasks, like fixing an internal Slack report, to the AI agent Devin. This workflow shows how to use simple, clear prompts to fix code and update system prompts without distracting your engineering team.

From How I AI

How I AI: Gumroad CEO Sahil Lavingia’s Workflow for Building Features 40x Faster

with Claire Vo

How to Use an AI Agent for Quick Code Maintenance and Internal Tool Improvements

Tools Used

Devin

AI software engineer by Cognition Labs

Step-by-Step Guide

1

Identify an Internal Tool Annoyance

Find a minor issue or inefficiency in one of your internal tools or processes. For example, Sahil noticed an AI-generated Slack recap was noisy and included irrelevant information.

2

Formulate a Clear, Simple Prompt

Write a direct instruction for the AI agent that clearly explains the problem and the desired outcome. The prompt should be specific enough for the agent to understand the task.

Prompt:
Hey, at Devin, like, could you like, you know, only show the projects that actually have shipments and like hide the other ones... and also, like some of these aren't really shipments... make sure you know the pro update, the AI prompt that we're using for this.
3

Assign the Task to Devin

Give the task directly to your AI agent. This can be done through a command-line interface or integration where you can assign work to the agent.

4

Let the AI Implement the Fix

Allow the AI agent to work autonomously. It will locate the relevant scripts or files, analyze the code and any associated prompts, and write the necessary changes to resolve the issue. In Sahil's example, Devin added a .filter to the code and updated an LLM's system prompt.

5

Review and Merge the Pull Request

The AI agent will submit a pull request on GitHub with the completed fix. A human engineer should perform a quick review to ensure the change is correct and then merge it into the codebase.

Become a 10x PM.
For just $5 / month.

We've made ChatPRD affordable so everyone from engineers to founders to Chief Product Officers can benefit from an AI PM.

How to Use an AI Agent for Quick Code Maintenance and Internal Tool Improvements | AI Workflows