AIRBORNEPatriot Solutions

Free guide · Coding agents

AI Coding Agent CLI: Tips from Beginner to Power User

Practical habits for getting more out of a terminal-based AI coding agent. Feature and command names differ between tools. Where a slash command is shown, treat it as the typical form and check your CLI's help (usually /help) for the exact name.

AIRBORNE Patriot Solutions, LLC~8 min readPart of the free AI guides

Overview

Contents: Foundations · Moving faster · Power user · Feature map · Core principles

Level 1: Foundations

1. Give every project an instruction file

  • In an existing codebase, run the CLI's init command (often /init). The agent scans folders, files, and architecture and writes a project instruction file: a cheat sheet of conventions, key files, and commands.
  • For a new project, have the agent draft it with you: goal, tech stack, rules, key folders.
  • Result: you stop re-explaining the project at the start of every session.

2. Watch your context with a status line

  • Many CLIs can show a small status bar (model, context used, cost). Ask the agent to set one up if yours supports it.
  • Seeing context fill up in real time helps you act before quality degrades ("context rot").

3. Use voice

  • Use the built-in voice input if there is one; otherwise use any system-wide dictation app.
  • Spoken prompts tend to be longer and richer in context, which helps.

4. Keep context small

  • Don't dump the whole codebase in. Give only what the current task needs.
  • Break big problems into small, focused steps.
  • Less noise in the context window means better output.

5. Find what's eating your context

  • Use the context inspection command (often /context) to see a breakdown: system prompt, loaded files, tool definitions, conversation.
  • If a session feels sluggish or confused, diagnose here first.

6. Compact mid-task, clear between tasks

  • Compact (often /compact) when context is getting full (around 60% is a sensible trigger). It summarizes history so you keep going with room to spare.
  • Tell it what to preserve:
    /compact keep all API integration decisions and the database schema
  • Clear (often /clear) when switching to an unrelated task. Your project instruction file still loads, so you're not starting from zero.

7. Start in plan mode

  • In plan mode, the agent can read and research but won't change anything until you approve.
  • It outlines steps, asks clarifying questions, and maps the approach before writing code.
  • Approve the plan, leave plan mode, then tell it to execute. This cuts down on correction rounds.

8. Give it problems, not just orders

  • Instead of "write a function that does X," ask "How should we handle X?" and let it reason through options.
  • Having it state its assumptions and explain the approach noticeably improves the result.

9. Make it ask questions first

Keep asking me questions until you're 95% confident you understand exactly what I need and what you need to do.

Up-front alignment saves several revision rounds later.

10. Build verification into the to-do list

When the agent drafts a task list, add check steps to it:

1. Build the page.
2. Take a screenshot and check the layout looks right.
3. Open the browser dev tools and confirm there are no console or functional errors.
Rule: don't move to the next item until you're 95% confident the current one is good.

The agent then checks its own work instead of building and handing off.

Level 2: Moving Faster

11. Use subagents for parallel work

  • Tell the main session to use subagents for complex problems.
  • Each subagent gets its own isolated context window and works in parallel (research, writing tests, trying alternative approaches), then reports a summary back.
  • The main thread's context stays clean.

12. Package repeatable workflows as skills or custom commands

  • Save reusable prompt files (for example, "scan for tech debt" or "review this code our way") in the location your CLI reads skills or custom slash commands from.
  • Invoke them by name or slash command, and the same procedure runs every time.
  • Commit them to the repo so the whole team shares the same SOPs.

13. Right-size the model per job

  • Many CLIs let you pick a model per subagent.
  • Use a smaller, cheaper model for simple or high-volume work, such as reading a pile of articles and summarizing.
  • Keep the strongest model on the main thread for synthesis and decisions. Costs go down without losing quality where it counts.

14. Keep the instruction file current

  • Add new discoveries, patterns, gotchas, and conventions as they come up. Next session, the agent already knows them.
  • Watch the size: it loads into every conversation and uses context. Keep it focused and trim it once it grows past a couple hundred lines.

15. Use the instruction file as a router

  • Keep the main file lean and link out to separate docs: style guide, business context, architecture notes.
  • The agent needs to know where to find information, not have all of it loaded every turn.

16. Interrupt early

  • If the agent heads the wrong way, don't wait for it to finish. Press Esc (or your CLI's interrupt key), correct course, and re-prompt.
  • Every token spent going the wrong way is wasted context.

17. Push back on "okay" output

Scrap that and do a more elegant version.
This isn't good enough. Try a completely different approach.
  • The second attempt is often much better once the bar is clear.
  • Then lock in the lesson: "Update the instruction file (or the relevant skill) so this doesn't happen again."

18. Rewind instead of restarting

  • Use the rewind/checkpoint feature (often /rewind, or a double-Esc menu in some CLIs) to roll the conversation, and in some tools the code changes, back to an earlier point.
  • Caveat: checkpoints are session undo, not version control. Shell side effects and some background edits may not be tracked. Commit to git for real safety.

19. Get notified with hooks

  • Hooks run a script on events such as "task finished" or "needs input." Many CLIs let you configure them by command or just by describing what you want.
  • Common use: play a sound when the agent finishes, so you can work on other things or run several sessions at once.

