Skill, MCP, Workflow, Rules, and Memories in AI Coding Tools
AI coding assistants often treat Skill, MCP, Workflow, Rules, and Memories as interchangeable features, but they sit on different abstraction layers. This article separates them into constraints, state, methods, interfaces, and processes, then shows how to combine them without bloating context or making behavior unpredictable.
Why the Concepts Get Mixed Up: Five Mechanisms, Different Layers
In the capability stack of an AI coding assistant, Skill, MCP, Workflow, Rules, and Memories are often discussed side by side. They do not belong to the same abstraction layer. Treating them as the same kind of thing leads to redundant configuration, bloated context, and unpredictable behavior. A useful first question is: is this piece a constraint, state, a method, an interface, or a process?
- Constraint (Rules): behavioral boundaries that always apply
- State (Memories): facts and preferences kept across sessions
- Method (Skills): operating guidance invoked only for a specific task
- Interface (MCP): a general protocol connecting the model to external tools and data sources
- Process (Workflow): an execution sequence controlled by deterministic code or an orchestration engine
Rules: Always-On Hard Constraints
Rules usually live in a project-root rules file or in global configuration. Their meaning is “follow this no matter what.” They are a good place for coding standards, stack constraints, directory conventions, commit-message format, and security lines that change rarely and have high priority.
# Example: rules file fragment- Language and framework: TypeScript plus the frontend component library; do not add unreviewed dependencies- Directory convention: business code in src/; shared capabilities in shared/- Security: never output credentials or tokens; do not log full request bodies- Commits: follow Conventional Commits; one commit does one thing
The main design principle for Rules is brevity. Rules stay in context, so every line spends window budget and dilutes attention. A practical approach is to keep only items that are wrong if violated, and move “how to do it” detail into Skills.
Memories: State Carried Across Sessions
Memories solve the problem of having to restate something said last time. They store facts, preferences, and decisions: the package manager the project uses, how the team prefers reviews, or the root-cause conclusion of a past defect.
The boundary with Rules is clear. Rules say how things should be; Memories say how things actually are. Temporary preferences written into Rules rot the rules file quickly. Hard constraints written into Memories apply only sometimes.
In practice, Memories should be layered and allowed to expire. Separate project, module, and personal levels. Record source time and confidence for each item. Let newer evidence override a memory that conflicts with the current code. A sketch:
memory/project.md # Project facts: stack, build method, release cadencemodule-auth.md # Module conclusions: past decisions on the auth pathuser-pref.md # Personal preferences: comment language, example style
Skills: Domain Methods Loaded on Demand
A Skill is a modular capability made of a structured description, execution logic, and optional resources. It injects domain expertise and an execution strategy into the agent, and it can fire automatically when the task matches semantically. It is still prompt text, but the important part is progressive loading: at first only the name and description are exposed. The body and attached resources are read only after the task matches, so capability can grow without blowing up the context.
A typical Skill skeleton:
---name: dashboard-reportdescription: Use when generating an HTML report or dashboard demo page---## Steps1. Confirm metric definitions and the time range2. Extract the data shape; define fields and aggregations3. Generate a single HTML file with inline styles and scripts, and no external dependencies4. Self-check: empty data, extreme values, and wrapping of long text## Resources- template/skeleton.html- examples/sales.json
Skills differ from Rules in how they trigger. Rules always apply; a Skill depends on semantic match. Skills differ from Workflows in who is in control. A Skill leaves decisions to the model; a Workflow leaves them to code.
MCP: A General Access Layer for Tools and Data
MCP (Model Context Protocol) is an open protocol that standardizes how a model connects to external systems. It is usually made of a client, a server, and a transport. The server exposes tools, resources, and prompts; the client discovers and calls them. Its value is not “being smarter.” It is decoupling: the provider of a capability is separated from the model-side implementation, so the same tools can be reused by different hosts.
MCP only answers whether something can be connected and how to call it. It does not decide when to use it or in what steps. That is the Skill’s job. A common and sound split is: the Skill describes the method and declares the tools it needs; MCP provides the real execution path for those tools.
Workflow: Deterministic Orchestration
A Workflow is a fixed sequence driven by code or an orchestration engine, for example: pull code, static checks, unit tests, build, upload the artifact, deploy, smoke test. Steps are fixed, replayable, and auditable, and failures can be located. The model only makes local judgments inside that sequence, such as generating a patch or explaining a failure log.
A practical test: use a Workflow where the result must be reproducible and auditable; leave open-ended reasoning to the model.
Comparison and How to Combine Them
| Mechanism | Layer | How it takes effect | Change rate | Typical content |
|---|---|---|---|---|
| Rules | Constraint | Always on | Very low | Standards, red lines |
| Memories | State | Accumulates over time | Medium | Facts, preferences, conclusions |
| Skills | Method | Semantic trigger | Medium | Steps, examples, templates |
| MCP | Interface | Called when needed | Low | Tools, resources |
| Workflow | Process | Event-driven | Low | Stages, gates |
A useful pattern: Rules hold the floor, Memories keep continuity across sessions, Skills carry reusable expertise and call real capabilities through MCP, and Workflows give deterministic guarantees to high-risk stages.
Three common mistakes: putting everything into Rules and polluting the context; using a Skill for determinism that a Workflow should guarantee; treating Memories as an ever-growing log with no expiry or deduplication. Governance means a capacity limit and a review process for each mechanism, periodic cleanup of stale memories and rarely used skills, and permissions plus audit on tool calls, so the system stays reusable, composable, manageable, and able to evolve.
