Core AI Coding Concepts Explained: Skills, MCP, Workflow, Rules, and Memories
This article breaks down five core concepts in AI coding and agent platforms—Skills, MCP, Workflow, Rules, and Memories—and explains how they differ in purpose and abstraction. It covers how to structure reusable Skills, how a standardized connection layer exposes external tools, when to use an explicit Workflow, and how Rules and Memories separate hard constraints from cross-session context. Readers will also find practical selection guidance for combining these building blocks into an operable agent.
1. Why These Concepts Get Confused
In AI coding tools and general-purpose agent platforms, Skills, MCP, Workflow, Rules, and Memories are often mentioned side by side. They all appear to be “telling the model what to do,” but they operate at completely different layers: some expose capability interfaces, some encode execution strategies, some orchestrate steps, some constrain boundaries, and some accumulate experience.
The cost of confusing them is direct: writing a process into a prompt makes it impossible to reuse; scattering constraints across different places leads to behavioral drift; hard-coding external capabilities makes them hard to replace.
A more reasonable way to understand them is by layer:
- Rules are the “constitution.”
- Memories are the “experience.”
- Skills are the “method manuals.”
- MCP is the “power and tool interface.”
- Workflow is the “assembly line.”
Only when these five are combined do you get a usable agent. AI coding is just one specialized form of an agent, so the same layering applies to data analysis, operations, customer support, and other scenarios.
2. Skills: Reusable Domain Method Components
A Skill is a modular capability package made up of a structured description, execution logic, and optional resources. It injects domain expertise into an agent and is triggered automatically through semantic matching. It is still prompt engineering at its core, but it emphasizes three things:
- Discoverable: the name and description let the model choose it on its own.
- Executable: the steps and scripts are explicit.
- Maintainable: it is organized in a directory and versioned.
A typical directory structure looks like this:
skill-name/├── SKILL.md # Name, description, trigger conditions, core steps├── reference.md # Optional: domain specs and reference material├── examples.md # Optional: positive and negative examples└── scripts/└── read_excel.py # Optional: deterministic script
Take “turning tabular data into a visualization dashboard page” as an example. The Skill should clearly define the input contract, layout rules, color scheme and responsive requirements, and error handling, and it should provide a script entry point for reading the table. The key design principle is: leave deterministic logic to scripts and judgment-based logic to the model. This reduces hallucination and makes testing easier.
3. MCP: A Standardized External Capability Layer
MCP is a standardized connection protocol between the model and external systems. It answers “where do tools come from, and how are they discovered and invoked.” It exposes capabilities such as data reading, retrieval, building, and deployment to the agent in a unified way, avoiding a private adapter for every system.
Its value comes from three things:
- Decoupling: tool implementations are separated from prompts, so replacing the backend does not affect the upper layer.
- Least privilege: read or write access can be granted as needed.
- Composability: multiple capabilities can be mounted at the same time.
In practice, write clear descriptions and parameter constraints for each tool, add a confirmation step for high-risk operations, and log and monitor calls so they can be audited and troubleshooted.
4. Workflow: Turning Steps into an Observable Pipeline
A Workflow targets multi-step tasks with strong determinism, explicitly orchestrating nodes, branches, retries, and human approvals. The difference from a Skill is that a Skill describes the “method,” while a Workflow defines the “order and state transitions.” When a task requires stable delivery, rollback, and measurability, a Workflow should carry it, with model calls treated as one node rather than letting the model freely decide the entire path.
Example:
workflow:- parse_input- fetch_data # Called through the standardized connection layer- analyze # Model node- render_report- review # Human confirmation- publish
5. Rules and Memories: Constraints vs. Experience
Rules are hard constraints that stay in effect over the long term, such as the tech stack, directory conventions, commit and review requirements, and security red lines. They should be concise, decidable, and placed in global or project-level configuration, avoiding coupling with specific tasks.
Memories store preferences and facts that persist across sessions, such as commonly used naming styles and the background of prior decisions. They need to be tiered: project-level and user-level isolation, masking of sensitive information, and support for viewing and clearing. Rules govern “what must be done,” while Memories govern “what was done before,” and neither can replace the other.
6. How They Work Together and How to Choose
A practical combination is: Rules set the boundaries, Memories provide context, Skills provide methods, the standardized connection layer provides tools, and a Workflow ties delivery together.
For selection:
- Use a prompt for one-off exploration.
- If something recurs and needs to be shared across the team, capture it as a Skill.
- If external systems are involved, go through the standardized connection layer.
- Use a Workflow for strong delivery processes.
- Write long-term preferences into Memories and validate them with Rules.
In environments such as Baidu AI Cloud, these assets can be combined with common capabilities like object storage, logging services, and monitoring and alerting to enable version management, call auditing, and effectiveness measurement, moving an agent from “demo-ready” to “operable.”
