Imtiaz RayhanFounder & EditorPrompting Aider is less about crafting elaborate prose and more about choosing the exact scope for a single commit. Aider is an open-source, git-native terminal AI pair-programmer that combines explicit file scoping, a tree-sitter repository map, Architect/Editor split mode, CONVENTIONS.md, and automatic lint/test loops with a commit-per-change workflow. Small, atomic prompts work effortlessly with that loop; sweeping multi-concern requests fight it.
What Aider Is
As documented in the Aider documentation, Aider runs inside your terminal against any git repository. Four architectural features define how you prompt it:
- Terminal git-native REPL. It operates inside the same shell where you run git, tests, and linters.
- Automatic commit per change. Every completed edit becomes a clean git commit on your active branch with a generated commit message.
- Tree-sitter repository map. Rather than loading your entire repo into context, Aider builds a compact repository map via tree-sitter indexing key files, classes, and function signatures so the model understands cross-repo relationships while keeping tokens lean.
- Automated lint and test loops. Aider can run your linter and test suite after every edit and automatically repair failures before handing control back.
For broader category framing, see The Complete Guide to Prompting AI Coding Agents and the tool use glossary entry.
The Git-Commit-Per-Change Model
Most IDE assistants propose a diff and wait for clicks. Under Aider's git integration, every accepted edit applies straight to disk and lands as its own commit. If you dislike an edit, /undo reverts the last Aider commit cleanly in one step.
Three prompting consequences follow immediately:
First, every prompt is a unit of git history. Mixing "rename this parameter, refactor error handling, and add retry tests" produces a tangled commit that is painful to review or git bisect. One prompt per concern produces commits that still read clearly months later.
Second, verify before stacking commits. Undoing one bad commit takes two seconds with /undo; untangling a mistake buried beneath five later commits requires interactive rebase. Inspect git show HEAD and test output as you go.
Third, the commit log doubles as an audit trail. On a feature branch, git log --oneline narrates every step Aider executed — invaluable for code review and regression hunting, provided your prompts stayed atomic.
/add, /read-only, and /drop — Explicit File Scoping
Aider strictly separates whole-repo awareness (supplied automatically by the tree-sitter repo map) from files permitted for editing. Three slash commands manage your active context:
/add <path>places a file into Aider's editable scope./read-only <path>attaches a reference file (an interface, spec, schema, orCONVENTIONS.md) so Aider can read every line without ever modifying it./drop <path>removes files you no longer need, keeping the context window lean for subsequent turns.
Aider never silently edits files you did not /add. That makes accidental blast radius rare: if a change genuinely requires editing another module, Aider asks permission to add it rather than wandering on its own.
| Session habit | What it does to prompting |
|---|---|
/add only the files the current change edits | Keeps every commit scoped to one concern |
/read-only interfaces, schemas, and CONVENTIONS.md | Grounds edits without risking stray modifications |
/drop completed files before starting the next task | Keeps context lean and token costs low |
/add twenty files "just in case" | Invites unintended cross-file edits and higher API spend |
| Rely on Aider to guess editable files | Adds extra confirmation round-trips |
Architect/Editor Split Mode, CONVENTIONS.md, and Lint/Test Loops
Three features separate a basic Aider session from a high-leverage engineering setup:
Architect/Editor Split Mode
Under Aider's chat modes, --architect splits each turn into two specialized calls: an architect model reasons through the problem and describes the solution in plain technical prose, and an editor model converts that specification into exact file diffs.
aider --architect \
--model anthropic/claude-opus-5-5 \
--editor-model anthropic/claude-sonnet-5-5 \
--read CONVENTIONS.md
Splitting reasoning from edit formatting lets you pair a top reasoning flagship (such as Claude Opus 5.5 at $4/$20, GPT-6.2 Astra at $8/$40, or GPT-6.2 Sol at $2/$10) with a fast, cost-efficient editor model (such as Claude Sonnet 5.5 at $2/$10, DeepSeek V4 Pro at $1.32/$3.96 peak / half off-peak, Gemini 4 Hydrogen at $1.50/$7.50, or GPT-6.1 Terra at $1/$5). You can also switch into /ask mode to explore a design question read-only before committing any edits.
Persistent Standards in CONVENTIONS.md
Following Aider's conventions workflow, place recurring coding standards — TypeScript strictness, error-handling patterns, preferred libraries, test structure, and forbidden shortcuts — in a repository CONVENTIONS.md file and load it read-only via --read CONVENTIONS.md (or add read: CONVENTIONS.md to .aider.conf.yml). Every session inherits the same guardrails without repeating boilerplate in your prompts.
Automated Lint and Test Verification Loops
As detailed in Aider's linting and testing docs, passing --auto-lint and --test-cmd (plus --auto-test) turns Aider into a closed-loop verifier:
aider --auto-lint --auto-test --test-cmd "pnpm test" --read CONVENTIONS.md
After applying a diff, Aider runs your linter and test command automatically; if errors appear, it feeds the exact trace back into the loop to repair the edit before you move on.
Small Atomic Prompts — The Sweet Spot
Because every prompt lands as a git commit, the ideal prompt matches the ideal commit: one concern, one verifiable behavior change, reviewable in under a minute.
Strong atomic prompts name the file, symbol, and exact invariant:
"Rename the userId parameter to accountId in lib/auth/session.ts and update all call sites in that file.""Add a null check before the array access on line 42 of utils/parse.ts. Return null on missing input and leave all other lines untouched.""Extract the cache key construction in api/fetch.ts into a pure helper named buildCacheKey without changing runtime behavior."
Weak prompts bundle a week of architecture into a single sentence ("Refactor the auth module"). When tackling a larger refactor, write a short bulleted plan first and send one atomic prompt per bullet — the same decomposition discipline behind spec-driven AI coding. Five atomic commits almost always beat one sprawling commit because every step can be tested, reviewed, or reverted independently.
Model Selection (December 2026)
Aider's bring-your-own-model architecture connects to Anthropic, OpenAI, Google, DeepSeek, OpenRouter, and local Ollama / OpenAI-compatible servers. In late 2026, typical BYO pairings include:
- Everyday flagship single-model runs: Claude Opus 5.5 ($4/$20, 1M), Claude Sonnet 5.5 ($2/$10, 1M), GPT-6.2 Sol ($2/$10, 1.05M), or Gemini 4 Neon ($3/$15).
- High-value open-weight & budget API runs: DeepSeek V4 Pro ($1.32/$3.96 peak, half off-peak, MIT open weights, 1M), Gemini 4 Hydrogen ($1.50/$7.50), GPT-6.1 Terra ($1/$5), or Mistral Large 4 ($0.70/$2.10).
- Architect/Editor split: Pair Claude Opus 5.5 or GPT-6.2 Astra ($8/$40) as
--modelwith Claude Sonnet 5.5, DeepSeek V4 Pro, or GPT-6.1 Terra as--editor-model. - Private local endpoints: Llama 4 Maverick or Mistral Large 4 served locally via Ollama or vLLM when source code cannot leave your network.
Even with stronger December 2026 models, two truths hold steady: a tight atomic prompt with minimal /add scope beats a vague prompt on any flagship, and switching models per complexity tier keeps bills predictable — the same knob highlighted in the Claude Code prompting guide and the Continue.dev prompting guide.
Browser Mode and the Web UI
Aider also ships an optional browser UI (aider --browser) alongside the terminal REPL. It exposes the same /add file scoping, diff display, and automatic commit loop in a graphical window for developers who prefer visual diffs or screen-sharing. The prompting discipline does not change across surfaces.
An Atomic Edit Prompt Example
This hypothetical session shows CONVENTIONS.md, /add, /read-only, /run, and /drop working together across two clean commits:
$ aider --architect --model anthropic/claude-opus-5-5 \
--editor-model anthropic/claude-sonnet-5-5 \
--read CONVENTIONS.md
> /read-only lib/api/errors.ts
> /add lib/api/client.ts lib/api/client.test.ts
> In lib/api/client.ts, `request()` currently throws immediately on
> network errors. Retry network errors and 5xx responses up to 3 times
> with exponential backoff (100ms, 200ms, 400ms). Keep 4xx responses
> throwing immediately using the classes in lib/api/errors.ts. Do not
> change the exported signature. Add unit tests in client.test.ts
> covering 5xx retry, 4xx immediate throw, and max-attempt exhaustion.
[Architect proposes the retry design; editor applies clean diffs to
client.ts and client.test.ts and creates commit #1.]
> /run pnpm test lib/api/client.test.ts
[All tests pass.]
> /drop lib/api/client.test.ts
> Extract the hardcoded retry delays in lib/api/client.ts into a
> top-level constant named RETRY_DELAYS_MS without changing behavior.
[Editor applies the pure refactor and creates commit #2.]
Two prompts, two cleanly separated commits: behavior + tests in the first, pure refactor in the second. If you later revert the refactor, the retry behavior and its tests stay intact.
When Aider Shines (and Late-2026 Ecosystem Note)
Aider excels in specific workflows:
- Small-to-medium codebases where you know the module boundaries and want explicit file-level control.
- Known-scope changes — targeted bug fixes, mechanical refactors, test additions, and incremental migrations where every step maps to a commit.
- Git-hygiene-minded workflows where every AI edit should land as an inspectable, revertible commit on a feature branch.
- BYO-model and local-model setups where you want full control over Architect/Editor routing across providers.
Late-2026 ecosystem note: Aider's git-first architecture and Architect/Editor split remain a gold standard for disciplined terminal editing, and existing users continue running it smoothly against December 2026 APIs. Because upstream release cadence slowed in 2026 (after PyPI 0.86.2), teams adopting a brand-new terminal coding agent for the first time — especially those wanting native MCP ecosystems, lifecycle hooks, or multi-subagent orchestration — often compare Claude Code and Cline alongside Aider.
Common Anti-Patterns
- Big refactor in a single prompt. Produces a huge, mixed commit that is painful to review or revert. Fix: decompose into three to five atomic prompts and run one per commit.
- Skipping
CONVENTIONS.md. Repeating style and testing rules every session wastes time and causes inconsistency. Fix: checkCONVENTIONS.mdinto the repo and load it with--read CONVENTIONS.md. - Adding editable files "just in case." Wide
/addlists expand blast radius and token cost. Fix:/addonly files that must change, attach reference files via/read-only, and/dropfiles once finished. - Ignoring the commit trail. Letting a flawed edit sink under four newer commits makes cleanup messy. Fix: inspect
git show HEADor run--auto-testafter every commit, and use/undoimmediately when an edit misses the mark. - Using one expensive model for every formatting pass. Paying top reasoning rates for mechanical diff formatting inflates spend. Fix: enable
--architectwith a strong planner and a fast--editor-model. - Sending vague follow-ups like "make it cleaner." Has no concrete target or stop signal. Fix: name the file, symbol, invariant, and exact before/after behavior.
FAQ
How is prompting Aider different from prompting Claude Code or Cursor?
Aider enforces explicit editable scope (/add) and writes a git commit after every accepted edit. Cursor focuses on interactive inline diffs in an IDE, while Claude Code runs multi-step autonomous loops with tool hooks and subagents before you commit. Aider's commit-per-prompt cadence makes small atomic prompts pay off immediately.
What if I want Aider to edit a file I have not added?
Aider will ask before adding it to edit scope. Because its tree-sitter repo map lets it see symbols across the codebase without editing them, it can tell you which file is missing — giving you a natural checkpoint to confirm whether that file truly belongs in the current commit.
Can I turn off auto-commit?
Yes — Aider supports --no-auto-commits if you prefer staging commits manually, though the tool is built around clean feature-branch auto-commits that you can later squash or rebase before opening a pull request.
How do I handle a big refactor if Aider wants small prompts?
Write a short step-by-step checklist (or ask Aider in /ask mode to help outline the steps), then execute one atomic prompt per step with --auto-test enabled. Each step becomes an isolated, revertible commit.
Does Aider work with local models?
Yes — connect local models such as Llama 4 Maverick or Mistral Large 4 via Ollama or any OpenAI-compatible server. Because diff formatting can be brittle on smaller local weights, test your chosen model's edit format on a small branch first or pair a hosted architect model with a local editor model where policy allows.