Foundation / System anatomy

Prompt vs. Skill vs. Memory vs. Agent

A prompt is your request for the current task. A skill is a reusable procedure, memory holds saved context, and tools let the AI read information or take actions. The agent coordinates these parts. Separating them makes recurring work easier to explain and maintain.

01

Where does each layer live, and how long does it last?

These terms describe different jobs. Ask what changes each time and what should stay available for future work. The current client and date range may change; the reporting procedure may stay the same.

LayerWhere it livesLifespanWhat does not belong in it
PromptThe message you typeOne turnStanding policy you retype every time
SkillA SKILL.md folderUntil the procedure changesClient records, keys, task status
MemoryA memory file the host loadsUntil the fact changesTranscripts, to-do lists, secrets
ToolAn MCP server or host permissionUntil access is revokedGuidance about when to use it
AgentThe running sessionThe sessionAnything you expected to persist
Layer roles as Monolith runs them across Claude Code, Hermes, and OpenClaw, September 2026.
02

How do you tell which layer a piece of knowledge belongs to?

Run four questions against the sentence you are about to write, in this order. The first yes wins and you stop.

  • Does it expire when this task ends? Then it is a prompt and it stays in the message.
  • Would a new hire need it to repeat the work? Then it is a skill, written as steps with a verification pass at the end.
  • Is it a stable fact about the business, the stack, or the people? Then it is memory.
  • Does it require reaching a system outside the model? Then it is a tool, and the real question becomes who approves the call.

Take a live example. A client wants a monthly report. The date range and the client name go in the prompt, because they change every run. The pull, clean, and format procedure goes in a skill, because it is identical every month. The fact that this client counts a booked call as a lead, not a form fill, goes in memory, because it stays true until they redefine it. The analytics connection is a tool, and publishing the finished report goes through a person.

03

What does this look like on disk?

The examples below show where different agent products store instructions and context. You do not need to memorize the paths. Use them to locate the files for the product you are setting up.

Layer locations by hosttext
Claude Code
  .claude/skills/<name>/SKILL.md      skill, this project
  ~/.claude/skills/<name>/SKILL.md    skill, every project
  ./CLAUDE.md                         memory, this project
  ~/.claude/CLAUDE.md                 memory, this user
  .mcp.json                           tools

Hermes
  ~/.hermes/skills/<name>/SKILL.md    skill
  memory file location                unconfirmed, check your install

OpenClaw
  <workspace>/skills/<name>/SKILL.md  skill, this workspace
  ~/.openclaw/skills/<name>/SKILL.md  skill, shared
  <workspace>/AGENTS.md               memory, startup context

Saved instructions and skills can load in different ways. Some project instructions may be included automatically, while the full text of a skill may be read only when needed. Check which files your software loads, especially instructions inherited from a parent folder. Extra or outdated instructions can affect the result and usage cost.

04

What does a layer mistake actually look like?

When the agent repeats a mistake, check where the relevant instruction is stored. It may be missing from the current task, saved in the wrong project or contradicted by another file.

  • Procedure stranded in prompts: output drifts between runs and nobody can say which version was correct.
  • Business facts buried in a skill: you edit one file to change a phone number, and every project using that skill inherits the edit.
  • Task status written into memory: the agent opens confident and works last month's priorities.
  • Credentials anywhere in context: they now live in a file you sync, back up, and paste into support threads.
05

How do you move something into the right layer?

Run the task again without repeating the instruction you just saved. Check whether the agent still follows it. That verifies the saved procedure or context is doing its job.

Keep a change history for these files. Record what changed, when and why, so a change in behavior can be investigated and an earlier version restored if needed.

Is a skill just a saved prompt?

A skill can contain a reusable prompt, but it also has a description that helps the agent select it and can include supporting files. Check how your agent software loads each kind of instruction.

Should project rules go in memory or in a skill?

Use project context for stable facts and conventions. Use a skill for a procedure with steps, inputs and review criteria. Permission rules belong in the software controls that enforce them.

Do these layers work the same across every agent host?

The general ideas are similar, but file locations and supported settings differ. Check the product documentation and test the same task after moving a skill.

Put it to work

Sort your instructions into the right layers

Start with the layer map in this guide. If the same instruction keeps being repeated, we can help decide whether it belongs in a reusable procedure, project context, or a tool permission rule.

Continue the field manual

Related guides