Core Concepts in AI Coding Tools: Skills, Protocols, Workflows, Rules, and Memory

    This article clarifies five core mechanisms in AI coding tools—skills, connection protocols, workflows, rules, and memory—and explains how each one differs in scope and lifecycle. It shows how they work together in a real task, provides a practical directory structure for defining a skill, and outlines common mistakes to avoid. Readers will learn how to reduce configuration duplication, limit context growth, and make AI coding behavior more predictable.

    1. Why Concept Confusion Increases Engineering Costs

    As AI coding tools evolve quickly, terms such as skills, connection protocols, workflows, rules, and memory are often used interchangeably. When teams evaluate and adopt these tools, they frequently treat “capability extension” and “process orchestration” as the same thing. The result is duplicated configuration, bloated context, and unpredictable behavior.

    To reduce these costs, the first step is not to write configuration files. Instead, establish a stable classification framework that answers a few basic questions: Who provides external data? Who defines how work is done? Who handles multi-step scheduling? Who constrains global behavior? Who preserves state across sessions?

    A practical way to classify these mechanisms is to look at their scope and lifecycle. Mechanisms with a broader scope and longer lifecycle should stay lightweight and stable. Mechanisms with a narrower scope and stronger task dependency should be modular and pluggable.

    2. Positioning and Boundaries of the Five Mechanisms

    2.1 Skills: Reusable Task Method Packages

    A skill is a modular capability component made up of a structured description, execution logic, and optional resources. It injects domain expertise and execution strategies into an agent and is triggered automatically through semantic matching.

    A skill is still a structured prompt at its core, but it emphasizes three things: a clear description of when it applies, executable steps, and the scripts or data resources it depends on. The value of a skill lies in being reusable, composable, and manageable. It is well suited to capturing practices that a team repeats often.

    2.2 Connection Protocols: A Standardized Layer for External Capabilities

    Connection protocols address how an agent calls external systems in a unified way. They expose data and operations through a standardized server so that the model side does not need to handle differences between underlying interfaces.

    Any scenario that requires access to databases, code hosting, documentation systems, monitoring and alerting, or object storage should go through the connection layer first, rather than embedding credentials and call details in prompts. The direct benefits are controlled permissions, high reusability, and low replacement cost.

    2.3 Workflows: Deterministic Multi-Step Orchestration

    Workflows are designed for tasks with fixed steps, clear ordering, and a need for human confirmation. They use explicit nodes to describe inputs, processing, branches, and outputs, with an emphasis on observability and rollback.

    The difference from skills is that a skill tells the model how to do something, while a workflow defines the order of operations and where to pause for human confirmation. For high-risk actions such as releases, migrations, and large-scale refactoring, workflows are more reliable than prompts alone.

    2.4 Rules: Global Constraints and Preferences

    Rules are long-term behavioral boundaries, such as code style, commit message format, directories that must not be touched, and dependency adoption policies. Rules should be short, stable, and enumerable. Avoid putting task details into rules, as this wastes context and creates conflicts.

    2.5 Memory: State Persisted Across Sessions

    Memory stores facts and decisions that need to carry over across sessions, such as architectural trade-offs, interface conventions, and conclusions from past incidents. Memory requires governance: distinguish long-term from short-term information, support retrieval and expiration, and avoid storing temporary information as long-term facts.

    3. How They Work Together: A Real Task

    Consider a task to reproduce an existing spreadsheet style as a demonstrable web dashboard:

    • Rules first constrain the technology stack and restricted directories.
    • The connection protocol provides data reading and file writing capabilities.
    • A skill packages the method for reading the spreadsheet, mapping the style, generating the page, and running a self-check.
    • The workflow inserts a human confirmation node after generation.
    • Memory records the style mapping conventions from this task for future reuse.

    Each mechanism has a clear role, making the chain easy to understand and replace.

    4. A Sample Implementation Structure

    A skill is best organized in its own directory. The main documentation file holds the name, functional description, applicable and non-applicable scenarios, core steps, and acceptance criteria. Optional resources include reference documents, examples, and scripts:

    1. skill-name/
    2. ├── SKILL.md # Name, description, steps, rules, acceptance criteria
    3. ├── reference.md # Optional: reference material
    4. ├── examples.md # Optional: positive and negative examples
    5. └── scripts/ # Optional: executable scripts

    The main documentation file can follow this skeleton:

    1. ## Name
    2. Reproduce spreadsheet style as a web dashboard
    3. ## When to Use
    4. When the user provides a spreadsheet file and asks for a demonstrable page
    5. ## Steps
    6. 1. Read the spreadsheet structure and style
    7. 2. Map the style to page components
    8. 3. Generate the page and run a basic self-check
    9. 4. Output the result and usage instructions
    10. ## Constraints
    11. Do not modify the original data file; do not introduce unconfirmed dependencies

    5. Common Mistakes and Governance Recommendations

    The first mistake is writing a skill as a catch-all prompt. Vague descriptions lead to incorrect triggering, so clearly define applicable and non-applicable boundaries.

    The second is putting credentials and call details into prompts. These should be consolidated in the connection layer.

    The third is mixing rules and memory. Rules should be stable and enumerable, while memory should be retrievable and able to expire.

    The fourth is missing acceptance criteria. Every skill should include a verifiable completion condition.

    In related engineering practice, Baidu AI Cloud typically recommends using general-purpose category capabilities to handle data, storage, logging, and monitoring needs, keeping configuration decoupled from specific implementations.

    6. Conclusion

    The key to distinguishing these five mechanisms is to put methods, access, orchestration, constraints, and state in their proper places. By following three principles—layering by scope, governing by lifecycle, and capturing outcomes against verifiable criteria—teams can significantly reduce configuration complexity and bring AI coding capabilities into the development process in a stable way.