AI Coding Tools Explained: Core Concepts and a Practical Guide to Skills, MCP, Workflows, Rules, and Memories

    This article untangles five mechanisms that developers often encounter in AI coding tools: Skills, the Model Context Protocol (MCP), Workflows, Rules, and Memories. Using four classification dimensions—knowledge type, trigger mechanism, scope, and mutability—it explains what each mechanism is for, how they differ, and where they overlap. You will find practical guidance on skill descriptions and directory layout, MCP least-privilege and context-budget concerns, combining deterministic workflows with probabilistic agents, tiered rule enforcement and conflict resolution, and maintaining memories as auditable project facts. It closes with a four-question selection checklist and a three-step adoption path for turning individual prompting tricks into governed engineering assets.

    1. Background: Why Mixed Concepts Block Engineering Adoption

    As AI coding tools spread quickly, developers often run into several mechanisms inside a single project: Skills, the Model Context Protocol (MCP), Workflows, Rules, and Memories. Documentation tends to list them side by side but rarely compares them in one shared frame of reference. The result is that teams keep hitting the same pitfalls when they try to adopt them: hardcoding one-off procedures into rule files, writing should-level preferences as must-level constraints, and scattering external system access logic across prompts. What remains is a “prompt swamp” that is hard to maintain and hard to reuse.

    The way out is not to memorize every definition. It is to establish a shared set of classification dimensions first. This article breaks the problem down along four dimensions: knowledge type (methodology, constraint, or fact), trigger mechanism (semantic auto-triggering, explicit invocation, or process-driven), scope (global, project, subtask, or a single session), and mutability (static asset or dynamic state that evolves over time). Every mechanism discussed below is placed on these four dimensions.

    2. Skills: Reusable Packages of Domain Methodology

    A Skill is a modular capability component. It typically consists of three parts: a structured description, execution logic, and optional bundled resources. Skills inject domain expertise and execution strategy into an agent, and they are matched and triggered semantically based on interaction with the user or the environment. Under the hood a Skill is still a well-organized prompt; its value lies in “layered loading” and “on-demand exposure.”

    A typical Skill package looks like this:

    1. skills/
    2. └── html-report/
    3. ├── SKILL.md # Name, when-to-use description, execution steps
    4. ├── templates/ # Reusable page skeletons and style fragments
    5. └── scripts/ # Optional validation or data-cleanup scripts

    The quality of the Skill description directly determines the hit rate. A description that is too broad will compete with other Skills for triggering; one that is too narrow will never be selected. In practice, state explicitly “when to use” and “when not to use,” for example: “Use this Skill when the user needs a chart-based report page that opens directly in a browser; do not use it if the user only asks for plain-text conclusions.”

    Note that a Skill is a methodology-layer asset. It answers “how should this be done,” not “what must be done.” Keep it separate from hard constraints, and avoid mixing safety red lines into the Skill body.

    3. MCP: A Standardized Layer for External Capabilities

    MCP is an open, standardized interface specification that exposes external data sources, tool services, and prompt resources to an agent in a uniform way. It answers the question “where do capabilities come from.” Its core architecture defines three roles: the host that runs the agent, the client that manages sessions, and the server that provides capabilities. A server can expose three kinds of primitives: tools, resources, and prompt templates.

    1. {
    2. "mcpServers": {
    3. "repo-context": {
    4. "command": "server-runner",
    5. "args": ["--transport", "stdio"],
    6. "env": { "LOG_LEVEL": "info" }
    7. }
    8. }
    9. }

    Three engineering points matter here. First, least privilege: split servers into read-only and read-write variants, and do not grant destructive operations by default. Second, context budget: large result sets should be filtered and paginated on the server side, otherwise a single query can blow up the window. Third, observability: log the duration, response size, and error code of every tool call so you can tell whether a failure came from a model judgment error or an interface fault. Skills and MCP are orthogonal: a Skill decides “which method to use,” MCP decides “which tool to use,” and only the combination delivers full execution capability.

    4. Workflows: Splitting Deterministic and Probabilistic Work

    A Workflow orchestrates a task as explicit nodes and edges, with the next step decided by code rather than by the model. The fundamental difference from a Skill is where control lives: a Skill hands decisions to the model, while a Workflow hands them to code.

    Dimension Skill Workflow
    Control flow Model’s semantic judgment Predefined nodes and branches
    Testability Relies on evaluation sets Can be unit tested
    Best fit Open-ended, exploratory tasks High-compliance, repeatable tasks

    The recommended pattern is “deterministic on the outside, probabilistic on the inside”: use a Workflow to fix the stages (read requirements → retrieve context → generate → static checks → test → summarize), and let Skills operate freely within each stage. For example:

    1. workflow: change-request
    2. nodes:
    3. - id: collect
    4. type: prompt
    5. - id: implement
    6. type: agent
    7. skills: [code-style, html-report]
    8. - id: verify
    9. type: script
    10. run: check_and_test
    11. edges: [collect->implement, implement->verify]

    5. Rules: Tiered Constraints and Conflict Resolution

    Rules are constraints that stay in effect persistently. They are usually scoped at the user, project, and directory levels, and are loaded from nearest to farthest with overriding precedence. Mature teams annotate each rule with an enforcement level: must marks safety and compliance red lines, should marks default preferences, and may marks optional suggestions. When a rule conflicts with a Skill description, establish a clear priority: safety-related must outranks everything, followed by project-level rules, then suggestions inside Skills.

    Keep rule entries atomic: one entry expresses one requirement, and give a verifiable check whenever possible, for example “commit messages must state the motivation for the change and its scope of impact” rather than “write good commit messages.” As rules multiply, they dilute attention, so audit them regularly and archive entries that no longer apply.

    6. Memories: An Evolving Store of Project Facts

    Memories hold facts and decisions that change over time, such as directory responsibilities, technology choices already made, and rejected options with the reasons behind them. The difference from Rules is this: Rules describe “how things should be,” while Memories describe “how things are.” In implementation, support source attribution and freshness fields, allow manual correction, and keep a conflict marker on contradictory entries instead of silently overwriting them. Where possible, store long-term memories as structured files in the version repository so they can be reviewed and rolled back, rather than becoming an unauditable black box.

    7. Selection Decisions and Adoption Advice

    The decision order can be fixed as four questions: Do you need external data or actions? If so, bring in MCP. Are the steps stable and subject to audit? If so, use a Workflow. Is it a long-term preference across tasks? If so, write a Rule. Is it a one-off method? If so, package a Skill. Does it need to carry across sessions? If so, write it into Memories.

    A three-step adoption path works well. First, unify directory and naming conventions so scattered prompts become managed assets. Second, build an evaluation set and run quantitative regression on Skill trigger rates and Workflow pass rates. Third, wire in logging, monitoring, and alerting, with thresholds on context consumption and tool failure rates. General-purpose capabilities such as container platforms, object storage, log services, and monitoring and alerting from Baidu AI Cloud can provide the underlying support for hosting these assets and observing their runtime behavior. The end goal is to let all five mechanisms do their own jobs with clear boundaries, turning AI-assisted development from personal technique into engineering capability that a team can govern.