AI Coding Agents: Core Capabilities and Practical CLI Workflows

    Understand how commands, subagents, skills, and programmatic tool calling address different challenges in AI-assisted development. This article explains their design principles, compares their roles, and outlines a practical workflow for integrating CLI coding agents into everyday development and CI pipelines.

    Introduction: Why Coding Agent Capabilities Need Clear Boundaries

    AI coding tools built around large language models have evolved rapidly. Leading products have introduced concepts such as commands, subagents, skills, and programmatic tool calling. These ideas have shaped AI coding assistants and influenced other tools, forming a broadly applicable approach to agent design.

    The growing vocabulary can also be confusing. Many developers have encountered or used these capabilities without a clear understanding of where one ends and another begins—or which to choose for a particular task.

    This article starts with the design principles behind coding agents, examines their core capabilities, and then connects those concepts to practical terminal-based development workflows.

    1. Design Philosophy: Helping the Model Work Effectively

    The central purpose of a coding agent is straightforward: make better use of the model’s capabilities.

    A model may be able to reason, plan, and generate code, but on its own it cannot inspect a project, execute commands, or verify results. The agent supplies the surrounding infrastructure, creating a feedback loop of observation, decision-making, execution, and feedback.

    Coding agents commonly expose this functionality through several interfaces:

    • Interactive terminal UI (TUI): A conversational interface inside the terminal. Its relatively low resource overhead makes it a practical entry point for developers working alongside an agent.
    • Headless mode: Non-interactive execution that accepts an input and returns a result. This fits batch scripts and continuous integration pipelines for tasks such as automated reviews and bulk refactoring.
    • SDK: A programmable interface to agent orchestration, tool calling, and context management. Teams can use it to build agent applications tailored to their workflows.

    These interfaces can share the same core while offering different interaction layers. A unified core with multiple interfaces is a useful architectural pattern for agent products.

    2. Understanding the Core Capabilities

    2.1 Commands: Shortcuts for Reusable Prompts

    A command is essentially a shortcut: a short instruction name inserts a predefined prompt into the conversation. Its value lies in capturing frequent, structured requests so developers do not have to repeat lengthy instructions.

    Custom commands are often lightweight to implement. A Markdown file in a designated directory contains metadata in front matter and a prompt template in the body. For example:

    1. ---
    2. name: api-document
    3. description: Generate and maintain API documentation, interface specifications, authentication guidance, and version change notes.
    4. ---
    5. Read the interface definitions in {{project}} and generate structured API documentation...

    This is an illustrative format; the exact conventions depend on the agent.

    When to use commands: Tasks with relatively consistent inputs, a clear output structure, and frequent reuse are good candidates. Examples include commit message generation, code review checklists, and documentation outlines.

    The limitation is equally important: a command reuses a prompt. It does not, by itself, extend the agent’s capabilities or provide a separate context or execution environment.

    2.2 Subagents: Specialized Workers with Isolated Context

    Subagents address a different problem: context clutter and role specialization.

    During a complex task, the main agent may accumulate search results, exploratory notes, and logs from unsuccessful attempts. Keeping all of this in the main conversation consumes context space and makes important information harder to distinguish.

    A subagent delegates a specific task to a worker with its own context, system prompt, and configurable tool permissions. Once the task is complete, it returns its findings to the main agent rather than passing back the entire exploration history.

    Typical uses include:

    • Codebase exploration: Trace how a feature works in a large repository. Exploration details remain in the subagent’s context, while the main agent receives a concise summary.
    • Specialized review: Assign security audits or performance analysis to a subagent with a focused role and instructions.
    • Restricted permissions: Give a subagent read-only access or a limited toolset to reduce the scope for unintended changes during sensitive work.

    The key distinction is that a subagent is an execution unit to which work can be delegated, while a command is reusable prompt text.

    2.3 Skills: Capability Packages Loaded on Demand

    Skills package domain knowledge, operating procedures, and supporting scripts into capability units that an agent can discover and load when needed. When a task matches a skill’s description, the agent can bring its detailed instructions into context.

    The underlying principle is progressive disclosure. Keeping the full instructions for dozens or hundreds of capabilities in context would be costly. Instead, the agent initially sees names and short descriptions, then loads the relevant details when needed.

    This balances access to a broad range of capabilities against context consumption.

    The differences among commands, subagents, and skills can be summarized as follows:

    Concept Primary role Context behavior Typical uses
    Command Reusable prompt shortcut Shares the main conversation context Frequent tasks with a consistent structure
    Subagent Independent execution unit Uses isolated context Exploration, specialized analysis, and restricted tool access
    Skill On-demand capability package Loads details when relevant Specialized domain tasks that do not need to remain in context

    2.4 Programmatic Tool Calling

    In a conventional step-by-step tool workflow, the model generates a call, waits for the result, and then decides what to do next. Multi-step tasks can require many round trips, consuming tokens and exposing the model to intermediate data that may distract from the task.

    Programmatic tool calling takes a different approach. The model generates orchestration code containing constructs such as loops, conditional branches, or batches of calls. An execution environment runs that code and aggregates the results, allowing the model to work with the relevant output rather than every intermediate response.

    This can improve two aspects of execution:

    • Efficiency: Combining multiple round trips into a single execution can reduce latency and token consumption.
    • Result quality: Keeping unnecessary intermediate data out of context allows the model to reason over cleaner, aggregated results, which can support more consistent outputs.

    This approach is not appropriate for every task. When individual steps require human approval or frequent interaction, step-by-step tool calling may offer better control. The choice should follow the task’s requirements rather than the novelty of the mechanism.

    3. Practical Development Workflows with CLI Coding Agents

    With these distinctions in place, the next question is how to integrate a terminal-based coding assistant into everyday development.

    A typical adoption path includes five steps:

    1. Establish project context. Place a project instruction file at the repository root. Describe the technology stack, directory conventions, test commands, and coding standards so the agent has a useful starting point.
    2. Create shared team commands. Turn recurring workflows—such as code reviews, release checks, and API documentation generation—into custom commands that make team practices more consistent.
    3. Define specialized subagents. Delegate tasks such as codebase exploration and dependency upgrade impact analysis to separate subagents, keeping the main conversation focused.
    4. Integrate with automation. Use headless mode in CI pipelines for tasks such as generating change summaries and supplementing static checks.
    5. Keep human review and testing mandatory. Agent-generated changes must pass human review and test validation. The agent accelerates development; it does not replace accountability.

    Consider a legacy module refactoring task. An exploration subagent first traces call paths and produces a dependency report. The main agent uses that report to propose a phased refactoring plan, implements each phase, and runs tests along the way. A custom command then generates the change documentation.

    In this workflow, the developer’s role shifts from writing every change manually toward setting goals, reviewing the plan, and validating the results.

    Conclusion

    Commands, subagents, skills, and programmatic tool calling solve four distinct engineering problems:

    • Commands: Prompt reuse.
    • Subagents: Context isolation and task delegation.
    • Skills: Modular, on-demand access to specialized knowledge and procedures.
    • Programmatic tool calling: Execution orchestration.

    Understanding these boundaries—and how the capabilities work together—has more lasting value than memorizing the interface of any single product.

    As teams need additional compute, model services, and engineering infrastructure, they can also evaluate the general-purpose capabilities of cloud platforms, including Baidu AI Cloud, as part of building an AI-assisted development environment suited to their requirements.