AI Coding Tools Explained: Skills, MCP, Workflows, Rules, and Memories
This article clarifies five core concepts in AI coding tools—Skills, the Model Context Protocol (MCP), Workflows, Rules, and Memories—and explains why teams often confuse them. It shows how to classify information as static constraints, dynamic capabilities, execution orchestration, or cross-session state, then maps each type to the right mechanism. You will find practical guidance on defining skill trigger boundaries, applying least-privilege access in connection protocols, using workflows for compliance-heavy pipelines, keeping rules short and enforceable, managing memory with expiration, and a recommended adoption order for building controllable AI-assisted development.
1. Why These Concepts Get Confused
In the capability stack of AI coding tools, Skills, the Model Context Protocol (MCP), Workflows, Rules, and Memories are often drawn on the same architecture diagram. As a result, many teams treat them as five names for the same thing.
The cost of this misunderstanding is concrete:
- Constraints that should be fixed get written into prompts, making output unstable.
- Processes that should be orchestrated dynamically get stuffed into rule files, bloating the context.
- Experience that should accumulate over time stays scattered across sessions, forcing the same explanations again and again.
To separate them, start with one question: Is this information a static constraint, a dynamic capability, an execution sequence, or cross-session state? Each of the four types maps to a different mechanism, and mixing them up makes all of them fail.
2. Skills: Packaging Domain Expertise into Triggerable Capability Units
A Skill is a modular capability component. It typically consists of three parts—a structured description, execution logic, and optional resources—and it injects domain expertise and execution strategy into an agent, triggering automatically based on semantics during interaction with the user or the environment. Its value lies in being reusable, composable, and manageable.
From an engineering perspective, the core of a Skill is not the prompt itself but how clearly its trigger boundary is defined. The model must decide whether to use it based only on its name and description, so the description has to state both where it applies and where it does not. A typical Skill includes a name, a description, execution steps, constraint rules, and any scripts or external capabilities it needs to call.
Take “turning an existing business spreadsheet style into a demonstrable dashboard page” as an example. The Skill directory can be organized as:
dashboard-skill/├── SKILL.md # Main spec: name, description, steps, rules├── reference.md # Optional: domain reference docs├── examples.md # Optional: input/output examples└── scripts/└── parse_table.py # Parse table structure and styling
A skeleton of the main spec file:
---name: dashboard-builderdescription: Use when the user needs to turn an existing tabular report into a demonstrable dashboard page;not for data cleaning or metric definition.---1. Call scripts/parse_table.py to extract headers, merged cells, and styling2. Generate the page structure following the color and grid specs in reference.md3. Output a single-file page using a common visualization approach for charts4. If fields are missing, confirm with the user first; never invent metrics
Three engineering practices are worth emphasizing. First, keep Skills small and single-purpose; composing several Skills beats building one giant Skill. Second, scripts handle deterministic computation while the model handles semantic decisions, and neither should cross into the other’s territory. Third, Skills need version control, with regression checks on trigger accuracy after every change.
3. Connection Protocols: Giving the Model a Unified Way to Use External Systems
Connection protocols solve the problem of standardized access. They abstract the capabilities of external systems into three uniform primitives—resources, tools, and prompts—so an agent does not need custom adapter code for every system. Databases, object storage, message queues, container platforms, logging services, and monitoring and alerting systems can all be exposed to the model through a unified protocol layer.
The key engineering property here is least privilege and auditability. When integrating, expose only the necessary operations, require a second confirmation for write operations, log every call, and mask sensitive fields before returning them. The test for whether you need a connection protocol is simple: when a capability must be reused across projects and the caller is not just one model, push it down to the protocol layer instead of writing it into a specific Skill.
4. Workflows: Confining Uncertainty
A Workflow is explicit execution orchestration in which nodes, branches, loops, and human confirmation points are all deterministic. The fundamental difference from a Skill is this: a Skill relies on the model’s semantic judgment to decide when to trigger, while a Workflow has a program decide what runs next.
So for any task involving strict compliance, long chains, or multi-role collaboration, fix the skeleton with a Workflow first, then embed Skills inside individual nodes to handle ambiguous semantics. Example:
workflow: release-reportsteps:- extract: pull build and test records- skill: dashboard-builder # leave the semantic step to the Skill- gate: human confirmation of metric definitions- publish: archive and notify
5. Rules and Memories: Static Constraints vs. Cross-Session State
Rules are always-on static constraints, such as code style, directory conventions, forbidden dependencies, and checks that must run before a commit. They should be short, decidable, few, and hard. Avoid pushing long background into rules, which crowds out the context.
Memories store cross-session state and preferences, such as the project’s current phase, the reasons behind past decisions, and the user’s explicit personal habits. Memories need a write policy, a confidence level, and an expiration mechanism; otherwise stale information keeps polluting output. A practical way to tell them apart: write a rule for anything that must hold every single time, and write a memory for anything that is only durably true for the current project.
6. Comparison and Recommended Adoption Order
| Mechanism | Question it answers | Trigger | Change frequency |
|---|---|---|---|
| Skill | How to do a certain kind of task | Semantic match | Medium |
| Connection protocol | What to use to access external systems | Explicit call | Low |
| Workflow | What to do next | Program orchestration | Medium |
| Rule | What must never be done | Always in effect | Low |
| Memory | What was decided before | Recalled on demand | High |
The recommended adoption order: write rules first to hold the baseline, then accumulate a small number of high-value Skills, then push repeated system integrations down into connection protocols, and finally chain critical paths with Workflows and introduce Memories for personalization. Baidu AI Cloud also emphasizes in related engineering practice that clear capability layering and governance boundaries are the prerequisite for moving AI-assisted development from “usable” to “controllable.”
