AI Coding Assistants: 10 Commands and Techniques to Boost Developer Productivity
This guide explains how to get more out of AI coding assistants built around agents. It covers the three variables that shape the experience — context budget, permission boundaries, and result verification — and then walks through 10 practical techniques across five areas: onboarding, context and version management, permission control, input and expression, and parallelism and scale. You'll learn how to follow built-in onboarding, use side-chain questions and session rewind to keep context clean and work reversible, match permission modes to risk, let the agent search instead of pasting code, use project memory files, split work across sub-agents, and hand quality gates to automation. It closes with how teams can turn individual efficiency into team-wide practice.
Introduction: The Difference Isn’t the Model — It’s How You Collaborate
Agent-based coding tools are reshaping software development, shifting it away from “writing code line by line” toward “describe the intent, set the boundaries, review the results.” These tools run inside a terminal or editor. They can read the codebase, search files, edit code, execute commands, and chain multiple steps together within a single session.
Model capabilities are iterating quickly, but what actually determines the experience is usually not the model — it’s how you work with it. Tools are updated frequently, yet many users still interact with them in the simplest way possible: manually confirming every step, pasting whole files into the chat box, and starting over from scratch whenever something unexpected happens. Options that are already documented and the built-in onboarding flows often get ignored.
For example, if a tool’s documentation clearly distinguishes between different permission modes, you should check the mode descriptions and confirm which one you’re actually using and when it takes effect — rather than reaching for some “skip confirmation” startup flag out of habit. When onboarding tasks are sitting right there in the menu, many people dive straight in anyway; and when a shortcut would take you back to the previous state, the instinct is still to redo everything.
Note: The commands and configurations in this article are illustrative. Syntax and options vary across tools — refer to the official documentation.
1. Three Key Variables in Agent Collaboration
1.1 Context budget: useful information matters more than total volume
An agent’s capabilities are built on top of the conversation context, and the context window is limited — usually measured in tokens.
- Irrelevant content dilutes the important signals, and models tend to use information in the middle of the context less effectively than at the beginning and end.
- The longer the context, the higher the reasoning cost and the slower the responses.
- Prompt cache hits can significantly lower cost, but once the cache is invalidated, you pay again for the entire history.
So the goal of context management isn’t to “stuff in as much as possible” — it’s to “make every piece of content earn its place.”
1.2 Permission boundaries: what it’s allowed to do sets how far it can help you
Agents need to read and write files and run commands; permissions are their “hands.” Authorization strategies generally come in three flavors:
- Manual confirmation for each action;
- Automatic execution tiered by risk;
- Skipping confirmation entirely.
Each fits a different scenario. The key is matching the authorization granularity to the risk level.
1.3 Result verification: turn “looks right” into “runs right”
Large models generate the most probable code, and “looks plausible” does not mean correct. Builds, unit tests, type checks, and static analysis are the objective judges. Having the agent run these checks automatically after each change is often more efficient than reviewing line by line by hand.
Around these three variables, here are 10 practical techniques grouped into five areas: onboarding, context and version management, permission control, input and expression, and parallelism and scale.
2. Getting Started: Set the Right Expectations with the Official Course First
Tip 1: Walk through the built-in onboarding before you start for real
Most mainstream agent tools ship with interactive onboarding, usually in the form of staged tasks or step-by-step walkthroughs. These cover core capabilities such as talking to a project, undoing operations, background tasks, preference memory, sub-agents, and remote sessions. Their biggest value is that they stay in sync with the current version, avoiding the information gap that comes from “the tutorial is outdated and I skipped the docs.”
The most important thing to internalize is this “state — action — rollback” loop:
- State: which files were modified, which commands were run, and what side effects were produced;
- Action: how to express intent in natural language rather than directing every step;
- Rollback: how to return to a known-good state when something goes wrong.
Many developers have already used the official onboarding to restructure their workflow into a “describe intent — auto-execute — check and roll back” loop, with a clear boost in efficiency. Those who stay stuck in the “ask — copy — paste” mode are effectively using only a fraction of the tool’s capability.
Practical tips:
- Practice in parallel on a small task from a real project rather than just reading without doing;
- After finishing each section, write down in your own words “what problem this capability solves and when you shouldn’t use it”;
- Compile the common commands and shortcuts into a team cheat sheet and put it in the project knowledge base.
3. Context and Version: Give Your Thinking a Clean Workspace
Tip 2: Handle temporary questions with side-chain questions, without polluting the main context
This is one of the most frequently used techniques day to day. A side-chain question (exposed as a command like btw in some tools) corresponds to a side conversation: you insert an independent Q&A in the middle of the main task, and once it’s done it retracts automatically, leaving the main conversation intact.
Imagine a typical scenario: the agent is refactoring a complex module, the session is dozens of turns deep, and the context is near its limit. Suddenly you want to confirm “did that last commit update the docs too?” There are basically three ways to handle it:
- Ask directly in the main conversation: the temporary Q&A and speculation get mixed into the context, so later instructions can “drift off course” — it adds noise and burns precious context budget;
- Open a new session: the current progress, the agreed plan, and the change history are all lost, the agent “forgets everything in a second,” and you have to explain it all again;
- Use a side-chain question: the question is answered in an independent branch, the main task isn’t interrupted, and once you confirm you close the branch without polluting the main context.
(Side-chain) Did that last commit include the docs update? This project is planned to be open-sourced later.
Applicability boundaries:
- Good for: low-coupling questions like fact checks, style preferences, or explanations of a single file or a short piece of logic;
- Not good for: decisions that change the overall plan. Those should go back to the main thread for explicit discussion and be recorded in the plan, otherwise the later implementation tends to contradict itself;
- Note: side-chain questions usually share the same project context, so don’t discuss sensitive information in the branch.
This mirrors the idea in side-chain reasoning — “keep the main chain coherent, reason independently in the branch, and merge back when needed” — applied at the collaboration level.
Tip 3: Find any node with session rewind and “quick previous version”
Code iteration almost always involves trial and error, and an agent’s changes are often cross-file and automated, so one wrong move can affect several places. Mature tools usually offer two layers of “undo”:
- Session-level rewind: many terminal-based tools let you press Esc (often twice) to open a history list of messages, select a node, and return to the state at that point — optionally restoring the code, the conversation, or both. Some tools offer the same capability through a rewind command. It’s suited to quickly undoing a recent change with a controllable blast radius.
- Checkpoint snapshots: some tools automatically record the file state before each round of edits — think of it as fine-grained, automated local version history.
The safer approach is three layers of protection:
- Commit the code before each conversation or task so version control is your first line of defense;
- Use session rewind to quickly undo the small change just made, without manually “undoing and re-pasting”;
- Branch off before a big change so the cost of trial and error lands only on that branch.
Notes:
- When rewinding to a node “before the code,” the later conversation history is discarded too, so record important decisions in project docs or commit messages first;
- Before rewinding, have the agent list the files changed this round to avoid deleting someone else’s uncommitted work;
- When reverting commits on a shared branch, prefer a “revert commit” over force-rewriting history to avoid disrupting collaborators.
Tip 4: Turn “fix it after breaking it” into “commit before, verify after”
Rollback mechanisms answer “what do I do after a mistake?” — but the ideal is to “make fewer mistakes.” Three habits sharply reduce rework:
- Small commits: break a big task into independently verifiable steps, committing after each one with a note on the intent;
- Visible changes: have the agent output a list of changed files and a summary at the end of each step, inspecting the specific diff when necessary;
- Tag key milestones: tag decision points like plan approval, API freeze, or feature completion so that when something goes wrong you can quickly locate “which step it started to go off.”
Example:
After each independently verifiable step, first output the list of changed files, then run the relevant tests;proceed to the next step only after the tests pass.
4. Permission Control: Match Authorization Granularity to Risk Level
Tip 5: Understand and switch permission modes — don’t let “skip confirmation” become the default
Many developers still start with “skip all permission confirmations,” handing every decision to the agent. The problem is that this flag is often understood as “fully automatic mode.” In reality it’s closer to “auto-approve everything”: the model treats all operations the same and makes no risk distinction. When it hits actions like deleting files, running dangerous commands, or pushing to a remote, there’s no blocking and no warning.
Permission modes can roughly be split into three:
| Mode | Behavior | Best fit |
|---|---|---|
| Default (ask) | Requests confirmation for each file edit or command before acting | First use, unfamiliar codebases, core modules |
| Tiered auto | Auto-runs low-risk operations like reading, searching, and testing; high-risk operations still require confirmation | Day-to-day development, the recommended default for most teams |
| Skip confirmation | Executes directly with no confirmation | Only in isolated sandboxes, containers, or temporary workspaces with no sensitive data |
If your tool offers a “tiered auto” style mode, prefer it for everyday development: routine operations no longer interrupt you constantly, and the agent stops to ask when it hits the high-risk list. It balances speed and safety — faster than “confirm each step,” more controllable than “approve everything.”
Worth stressing:
- It depends on accurate rules and risk-list configuration, so don’t read “automatic” as “inspection-free”;
- The execution environment is still the last line of defense. Operations involving production data or cloud resources should run in an isolated environment.
Tip 6: Always keep human confirmation for high-risk operations
Regardless of the mode you use, the following actions should always keep human confirmation:
- Deleting files or directories, batch renaming, overwriting;
- Force push, rewriting history, merging or deleting branches;
- Installing or upgrading dependencies, changing build and deployment configs;
- Database schema changes, data migrations, production deployments;
- Making outbound network requests, uploading code or data.
Configuration usually gives you two levers:
- Allowlist: whitelist commands that are clearly safe;
- Denylist: blacklist operations that are clearly dangerous.
Put the most sensitive actions — such as accessing keys and credential files or modifying permission configs — directly on the denylist. Here’s an illustrative config (fields are illustrative; syntax should follow the tool’s documentation):
{"allow": ["search files", "read code", "run unit tests", "run static checks"],"ask": ["install or upgrade dependencies", "add or remove files", "database schema changes"],"deny": ["access key and credential files", "modify permission configs", "push to remote or rewrite history", "production deployments"]}
Configuration principle: start with least privilege, then adjust gradually based on your actual workflow.
5. Input and Expression: Keep the Context Cleaner and the Instructions More Precise
Tip 7: Let the agent “find it” rather than “pasting it”
Many people habitually paste large blocks of code or logs straight into the chat box. It looks like it saves effort, but the cost is real:
- It eats a lot of context, leaving less room for actual reasoning;
- Copying often captures only fragments, so the agent lacks the full picture and its advice may “fix one thing and break another”;
- When the cache is invalidated, all of it gets billed again.
A better deal is to give paths and intent, and let the agent locate things itself with full-text search and targeted reads. Compare two approaches:
[Paste style](Paste 800 lines of service.ts source here)Help me see what's wrong with the login logic.[Search style]In src/, find the code responsible for login/authentication. Login occasionally returns 500 on failure.First search the relevant error codes and log keywords, trace the call chain,read only the relevant snippets of the key files, then analyze the likely causes.
The search style usually saves a considerable number of tokens, and what the tool reads is often more complete and more on-point than what you’d copy by hand.
Usage tips:
- When the directory structure is complex, first have the agent output a concise file tree to define the search scope;
- For log files, specify line ranges or keywords rather than reading the whole file;
- Have the agent search before reading, and cite “file path + line number” in its answer so you can verify quickly.
Tip 8: Lock in preferences with a project memory file, so you don’t have to repeat yourself
If every new session makes you repeat “what the stack is, how naming works, which operations are off-limits,” then these conventions should be written down. Most agent tools support maintaining an instruction file in the working directory (carried in some tools by a file like CLAUDE.md) that’s automatically loaded at session start as baseline context.
Suggested content:
- Project overview: business goals, overall architecture, key module responsibilities;
- Technical constraints: language and framework versions, dependency management policy, dependencies you must not upgrade on your own;
- Coding conventions: naming, directory organization, comment and commit message format;
- Common commands: build, test, lint, local startup;
- Prohibited actions: directories that must not be modified, key files that must not be read, remote operations that are not allowed.
# Project Notes (excerpt)## Tech stack- Backend: Java 17 + Spring Boot 3.x; Frontend: TypeScript + React 18- Dependency management: Maven; do not upgrade core dependency versions on your own## Directory conventions- `src/main/java` business code; `src/test/java` test code; `docs/` design docs## Common commands- Build: `mvn -q clean package`- Unit tests: `mvn test`- Lint: `mvn -q verify`## Prohibited actions- Do not modify the environment config files under `src/main/resources`- Do not read or output any keys or credentials- Do not push to remote, merge, or delete branches
Usage tips:
- The file should be under version control and shared across the team;
- It isn’t “the longer the better” — too much detail also consumes context, so keep only stable, key, actionable conventions;
- Never put sensitive information in it;
- Update it when the project enters a new area or the architecture changes.
6. Parallelism and Scale: From a Single Session to Multi-Task Coordination
Tip 9: Split exploration and implementation with sub-agents to keep the main context focused
When a task involves both “heavy exploration” and “actual changes,” you can let the main agent act as a coordinator and hand the research work to sub-agents running in parallel. A typical pattern is “research in parallel first, then implement after summarizing”:
Spin up three sub-agents to investigate the following, each read-only (no file changes),and have each output a conclusion summary:1. The current caching layer's implementation and invalidation strategy;2. Where the API-layer rate limiting lives and how it's configured;3. The coverage and gaps of the related unit tests.After summarizing all three, give an optimization plan and a change list, then wait for my confirmation before acting.
The value of this division of labor:
- Context isolation: the sub-agents’ intermediate work doesn’t consume the main context; the main agent only receives the conclusions;
- Parallel speed-up: independent exploration tasks can run at the same time;
- Better focus: the main session concentrates on plan design and code changes.
Note: sub-agents don’t share context, so when you dispatch tasks you must state the goals and boundaries clearly — for example, which directories to read and what output format to produce.
Tip 10: Upgrade from “a human watching it work” to “machines verifying automatically”
Confirming every action by hand is the most common trap of “fake diligence” in agent collaboration: your attention is repeatedly interrupted and your judgment about the risks actually drops. A more sustainable approach is to hand the quality gates to automated tools:
- Build: make sure the project still compiles and packages after changes;
- Unit tests: verify behavior matches expectations, adding tests first if needed before changing code;
- Type checks and static analysis: catch potential defects at compile time;
- Dependency and secret scanning: block risky dependencies or leaked credentials before they land in a commit.
After each change, run in order: lint → build → unit tests.If anything fails, analyze and fix the cause first, then report the change list and verification results to me;do not lower or skip any check on your own.
Many agent tools support background tasks: long-running jobs run in the background while the session stays idle and free to continue interacting. This fits scenarios like builds, full test runs, and batch code checks. But note that “the task finished” doesn’t mean “the task passed” — judge it using both the exit code and the test report.
7. From Individual Efficiency to Team Effectiveness
Beyond individual techniques, rolling out agent coding tools across a team calls for supporting mechanisms:
- Tiered authorization: refine permission policies by “repository — branch — directory,” tightening authorization for core modules and opening it up a bit for experimental directories;
- Enforced gates: wire linting, security scans, and secret detection into CI so that code produced by agents must pass the gates too — don’t lower the bar just because it was “AI-generated”;
- Auditability: uniformly enable operation logs that record the execution results of key commands and the files changed, making problems traceable;
- Environment isolation: when high-privilege auto-execution is needed, run in containers or sandboxes and forbid carrying production credentials;
- Centralized governance: manage usage policies, permission strategies, and audit requirements for intelligent development tools under a unified framework. If you adopt a cloud development environment, you can build the isolation and audit foundation on general cloud capabilities such as container platforms, object storage, logging services, and monitoring and alerting.
For example, the general foundational capabilities offered by cloud providers such as Baidu AI Cloud can serve as a technical reference for building this kind of development environment.
Conclusion: Smoothness Comes from Mechanisms, Not Brute Force
Looking back at these 10 techniques, they reduce to four main threads:
- Context: side-chain questions, memory files, letting the tool search itself — all essentially “keep only useful information”;
- Version: rewind, snapshots, small commits — all essentially “make any step reversible”;
- Permission: tiered modes, risk lists, isolated environments — all essentially “match authorization to risk”;
- Verification: automated checks, background tasks, team gates — all essentially “make results objectively judgeable.”
If you remember only one sentence: when working with agents, shift yourself from “the confirmer of every step” to “the definer of goals, the setter of boundaries, and the reviewer of results.” When you no longer confirm every single action yet can clearly state what it did, why it did it, how to verify it, and how to roll back if something goes wrong — that’s when you’re truly working with these tools smoothly.
