Core Concepts of AI Coding Tools Explained: Skills, MCP, Workflows, Rules, and Memory

    This article breaks down five core concepts in AI coding tools and AI agents—Skills, the Model Context Protocol (MCP), Workflows, Rules, and Memories—and explains why they are often confused. It shows that each mechanism solves a different problem across five orthogonal dimensions, then walks through what each one does, how it is structured, and the engineering practices that matter, including permission scoping, credential handling, and tool-count limits. Finally, it offers a four-step adoption path and three metrics for evaluating whether the stack actually works.

    1. Why the Confusion Happens: Five Dimensions, Not Five Terms

    In the engineering practice of AI coding tools and AI agents, Skills, the Model Context Protocol (MCP), Workflows, Rules, and Memories are often treated as interchangeable. The root cause is that most discussions stop at defining the terms without explaining what problem each mechanism actually solves. In reality, they belong to five orthogonal dimensions:

    • Capability packaging: Skills answer “how do I do this kind of task?”
    • Context access: The connection protocol answers “which external systems and data can I reach?”
    • Execution orchestration: Workflows answer “in what order and under what conditions do we proceed?”
    • Behavioral constraints: Rules answer “what must be done and what must never be done?”
    • State continuity: Memories answer “what needs to persist across sessions?”

    Once these five dimensions are aligned, the selection question shifts from “which concept should I use?” to “which layer is the current bottleneck?”

    2. Skills: Reusable Packages of Domain Expertise

    A Skill is a modular capability component, typically made up of three parts: a structured description, execution logic, and optional supporting resources. It injects domain expertise and execution strategy into an agent, and is triggered automatically based on semantics during interaction with the user or environment. One notable public introduction happened in October 2025, when an overseas cloud vendor defined it in its agent specification; it was subsequently adopted as a common pattern by multiple AI coding tools.

    A Skill is still a piece of structured prompting, but it differs from an ad-hoc conversational prompt in three key ways:

    1. Discoverability: It includes a name and a capability description, so the model can judge whether the current task matches.
    2. Executability: The body provides steps, constraints, and examples, and can declare which scripts or tools need to be called.
    3. Composability: Multiple Skills can be stacked, and they can also be invoked node by node from a Workflow.

    Take a typical scenario: turning an existing business spreadsheet’s styling and data into a demonstrable dashboard page. A qualified Skill skeleton looks roughly like this:

    1. ---
    2. name: spreadsheet-to-dashboard
    3. description: Generate a demonstrable HTML dashboard from an existing spreadsheet's layout and data; trigger when the user mentions "report demo" or "dashboard page"
    4. ---
    5. ## Steps
    6. 1. Read the source spreadsheet file; identify headers, merged cells, and conditional formatting;
    7. 2. Extract metrics and dimensions; map them to chart types;
    8. 3. Generate a single-file HTML with inline styles and no external dependencies;
    9. 4. Self-check: total data counts match, no empty charts, no console errors.
    10. ## Resources
    11. - Parsing script: reads the spreadsheet and outputs structured JSON

    The design points are: write the description as “when to use it” rather than “what it is,” make the steps verifiable, and keep resources minimal. A Skill is not better for being more detailed—excessive length eats into the context budget and lowers trigger accuracy.

    3. The Connection Protocol: A Standardized External Context Layer

    The connection protocol is an open standard that exposes external data sources, tools, and execution environments to the model in a unified way. Common forms include local process communication over stdio and remote streaming communication over HTTP. It solves the fundamental problem of “the model cannot see enterprise intranet data.”

    A typical call chain goes like this: the host program starts → it fetches the list of registered connectors → it establishes a session and exchanges capability declarations → the model side receives tool names, input schemas, and descriptions → at runtime, calls are made on demand and results are returned. Objects that can be connected include code repositories, defect tracking systems, object storage, message queues, logging services, monitoring and alerting, and container platforms, among other common cloud categories.

    Four points deserve attention in engineering: first, least privilege—grant read-only or single-project scope; second, externalize credentials—inject them via environment variables or a key management service, never commit them to the repository; third, set upper bounds on timeouts and retries so that tool flakiness does not drag down the entire conversation; fourth, keep an audit trail—record the caller, a parameter summary, and the return status. More connectors is not better; tool definitions themselves consume context, and keeping the count within roughly a dozen usually helps the model choose more accurately.

    4. Workflows: Balancing Determinism and Autonomy

    A Workflow explicitly orchestrates a multi-step task into a directed process, where nodes can be model inference, script execution, conditional branches, or human approval. Its difference from a Skill is clear: a Skill describes “the method for this kind of task,” while a Workflow specifies “the concrete path and gates for this particular run.”

    The applicability test can be reduced to three questions: Are the steps fixed? Do intermediate artifacts need validation? Must failures be rolled back? If the answer is yes, the process should be fixed in advance rather than having the model plan on the fly each time. An example:

    1. workflow: release-check
    2. nodes:
    3. - lint_and_test: {type: script, on_fail: abort}
    4. - review: {type: model, gate: human_approve}
    5. - build: {type: script}
    6. - notify: {type: tool}

    A common mistake in practice is handing every step to the model’s autonomous decision-making, which results in inconsistent execution paths across multiple runs of the same task and makes problems hard to locate. A more robust approach is “let the workflow define the skeleton and the model fill in the details”: critical gates and side-effect operations are constrained by the process, while ambiguous judgments are left to the model.

    5. Rules and Memories: Constraints and Continuity

    Rules are always-on hard constraints, usually placed in a project-level documentation file. They cover tech stack versions, directory structure, checks that must pass before committing, dependencies that must not be introduced, and logging and exception handling conventions. The test is simple: a violation is an error and does not require the model to weigh trade-offs. Rules should be short, decidable, and automatically verifiable—avoid writing them as value statements.

    Memories store soft information that persists across sessions, such as project background, past decisions and their rationale, user preferences, and known pitfalls. They need governance: before writing, judge whether the information is stable and worth reusing; periodically deduplicate and expire stale entries; redact sensitive information or choose not to persist it. The division of labor between Rules and Memories can be summed up in one sentence—Rules govern boundaries, Memories govern continuity.

    6. How They Work Together and How to Adopt Them

    The five are not competing; they form a stack from the bottom up: the connection protocol provides the entry points for data and tools, Skills package methods, Workflows orchestrate paths, Rules hold the boundaries, and Memories maintain continuity. A real task often looks like this: “under Rules constraints, driven by a Workflow, calling several Skills and connectors, and reading and writing Memories.”

    Adoption can proceed in four steps: first, converge on Rules by turning team consensus into verifiable items; second, connect two or three high-frequency connectors and tighten permissions; third, distill tasks repeated more than three times into Skills; fourth, add Workflows and human gates only to chains with high stability requirements. Evaluation should not count how many concepts were used, but three metrics: first-pass rate, human rework time, and sensitive-operation interception rate. Baidu AI Cloud also emphasizes in related engineering practice that governability and observability should be designed in from the start, not patched on afterward.