跪拜 Guibai
← All articles
Frontend · Claude · Agent

Rules, Skills, MCP, Workflows, and Memory in AI coding agents: a field guide built from real tasks

By jerrywus ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

AI coding agents now expose five overlapping configuration systems, and each product names them differently. Getting the boundaries wrong means bloated context, gated workflows that never run, and secrets leaking through logs; getting them right keeps an agent useful across Claude Code, Codex, and Pi without maintaining three divergent setups.

Summary

The five configuration concepts every AI coding agent exposes—Rules, Skills, MCP, Workflows, and Memory—get conflated by overlapping product naming. This guide separates them by what they actually solve: Rules enforce persistent conventions, Skills package a repeatable task's method, MCP connects external tools and data, Workflows sequence steps with confirmation gates, and Memory preserves confirmed decisions across sessions.

Working examples ground each concept: a Figma-to-COS image pipeline that combines a Skill with an MCP connection, a `CLAUDE.md` rule set that stops scope creep and fake test results, and a page-check Skill with progressive disclosure. A Chrome DevTools MCP setup shows the permission layers and tab-hijacking issues that surface when connecting an agent to a live browser.

Product differences matter. Claude Code uses `CLAUDE.md` and supports `AGENTS.md` conditionally; Codex uses `AGENTS.md` and `$skill` invocation; Pi-Bolt uses `/skill:name` and supports shared `~/.agents/skills/` paths. The advice is to share Skill content across tools, adapt host-specific behavior, and verify by real task runs rather than config checklists.

Takeaways
— Rules handle persistent conventions: no unauthorized commits, no faking test results, preserve unrelated workspace changes; Claude Code uses CLAUDE.md, Codex and Pi use AGENTS.md.
— Skills package a repeatable task's method (trigger conditions, steps, references, scripts), with progressive disclosure so the model reads details only when needed.
— MCP connects external tools and data over a standard protocol: browsers, design files, document services; only add it when the client's own file/command access is insufficient.
— Workflows define sequence and confirmation points, e.g., show sample frames, wait for approval, render; approval records should be version-checked by code before execution.
— Memory stores stable preferences, confirmed decisions, and environment limits for retrieval in later sessions; ephemeral task state belongs in daily logs.
— Since Claude Code already lets custom Commands merge into Skills, common slash entries can be different mechanisms across tools; verify load timing, not just the name.
— A Skill can contain a Workflow; the former is a capability package, the latter describes execution; product naming overlaps, so judge by behavior.
— Writing 'forbidden' in Markdown is not a permission boundary; sandboxing, command checks, CI, and real permissions must block at their own layers.
— When sharing Skills across Claude Code, Codex, and Pi, put shared content in a common directory and use links for tool-specific entry points; review Claude Code-specific fields.
— Validate any configured Skill or MCP with a real task: test missing secrets, existing files, upload failure, false triggers, tool disconnects, and mid-task requirement changes.
Conclusions

The overlapping names across products are not an implementation detail but the original problem: a developer cannot learn one tool's mental model and transfer it. Each product's load timing, maintenance method, and execution behavior differ even when the concept name matches.

Memory is the most oversold concept: a file named MEMORY.md neither guarantees the model reads it each time nor proves content correctness. Retrievability must be tested in a fresh session, which is a concrete acceptance criterion most agent configuration lacks.

The practical advice to share Skill content across tools while adapting host-specific behavior reveals a real cost: the more tools you run, the more divergence you maintain. A shared directory plus per-tool links is only a partial answer, since load semantics still differ.

The Chrome DevTools MCP debug story shows agent tooling still sits at the integration layer: permission models, browser sessions, and connection reuse are unresolved enough that a custom adapter script carrying background-creation parameters is needed to make the tool usable.

Concepts & terms
Progressive disclosure
A design pattern where the agent first sees only a Skill's name, description, and path, then reads the full instructions and references only after deciding to use it, reducing context waste.
MCP (Model Context Protocol)
A protocol for AI clients to connect to external tools and data services, such as browsers, design files, or documentation servers, through a standardized interface.
Hooks
Configuration that runs commands or checks when specific events occur in the agent's host, used for reminders or interception at defined stages; coverage must be verified per host.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