Building and Using AI Coding Assistant Extensions: Agents, MCP, Skills, and Commands

    This guide explains how extension resources shape what an AI coding assistant can do in real projects. It covers the roles and boundaries of the four main categories (agents, MCP, skills, and commands), how to discover and evaluate extension resources, how to combine them into workflows, and how to handle security, compliance, and team-level management. You will get practical criteria and a sample pre-commit check workflow for turning a general-purpose assistant into a controlled, team-specific productivity platform.

    1. Why Extension Resources Set the Ceiling on an Assistant’s Capabilities

    Any AI coding assistant provides only three fundamental capabilities: language understanding and code generation, context reasoning, and responding to developer intent. What makes the assistant genuinely useful in a real project is not the size of the model but the extension ecosystem built around it.

    An assistant with no extensions can only offer Q&A-style code suggestions. An assistant configured with the right extension resources can understand project conventions, access real data, and execute multi-step tasks. Over time, it becomes the team’s always-on engineering partner.

    A common approach in the community is to group these resources into four categories: Agents, MCP (the tool integration protocol), Skills, and Commands. Understanding what each one is for and how they work together is the prerequisite for using them effectively. It is also the key to avoiding the common trap where more configuration simply means more clutter.

    These four categories are not alternatives to one another. They form a layered structure that goes from encapsulating a capability, to connecting to the outside world, to invoking with a shortcut. Each layer is broken down below.

    2. The Four Extension Categories: Roles and Boundaries

    1. Agents: Task-Oriented Autonomous Execution Units

    An agent is an execution unit with a degree of autonomy, packaged around a specific type of task. It typically has four elements:

    • a clearly defined role
    • the context it can access
    • the tools it can call
    • an agreed output format

    Common examples include code review agents, unit test generation agents, technical writing agents, and dependency upgrade and compatibility check agents.

    The core value of agents, compared with one-off question answering, lies in reusability and composability. You do not need to restate the task background, constraints, and expected output every time. Instead, you codify that pattern once as an agent and invoke it on demand.

    For example, a change impact analysis agent can lock in a workflow that reads the diff, locates the affected call chains, and lists the test cases that need to be rerun. What used to take a dozen or more manual steps becomes a single trigger.

    2. Tool Integration Protocol (MCP): Connecting the Assistant to the Outside World

    A model cannot directly “see” your database, file system, internal APIs, or logging system. The tool integration protocol, commonly referred to as MCP (Model Context Protocol), solves a general problem: how to expose external data sources and tools to the model in a standardized and controlled way.

    The point is decoupling. Instead of writing a custom integration for every external system, the model connects through a unified protocol adaptation layer. A typical connection layer divides responsibilities as follows:

    1. Assistant (reasoning layer)
    2. │ standard protocol calls
    3. ▼
    4. Tool adapter layer (connection layer)
    5. ├── Read-only data sources: files, code repositories, documentation
    6. ├── Query tools: database retrieval, log service queries
    7. └── Action tools: ticket creation, pipeline triggers (require authorization)

    The benefits of this layered design:

    • capabilities can be added or removed on demand
    • permissions can be managed by tier
    • adding or retiring one category of tool does not affect the overall architecture

    3. Skills: Reusable Modules of Knowledge and Capability

    If an agent is a task-level encapsulation, a skill is a knowledge- or capability-level one. A skill packages domain knowledge, coding standards, framework-specific conventions, and team code style into a module that the model can understand and use.

    Typical skill scenarios include:

    • best practices for an internal framework
    • modeling constraints for a specific domain, such as payments or risk control
    • company-wide logging and error code conventions

    Skills give a general-purpose model project-specific common sense. This reduces repeated explanations and poor suggestions. Skills also make it easier to keep recommendations consistent.

    Compared with pasting specification documents into prompts over and over, packaging them as skills significantly reduces context overhead.

    4. Commands: Reusable Templates for Frequent Operations

    Commands are the lightest kind of extension. They turn frequent operations into reusable instruction templates.

    Commands suit actions you perform every day and describe from scratch each time, such as:

    • generating standardized commit messages
    • generating test case skeletons
    • initializing configuration files from a team template
    • running a fixed code check routine

    The difference between a command and a skill is simple: a skill provides knowledge and judgment criteria, while a command provides an entry point and a fixed action. They are often used together: the command triggers the workflow, and the skill supplies the underlying constraints.

    3. How to Discover and Evaluate Extension Resources

    Before you can use resources well, you need to be able to tell the good ones from the rest. With so many resources appearing in the community, evaluate them along these dimensions:

    • Task fit: Does it address a real, high-frequency pain point, or is it something that looks impressive but you will never use? Prioritize the steps where repetitive work and time cost are highest.
    • Context cost: A good resource should convey a clearer intent with less context. If a resource needs a lot of background pasted in before it will work, it is not well packaged.
    • Controllability and side effects: Resources that perform write operations, make external calls, or change permissions must have clearly defined boundaries, be auditable, and allow rollback. Read-only resources carry the lowest risk, while action resources require additional authorization.
    • Maintainability: Does the resource have a clear input/output contract, and is it easy for the team to version and iterate on?

    4. Combining Resources and Designing Workflows

    The real power of the four categories shows up when they work together. A common combination:

    • a command serves as the trigger entry point
    • skills provide the standards and constraints
    • the tool integration layer reads real data
    • an agent coordinates multi-step execution

    The example below sketches a pre-commit check workflow:

    1. # Example: a "pre-commit check" workflow
    2. command: /pre-commit-check # trigger entry point
    3. skills: # injected constraints
    4. - coding-style-guide # team coding standards
    5. - security-checklist # security self-check list
    6. tools: # external connections (read-only first)
    7. - repo-reader # reads the current change
    8. - static-analysis # static analysis
    9. agent: # coordinates execution
    10. - change-reviewer # generates review comments and risk points

    When designing workflows, follow the principle of least privilege and gradual handover. At first, require manual confirmation at every step. Once the workflow is stable, automate it step by step. This lets you validate value quickly while keeping risk within acceptable limits.

    5. Security and Compliance: Not an Optional Step

    The richer the extension ecosystem, the larger the attack surface and the greater the compliance risk. Both should be considered from the start of the design:

    • Least privilege: Grant only the minimum permissions needed to complete the task, and strictly separate read operations from write operations.
    • Protection of sensitive information: Never expose keys, tokens, or personal data directly in prompts or tool configurations. Pass them through secure secret management and masking mechanisms instead.
    • Prompt injection defense: When a resource reads external content such as web pages, documents, or tickets, watch for malicious instructions hidden in it. Treat external content as data, never as commands.
    • Auditability and traceability: Log every action that involves a write operation or an external call, so you can investigate issues later and assign responsibility.
    • Clear data boundaries: Define which data may leave the local environment and which must be processed within controlled boundaries, in line with your organization’s compliance requirements.

    In enterprise settings, this kind of governance usually needs to work with unified identity and access management, permission systems, and logging and monitoring. Together they form an overall solution that is both manageable and observable. Generic cloud platform capabilities such as logging, monitoring and alerting, and identity and access management (for example, those offered by Baidu AI Cloud and similar providers) can serve as a reference for the underlying infrastructure.

    6. Turning Resource Usage into Team Assets

    Resource use at the individual level should ultimately become a team asset. A practical approach:

    • Put stable agents, skills, and commands under version control, and review and iterate on them alongside the codebase.
    • Maintain a resource catalog with documentation that lists applicable scenarios, permission requirements, and owners.
    • Review how resources are used on a regular basis and retire those that deliver little value. Otherwise, the resource library keeps growing while no one maintains it.

    Conclusion

    The real strength of an AI coding assistant is not how impressive a single generation looks. It is whether the assistant can be deeply integrated with your real workflow through extension resources. Once you understand the roles and boundaries of agents, MCP, skills, and commands, and know how to discover, evaluate, combine, and govern them, you can turn a general-purpose assistant into a customized productivity platform. Such a platform understands your project, fits your team, and stays manageable and controllable. This is both an extension of technical capability and a realistic path to improving engineering productivity.