A Complete Guide to Core Concepts in AI Coding Tools

    This article breaks down five core concepts in AI coding tools—skills, connection protocols, workflows, rules, and memory—and explains how to tell them apart. It covers what each mechanism does, when to use it, design and governance pitfalls to avoid, and a practical four-step adoption path for building predictable, cost-efficient agent systems.

    1. The Problem: The Engineering Cost of Confused Concepts

    AI coding tools are evolving quickly, and vendors and communities keep introducing new abstractions: skills, connection protocols, workflows, rules, and memory. These terms appear constantly in documentation, yet they are often used interchangeably. When a team’s concepts are unclear, the cost shows up in three ways:

    • Duplicated capability work, where the same constraint is written both as a rule and as a skill.
    • Out-of-control context, where all information is stuffed into the prompt, so token consumption and noise rise together.
    • Unpredictable behavior, where the model triggers the wrong strategy at the wrong time.

    The most effective way to separate these five is not to memorize definitions, but to establish one decision thread first: Is this piece of information a stable constraint, a reusable method, an external connection, a multi-step orchestration, or cross-session state? The answer determines the mechanism that should carry it.

    2. Skills: Packaging Domain Expertise as Reusable Modules

    A skill is a modular capability component made of three parts: a structured description, execution logic, and optional resources. It injects domain expertise and execution strategy into an agent and is triggered automatically based on semantics during interaction. The concept was first introduced by a cloud vendor in the second half of 2025 and was then widely adopted across the industry.

    At its core, a skill is still a prompt, but it differs from an ad hoc prompt in three key ways:

    • It carries metadata: the name and description determine whether it gets selected correctly, so description quality equals recall rate.
    • It carries execution logic: it includes steps, constraints, and examples, and references external resources such as scripts or templates when needed.
    • It loads on demand: it enters the context only when semantics match, rather than staying resident.

    Consider a common scenario: a business team has built a report template in a spreadsheet and wants the agent to read its layout and data, then produce a web dashboard suitable for a presentation. A skill for this is organized roughly as follows:

    1. ---
    2. name: spreadsheet-to-dashboard
    3. description: Reads the layout and data of a spreadsheet and generates a single-file HTML dashboard for presentation scenarios
    4. ---
    5. ## Steps
    6. 1. Call the parsing script to read the workbook structure and cell styles
    7. 2. Extract three layers: title, metrics area, and detail table
    8. 3. Generate a responsive layout that matches the template's color scheme
    9. 4. Output a single-file HTML with inline styles and scripts
    10. ## Constraints
    11. - Do not modify the source file
    12. - Keep numeric precision and thousands separators consistent with the template
    13. - Fall back to a table when chart data is missing; do not fabricate data

    The design principle is that the description serves selection, the steps serve execution, and the constraints serve as a fallback. Missing any one of the three, and the skill degrades into text that no one ever calls.

    3. Connection Protocols: Letting the Model Reach External Systems Safely

    A connection protocol (often referred to as MCP in the industry) is a standardized bidirectional communication specification. It exposes data sources, tools, and prompt templates to the agent in a unified way. It solves the “hands and eyes” problem: the skill tells the model what to do, while the protocol determines what it can reach.

    A typical connection layer provides three kinds of capability: resource reading (read-only data such as documents, table schemas, and log fragments), tool invocation (side effects such as writing records or triggering builds), and prompt templates (preset interaction patterns). Two ground rules must be followed in engineering:

    1. Separate reads from writes and apply least privilege: prefer read-only capabilities, and grant write operations separately with an audit trail.
    2. Timeouts and idempotency: external calls are inherently unstable, so set timeouts, retries, and idempotency keys to avoid duplicate submissions.

    It is worth stressing that the protocol itself carries no business judgment; it only handles reachability. Pushing business rules into the connection layer is a common form of architectural pollution.

    4. Workflows: Converging Uncertainty into a Controllable Path

    A workflow is an explicit multi-step orchestration whose nodes, branches, and transition conditions are defined in advance by developers. Its boundary with a skill is clear: a skill relies on the model’s semantic judgment of whether to act, while a workflow has the program decide where to go next.

    The applicability criterion can be reduced to one sentence: use a workflow when the number of steps is fixed, the order cannot change, and failures must be rollback-able; use a skill when the path is open and requires semantic understanding. Real systems are often hybrid:

    1. Requirement input → [Rule validation] → Skill selection → Tool invocation → Result validation → Retry on failure / human intervention

    The outer layer uses a workflow to guarantee control and observability, while the inner layer uses skills to retain flexibility. This “fixed skeleton, flexible joints” structure is currently a mainstream engineering compromise.

    5. Rules: A Single Source of Truth for Stable Constraints

    Rules are hard constraints that stay in effect over the long term. They are usually kept resident in the context or injected as configuration—for example, code style, commit conventions, directories that must not be touched, and dependency version policy. Their defining trait is that they take effect unconditionally and require no semantic trigger.

    The most common mistake in rule design is bloat. Keeping dozens of entries resident crowds out the budget and creates conflicts. Three practices are recommended: isolate scope by tech stack and directory; express only one verifiable assertion per rule; and hand automatable checks to the pipeline, leaving rule text to carry only the intent the model must know.

    6. Memory: Carrying State Across Sessions

    Memory stores information across sessions and falls into three types: factual (project structure, technology choices), preference (user habits, output format), and experiential (pitfalls encountered and how they were fixed). It must be retrievable rather than replayed in full, otherwise it permanently locks in context cost.

    Governance requires four mechanisms: identify sensitive information before writing, retain the source and a timestamp when storing, truncate by relevance when retrieving, and provide a clear entry point for forgetting and correction. A memory system without a forgetting mechanism will cement a single wrong conclusion over the long term.

    7. How They Work Together and How to Adopt Them

    The five can be summarized as a layered model: rules are the foundation, the connection protocol is the channel, the workflow is the skeleton, skills are pluggable muscles, and memory is the long-term nervous system. To decide where something belongs, ask three questions in sequence: does it always apply (rules), does it need to persist across sessions (memory), is the path fixed (workflow), does it need an external system (protocol)—everything else goes to skills.

    A four-step adoption path is recommended: first, settle rules and directory conventions; then, connect a small number of read-only integrations; next, package high-frequency repetitive tasks as skills; and finally, use a workflow to lock down critical paths and plug in monitoring, alerting, and logging services. If you run on a container platform or function computing, you can use object storage to hold skill packages and artifacts, and a message queue to decouple long-running tasks, gaining elasticity and observability without binding to a specific product.

    In related practice at Baidu AI Cloud, this layered approach applies as well: using general cloud product categories to carry storage, orchestration, and observability, while keeping business judgment in the skill and rule layers, is an effective way to control complexity and cost.