Skip to Content
IDEsDevinInstructing Devin effectively

Instructing Devin effectively

Cloud Devin burns the most ACUs when the first message is vague. Official guidance is blunt: be as specific as possible — provide the same detail you would give a coworker with a written spec.

Hub: Tokenminning in Devin. Metering: Cloud ACUs, Token usage.

What makes a prompt work

From Instructing Devin Effectively , strong prompts combine:

ElementWhy it saves ACUs
Concrete scopeRepo, files, subsystem named — less exploration
Task breakdownNumbered sub-tasks with logical order — fewer dead ends
Success criteriaTests, CI, status codes, UI checks — Devin self-validates instead of guessing
Pointers to patternsFilenames, doc links, example modules — reuses existing design

Do make design decisions for Devin:

Optimize the getOrderDetails query in orderService.js by adding a composite index on order_id and product_id in order_items. Replace the correlated subquery with a JOIN to products. Run npm test after each iteration.

Don’t leave architecture open:

Improve our database performance.

Pre-task checklist

Before starting a cloud session, from When to use Devin :

Task definition

  • Clear start and end
  • Explicit success criteria (tests pass, CI green, matches existing pattern)
  • For complex work: scope with Ask Devin first — investigate codebase and generate a high-context prompt before implementation

Available context

  • Example files or modules to mirror
  • Links to API docs, design specs, or Figma via MCP
  • Relevant MCP integrations (Sentry, Datadog, databases) connected before the session

Success validation

  • Test suites, lint, build steps Devin can run autonomously
  • Browser QA instructions: spin up app, navigate flows, screenshot at breakpoints
  • Devin Review  with Auto-Fix for closed-loop PR iteration

Task size

  • Rule of thumb: if you could finish in ~3 hours, Devin can likely handle it
  • Larger work: split into sub-tasks — one session per sub-task, run in parallel when independent
  • Target XS–M session size in Session Insights (L/XL = unhealthy)

Session size as a guardrail

SizeACU (self-serve)MessagesAction
XS–M≤ 10≤ 10Healthy — replicate prompt pattern
L≤ 20≤ 20Review Issue Timeline; split next time
XL> 20> 20Break task apart; fix environment gaps

High ACU with few user messages → autonomous retries (check environment). Many messages with low ACU → underspecified initial prompt (use Improved Prompt from Session Insights).

Validation and checkpoints

Tell Devin how to prove correctness before opening a PR:

When modifying the API, confirm the endpoint returns 200 and includes fields id, name, status. Run npm test after each checkpoint. Ensure CircleCI passes before pushing. Pass ESLint/Prettier before any commit.

For UI work, ask Devin to test in its browser: run npm run dev, navigate to the page, record the flow, compare against design specs.

Playbooks vs Knowledge

MechanismUse forToken impact
Playbooks Repeatable step-by-step procedures (CI triage, release checklist)Reusable prompt — less retyping
Knowledge Org conventions, deployment steps, common fixesRetrieved when relevant — trim misleading items flagged in Session Insights

Playbooks = task procedures. Knowledge = persistent context across sessions. Do not duplicate the same prose in chat, Knowledge, and AGENTS.md.

After the session

  1. Open Session Insights — read Improved Prompt and Action Items
  2. Update Knowledge if Misleading Knowledge was flagged
  3. Save effective prompts as Playbooks for the team
  4. Fix recurring machine-setup issues so future sessions start clean
Last updated on