Skip to content
New — orchestrate a team of Mel agents from your terminal. Learn more about orchestrating Mel agents
Mel
← All articles

Mel – the agentic terminal
The AI terminal for teams.

4 prompt templates for AI coding agents

November 10, 2026 · 3 min read

Share
In short
  • A good agent prompt has four parts: the goal, the scope, the limits and the check that means done.
  • Use the bug fix template when a test or error shows the problem.
  • Use the review template with a different model from the one that wrote the code.
  • Paste any of the four into Mel – the agentic terminal, or any coding agent.

The best prompt for an AI coding agent says four things: what to change, where to work, what not to touch, and which check proves it is done. The four templates below do that for the jobs teams hand off most: a bug fix, a code review, a refactor and an incident. Copy them, fill in the brackets, and paste them into Mel – the agentic terminal (openmel.dev) or any coding agent.

What makes a good prompt for an AI coding agent?

A good prompt gives the agent a finish line it can check by itself. "Make the login better" leads to wide, vague changes. "Make the login test in tests/auth pass without changing the test" leads to a small change you can review in minutes.

PartWhat it saysExample
GoalThe one thing to change"Fix the crash when the cart is empty"
ScopeWhere to work"Only in src/cart"
LimitsWhat not to touch"Do not change the tests or the database schema"
DoneThe check that proves it"npm test passes"

Template 1: fix a bug

Goal: fix [the bug, in one sentence].
How to reproduce: [the command or steps, and the error you see].
Scope: work only in [folders or files].
Limits: do not change the tests. Do not add new dependencies.
Done: [the test command] passes, and [the failing case] works.
Before you change anything, tell me what you think the cause is.

Template 2: review a diff

Review the changes on this branch against [main].
Look for: bugs, missing error handling, changed tests, and anything
that changes behaviour the description does not mention.
Do not edit files. List each finding with the file, the line and why it matters,
most serious first. Say "no findings" if there are none.

Tip: run the review on a different model from the one that wrote the code. A second model is more likely to question what the first one took for granted.

Template 3: refactor safely

Goal: [the refactor, in one sentence, e.g. rename X to Y across the project].
Change no behaviour. If a test needs to change, stop and ask me.
Scope: [folders]. Work in small steps and run [the test command] after each one.
Done: [the test command] passes and the diff contains only the refactor.

Template 4: investigate an incident

Something is wrong: [what users see, since when].
Evidence: [log lines, error messages, the last deploy].
Read only: do not edit files or run anything that changes data.
Find the most likely cause, show me the evidence for it,
and propose a fix with the exact change. Wait for my OK before you apply it.

How do you use these templates in Mel?

  1. Open a conversation in a pane in your project's folder.
  2. Paste the template and fill in the brackets.
  3. Mel's agents plan the work, edit files, run your check and fix what fails.
  4. Configurable approvals keep you in control of commands and edits, and every change shows as a diff you can review before you ship it.

Mel works with Claude, GPT, Gemini, DeepSeek and Qwen, so you can run the review template on a different model from the one that wrote the code.

What does Mel cost?

Mel is free with your own API key on Mac, Windows and Linux, plus a VS Code extension (your provider's usage charges apply). Pro is $20 a month and Max is $200 a month. See pricing.

For teams, Business is $50 a seat a month, two seats minimum, with shared credits and one invoice.

Frequently asked questions

Do these templates work with other coding agents? Yes. They are plain text and work with any agent that can read files and run commands.

Why tell the agent not to change the tests? Because the easiest way to make a failing test pass is to change the test. The limit makes the agent fix the code.

How long should a prompt be? As long as it takes to say the goal, the scope, the limits and the check. Usually five or six lines.

Try Mel

Download Mel for free and paste the bug fix template into your first task. To try the templates on your team's repo with us, write to hello@openmel.dev and we will set up a short demo.

Mel – the agentic terminal · openmel.dev. The agentic team for coding.

Found this useful? Share it with your team.
Share
Lalla Asmaa Alaoui
Written by
Lalla Asmaa Alaoui
Founder & CEO of Mel

Lalla is a hands-on tech founder, agentic infrastructure architect and the vision behind Mel.

Follow on LinkedIn

Get started

Try the agentic terminal for teams.

The Mel terminal is free to download, no account needed. The AI agent is free on your own provider key — 1,500 hosted-AI credits a month on Pro.