20. Feed it screenshots

  • Agents that accept images can read error dialogs, design references, and inspiration sites.
  • Self-review loop: "Take a screenshot of the page and tell me if the layout looks right."
  • Design → screenshot → fix → repeat a few times before calling v1 done.

21. Let it drive a browser

  • With browser automation tools, the agent can open your app, click through flows, fill forms, and verify behavior, not just appearance.
  • Great for front-end testing, and for web tasks that have no API (especially when you're already signed in).

22. Borrow from sites you like

  • Give it screenshots, or the HTML and CSS, of designs you admire and say "make it look like this."
  • Use the result as a template, then add your own touches. It beats generic default styling.

Level 3: Power User

23. Run parallel sessions with git worktrees

Two agents in the same folder will overwrite each other. Give each its own worktree and branch:

git worktree add ../myapp-feature-a -b feature-a
git worktree add ../myapp-feature-b -b feature-b
# start one agent session in each directory, then merge branches as usual
git worktree remove ../myapp-feature-a   # clean up when done

24. Prefer a direct API call over a heavy tool server (when context is tight)

  • Tool servers and connectors are convenient, but they load every tool definition into context.
  • If you need one capability (say, reading a single database table), a small script that calls that one endpoint can save a lot of context.

25. Schedule recurring checks

  • Some CLIs can re-run a prompt on an interval within a session: "Every 5 minutes, check the deployment and tell me only if something needs attention."
  • Useful for watching a build, a pull request, or error logs. One-off reminders often work too.
  • In-session loops usually expire. For long-running schedules, use the tool's scheduled-task feature or cron. Scheduled runs typically start fresh, without earlier conversation memory.

26. Run it on a remote server

  • Host the agent on a VPS so long jobs keep running when your laptop is closed.
  • Connect over SSH, or bridge it to a chat app for remote control.

27. Steer from your phone

  • Some CLIs support remote control of a local session from a phone or browser. Start a heavy task at your desk and keep directing it while away. The code stays on your machine.

28. Ask your data questions in plain English

  • Give the agent access to a database or warehouse CLI, then ask: "What were our top 10 revenue sources last quarter?"
  • It writes the query, runs it, and explains the result. This works with any CLI-based tool.

29. Ask for deeper thinking on hard problems

  • For architecture decisions, gnarly debugging, big refactors, or when normal prompting keeps missing, use the CLI's extended reasoning option (a setting, flag, or keyword, depending on the tool).
  • Don't use it for simple fixes. It's slower and costs more.

30. Configure permissions instead of skipping them

  • "Skip all approvals" modes are fast but risky.
  • Better: allow-list commands you know are safe and deny-list destructive ones (deletes, force operations). You keep most of the speed with far less risk.
  • In many tools, deny rules take priority over allow rules.

31. Use agent teams for big projects

  • Subagents run in parallel but don't talk to each other. Agent teams (where supported) share a task list, message each other, and hand off work. You can talk to individual members directly.
  • They cost more and run longer than subagents, but produce more cohesive results on large projects.

32. Pull in current documentation

  • Models have a knowledge cutoff, so they sometimes suggest renamed, deprecated, or removed APIs.
  • Connect a documentation-lookup tool that fetches up-to-date, version-specific library docs and examples into context before the agent writes code.

Feature Map

Names vary by CLI. These are the common concepts.

ConceptTypical formWhat it does
Init/initScan the project and generate an instruction file
Status linesetting or commandLive display of model, context %, cost
Voice inputcommand or OS dictationTalk instead of type
Context inspection/contextShow what's using your context
Compact/compact [what to keep]Summarize history and keep going
Clear/clearFresh conversation; instruction file still loads
Plan modemode toggle (often Shift+Tab)Read and plan only; no changes until approved
InterruptEscStop the current step and redirect
Hard stopCtrl+CInterrupt a running operation or exit
Rewind/rewind or checkpoint menuRoll back to an earlier point
Hooksconfig or commandRun scripts on events (e.g., notify when done)
Recurring promptloop or schedule featureRe-run a check on an interval
Extended reasoningsetting, flag, or keywordLarger thinking budget for hard problems
Help/helpList the real built-in commands for your tool
Note

Tip: If you send a message while the agent is working, many CLIs queue it rather than interrupting.

Core Principles

  1. Context is your scarcest resource. Keep it small, monitor it, trim it.
  2. Plan before you execute. Plan mode, clarifying questions, and the "95% confident" rule all prevent wasted cycles.
  3. Treat the agent as a teammate, not a vending machine. Give it problems, let it reason, and challenge weak output.
  4. Bake in quality checks. Screenshots, browser verification, and test steps in the to-do list catch issues before you do.
  5. Capture what you learn. Update the instruction file and skills whenever something new comes up.
  6. Right-size the model and the tool. Use cheap models for bulk work and strong ones for synthesis, and direct calls when tool overhead is too heavy.
  7. Autonomy with guardrails. Use allow and deny lists, worktrees, and git commits, not blind trust.

Previous: Everyday AI WorkflowsNext: AI Quick Reference

Want this trained into your team’s habits?

APS delivers hands-on enablement so people use the AI tools they already have, confidently and safely. Tell us where your team is stuck.

Educational and general, not legal advice. Follow your organization’s policies and applicable law.