Five Extension Mechanisms for AI Coding Tools: Skills, MCP, Workflows, Rules, and Memories
AI coding assistants need more than a model to handle real team workflows. This article compares five common extension mechanisms—skills, Model Context Protocol (MCP), workflows, rules, and memories—and clarifies what each one should own. It provides decision criteria, a worked reporting example, common configuration mistakes, and a minimal adoption path.
In AI coding tools, the model itself provides generic reasoning and code generation. To make it reliably complete real work inside a team, it needs a composable set of extension mechanisms. Five common mechanisms are skills, Model Context Protocol (MCP), workflows, rules, and memories. They are often written into the same configuration set, but their responsibilities do not overlap. Typical consequences of mixing them include steps that should trigger automatically becoming hand-written prompts every time, external data sources being stuffed into long prompts, and long-term norms existing only in a single conversation.
1. Start with the division of labor, not the names
A coding task can be broken into five questions. What method should the task follow? What external capabilities and data are needed? How should multiple steps be orchestrated and handed off? What constraints must never be broken? What facts should persist across sessions? The five mechanisms answer these five questions respectively.
Skills answer method: in what scenarios, by what steps, and with what acceptance criteria a class of tasks should be completed. Model Context Protocol answers connection: how to discover and invoke external tools, resources, and data in a unified way. Workflows answer orchestration: how multiple skills, tool calls, and human confirmations form a repeatable process. Rules answer boundaries: hard constraints such as coding standards, security requirements, and output formats. Memories answer continuity: reusable context such as user preferences, project conventions, and confirmed decisions.
To decide where a configuration belongs, use three criteria. Is it a “how” or a “fact”? Is it a “one-time process” or an “always-on constraint”? Is it a “model-internal policy” or a “model-external system”? Methods go into skills, external systems go through protocol integration, sequence goes into workflows, red lines go into rules, and cross-session facts go into memories.
2. Skills: reusable methods for doing work
A skill is a modular capability description for an agent. It usually includes a name, functional description, trigger conditions, execution steps, constraints, examples, and optional script or resource references. The name and description support semantic matching: when the user does not name a skill explicitly, the system can still select the appropriate one based on intent. Steps and examples extract “how to do it” from temporary conversations and turn it into a version-managed asset.
Consider an example: turning a spreadsheet template into a presentable web report. The skill should not hard-code the brand of a spreadsheet product. Instead, it should describe generic steps: confirm the template structure and presentation goal; read headers, sample rows, and formatting conventions; map them to layouts, metric cards, and tables in a web page; define handling rules for missing values, merged cells, and inconsistent definitions; generate a page that can be opened locally and list assumptions that were not automatically confirmed. If reading the spreadsheet requires a script, the skill should only declare which read capability to call, which parameters to pass, and how to validate the output, rather than piling the entire business logic into the prompt. The script handles deterministic parsing, while the model handles interpretation and presentation. This keeps the skill reusable and avoids delegating error-prone file parsing entirely to generative inference.
Skills are suitable for work such as report generation, code review checklists, API integration checks, and release note writing—similar tasks with stable methods. They are not suitable for storing database passwords, replacing permission systems, or writing temporary numbers that are valid for only one request as general steps. Skills should be composable: one skill calls a tool, another skill consumes its result, and the upper-level workflow decides the order.
3. MCP: connect external capabilities
MCP here refers to a class of model context integration protocols: enabling a coding assistant to discover external tools, read resources, and obtain structured results in a unified way, instead of hand-writing an unmaintainable prompt for each data source. The protocol layer cares about capability catalogs, invocation conventions, input/output structures, and permission boundaries. The skill layer cares about when to call and how to judge correctness after the call.
Using the reporting scenario again: reading spreadsheets, querying a metric warehouse, and pulling monitoring curves are all external capabilities. They should be exposed as tools or resources through the protocol: tool descriptions should state their purpose and parameters and return structured data; permissions should be controlled by the runtime environment, not by a prompt saying “please do not read the production database.” The model sees “available tools and their semantics,” while the skill decides that “when generating a demo report, first read the template, then verify metric definitions.” Without a protocol, people often paste file contents into the conversation. The context becomes long and stale, and it is difficult to audit who read what and when.
A protocol is not a workflow. It does not prescribe the order of business steps; it only ensures that capabilities can be discovered, invoked, and constrained. When selecting one, look at three things: whether tool descriptions are sufficient to reduce erroneous calls; whether failures return actionable errors rather than large blocks of irrelevant text; and whether credentials and network access are contained on the tool side. When building an intelligent development environment on a cloud platform such as Baidu AI Cloud, enterprises should also connect common capabilities such as object storage, logging, and monitoring as controlled tools rather than hard-coding access methods in prompts.
4. Workflows: orchestrate steps into a repeatable process
A workflow is an explicit process definition: nodes, branches, inputs and outputs, failure retries, and human confirmation points. Skills are the “methods” inside nodes, the protocol provides the “hands and feet” that nodes can call, and the workflow defines “which step comes first and which path to take on failure.”
A report demo can be orchestrated as follows: validate whether input files are complete; call a read tool to obtain structured tables; use a skill to generate a page according to demo rules; if key metrics are missing, pause and ask a human to confirm definitions; after approval, archive the page and generation notes. If this sequence is written only in the skill body, the model may still skip steps or regenerate. A workflow keeps checkable state in a process engine or an explicit task list, making it suitable for releases, migrations, batch refactoring, and other tasks that cannot rely on luck in a single generation.
A workflow should not carry all norms. Format prohibitions, bans on committing secrets, and requirements to include test notes should be placed in rules so that every node inherits them, rather than being copied into each workflow.
5. Rules: always-on hard constraints
Rules are short, hard instruction sets that remain active within a session or project scope. Typical content includes language and framework versions, directory conventions, error handling style, prohibitions, and required output structures. Rules must be testable; avoid sentences such as “write more elegantly” that cannot be judged as violated or not.
The difference from skills lies in the trigger method. Skills are selected by task semantics and can be unused if they do not match. Rules are active by default and do not depend on whether the user says “please follow the conventions.” Therefore, rules must be concise: if too long, they crowd the context; if contradictory, they leave the model no basis for tradeoffs. It is advisable to layer them by priority: security and compliance above project structure, and project structure above personal formatting preferences. Personal preferences that are not team consensus are better placed in memories.
6. Memories: facts and preferences retained across sessions
Memories store information that has been confirmed and is likely to be useful later, such as: this developer prefers to write tests first; the meaning of a service’s error codes; or the previous decision that the demo report should use a static page rather than introducing a frontend framework. Memories are not execution steps and should not automatically become inviolable rules. They are retrieved or summarized and injected into context to help reduce repeated questions.
Memories must be used with boundaries. Record only stable facts and explicit preferences; do not record secrets, tokens, or unredacted production data. Expired decisions should be updateable or deletable; otherwise, the model will continue generating according to old definitions. When a memory conflicts with current rules, the rules prevail, and the response should point out the conflict rather than silently overriding it.
7. How they fit into one task
Using the web report example again, a complete collaboration can work as follows: rules require that no secrets be output, that the page open offline, and that changes to metric definitions be explicitly listed; memory contains the preference that “the audience is a business review meeting, with emphasis on period-over-period comparison”; the protocol provides spreadsheet reading and metric definition queries; the skill describes the steps and acceptance criteria from template to page; the workflow strings together reading, generation, human confirmation, and archiving. The user only needs to state the goal; the system selects skills based on descriptions, calls tools according to the process, and completes output within the rules.
There are four common configuration mistakes. Copying an entire tool manual into a skill, so that all skills become outdated after a protocol upgrade. Writing a one-off requirement into rules, causing later unrelated tasks to be incorrectly constrained. Writing workflow branches into memory, so the model remembers “last time it was like this” but does not know the failure branch. Keeping team norms that should persist only in a single conversation, so they are lost when the session changes.
8. Minimal practices for adoption
Start with project rules under ten lines, keeping only security, structure, and required output. Then create one skill for each recurring task, with descriptions that clearly state “when to use” and “completion criteria.” All external reads and writes should go through controlled tools; do not paste large blocks of source data into prompts. Introduce workflows only when branches, retries, or human gates appear. Memories should record only user-confirmed preferences and decisions, and should be cleaned regularly.
The value of these five mechanisms is that they split unstable long conversations into manageable methods, connections, sequences, constraints, and facts. With clear boundaries, AI coding tools can move from “teaching them again every time” to a “team-reusable execution system.”
